diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES
index 6da5e94..e6842d5 100644
--- a/.openapi-generator/FILES
+++ b/.openapi-generator/FILES
@@ -3,6 +3,7 @@
.gitlab-ci.yml
.travis.yml
README.md
+docs/AdminServiceDelegatedCheckoutRequest.md
docs/AuditLogApi.md
docs/AuthnApi.md
docs/AuthzApi.md
@@ -104,6 +105,7 @@ docs/V1beta1CreateServiceUserResponse.md
docs/V1beta1CreateServiceUserSecretResponse.md
docs/V1beta1CreateUserPreferencesResponse.md
docs/V1beta1CreateUserResponse.md
+docs/V1beta1DelegatedCheckoutResponse.md
docs/V1beta1DescribePreferencesResponse.md
docs/V1beta1Domain.md
docs/V1beta1Feature.md
@@ -169,6 +171,7 @@ docs/V1beta1ListOrganizationsByUserResponse.md
docs/V1beta1ListOrganizationsResponse.md
docs/V1beta1ListPermissionsResponse.md
docs/V1beta1ListPlansResponse.md
+docs/V1beta1ListPlatformUsersResponse.md
docs/V1beta1ListPoliciesResponse.md
docs/V1beta1ListPreferencesResponse.md
docs/V1beta1ListProjectAdminsResponse.md
@@ -274,6 +277,7 @@ frontier_api/api_response.py
frontier_api/configuration.py
frontier_api/exceptions.py
frontier_api/models/__init__.py
+frontier_api/models/admin_service_delegated_checkout_request.py
frontier_api/models/billing_account_address.py
frontier_api/models/billing_account_balance.py
frontier_api/models/frontier_service_add_group_users_request.py
@@ -350,6 +354,7 @@ frontier_api/models/v1beta1_create_service_user_response.py
frontier_api/models/v1beta1_create_service_user_secret_response.py
frontier_api/models/v1beta1_create_user_preferences_response.py
frontier_api/models/v1beta1_create_user_response.py
+frontier_api/models/v1beta1_delegated_checkout_response.py
frontier_api/models/v1beta1_describe_preferences_response.py
frontier_api/models/v1beta1_domain.py
frontier_api/models/v1beta1_feature.py
@@ -415,6 +420,7 @@ frontier_api/models/v1beta1_list_organizations_by_user_response.py
frontier_api/models/v1beta1_list_organizations_response.py
frontier_api/models/v1beta1_list_permissions_response.py
frontier_api/models/v1beta1_list_plans_response.py
+frontier_api/models/v1beta1_list_platform_users_response.py
frontier_api/models/v1beta1_list_policies_response.py
frontier_api/models/v1beta1_list_preferences_response.py
frontier_api/models/v1beta1_list_project_admins_response.py
@@ -496,6 +502,7 @@ setup.cfg
setup.py
test-requirements.txt
test/__init__.py
+test/test_admin_service_delegated_checkout_request.py
test/test_audit_log_api.py
test/test_authn_api.py
test/test_authz_api.py
@@ -597,6 +604,7 @@ test/test_v1beta1_create_service_user_response.py
test/test_v1beta1_create_service_user_secret_response.py
test/test_v1beta1_create_user_preferences_response.py
test/test_v1beta1_create_user_response.py
+test/test_v1beta1_delegated_checkout_response.py
test/test_v1beta1_describe_preferences_response.py
test/test_v1beta1_domain.py
test/test_v1beta1_feature.py
@@ -662,6 +670,7 @@ test/test_v1beta1_list_organizations_by_user_response.py
test/test_v1beta1_list_organizations_response.py
test/test_v1beta1_list_permissions_response.py
test/test_v1beta1_list_plans_response.py
+test/test_v1beta1_list_platform_users_response.py
test/test_v1beta1_list_policies_response.py
test/test_v1beta1_list_preferences_response.py
test/test_v1beta1_list_project_admins_response.py
diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION
index 3769235..73a86b1 100644
--- a/.openapi-generator/VERSION
+++ b/.openapi-generator/VERSION
@@ -1 +1 @@
-7.1.0
\ No newline at end of file
+7.0.1
\ No newline at end of file
diff --git a/Makefile b/Makefile
index c6d2976..49c21bb 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-FRONTIER_COMMIT := df8151fb7b24a0c2f2072257bd82516b816cdd30
+FRONTIER_COMMIT := 553c3384828abfc7fa68d67fd04ac0b14520cb0a
.PHONY: clean genclient genspec
genclient: clean genspec ## Generate the client using openapi-generator
@@ -23,3 +23,9 @@ genspec: ## Generate the openapi v3 spec using raystack/frontier generated v2 sp
@curl -X 'GET' \
'https://converter.swagger.io/api/convert?url=https%3A%2F%2Fraw.githubusercontent.com%2Fraystack%2Ffrontier%2F${FRONTIER_COMMIT}%2Fproto%2Fapidocs.swagger.yaml' \
-H 'accept: application/json' > ./etc/openapi.json
+
+install-openapi-generator: ## Install openapi-generator
+ @echo " > installing openapi-generator"
+ @curl https://raw.githubusercontent.com/Homebrew/homebrew-core/73338e79c4dffa794560535b642a2e0eccd78a9b/Formula/o/openapi-generator.rb > ./openapi-generator.rb
+ @brew install ./openapi-generator.rb
+ @rm ./openapi-generator.rb
\ No newline at end of file
diff --git a/README.md b/README.md
index 571dfb5..7b0b010 100644
--- a/README.md
+++ b/README.md
@@ -119,6 +119,7 @@ Class | Method | HTTP request | Description
*BillingApi* | [**frontier_service_get_billing_balance**](docs/BillingApi.md#frontier_service_get_billing_balance) | **GET** /v1beta1/organizations/{orgId}/billing/{id}/balance | Get billing balance
*BillingApi* | [**frontier_service_list_billing_accounts**](docs/BillingApi.md#frontier_service_list_billing_accounts) | **GET** /v1beta1/organizations/{orgId}/billing | List billing accounts
*BillingApi* | [**frontier_service_update_billing_account**](docs/BillingApi.md#frontier_service_update_billing_account) | **PUT** /v1beta1/organizations/{orgId}/billing/{id} | Update billing account
+*CheckoutApi* | [**admin_service_delegated_checkout**](docs/CheckoutApi.md#admin_service_delegated_checkout) | **POST** /v1beta1/admin/organizations/{orgId}/billing/{billingId}/checkouts | Checkout a feature or subscription
*CheckoutApi* | [**frontier_service_create_checkout**](docs/CheckoutApi.md#frontier_service_create_checkout) | **POST** /v1beta1/organizations/{orgId}/billing/{billingId}/checkouts | Checkout a feature or subscription
*CheckoutApi* | [**frontier_service_list_checkouts**](docs/CheckoutApi.md#frontier_service_list_checkouts) | **GET** /v1beta1/organizations/{orgId}/billing/{billingId}/checkouts | List checkouts
*EntitlementApi* | [**frontier_service_check_feature_entitlement**](docs/EntitlementApi.md#frontier_service_check_feature_entitlement) | **POST** /v1beta1/organizations/{orgId}/billing/{billingId}/check | Check entitlement
@@ -179,6 +180,7 @@ Class | Method | HTTP request | Description
*PlanApi* | [**frontier_service_list_plans**](docs/PlanApi.md#frontier_service_list_plans) | **GET** /v1beta1/billing/plans | List plans
*PlanApi* | [**frontier_service_update_plan**](docs/PlanApi.md#frontier_service_update_plan) | **PUT** /v1beta1/billing/plans/{id} | Update plan
*PlatformApi* | [**admin_service_add_platform_user**](docs/PlatformApi.md#admin_service_add_platform_user) | **POST** /v1beta1/admin/platform/users | Add platform user
+*PlatformApi* | [**admin_service_list_platform_users**](docs/PlatformApi.md#admin_service_list_platform_users) | **GET** /v1beta1/admin/platform/users | List platform users
*PolicyApi* | [**frontier_service_create_policy**](docs/PolicyApi.md#frontier_service_create_policy) | **POST** /v1beta1/policies | Create policy
*PolicyApi* | [**frontier_service_delete_policy**](docs/PolicyApi.md#frontier_service_delete_policy) | **DELETE** /v1beta1/policies/{id} | Delete Policy
*PolicyApi* | [**frontier_service_get_policy**](docs/PolicyApi.md#frontier_service_get_policy) | **GET** /v1beta1/policies/{id} | Get policy
@@ -266,6 +268,7 @@ Class | Method | HTTP request | Description
## Documentation For Models
+ - [AdminServiceDelegatedCheckoutRequest](docs/AdminServiceDelegatedCheckoutRequest.md)
- [BillingAccountAddress](docs/BillingAccountAddress.md)
- [BillingAccountBalance](docs/BillingAccountBalance.md)
- [FrontierServiceAddGroupUsersRequest](docs/FrontierServiceAddGroupUsersRequest.md)
@@ -342,6 +345,7 @@ Class | Method | HTTP request | Description
- [V1beta1CreateServiceUserSecretResponse](docs/V1beta1CreateServiceUserSecretResponse.md)
- [V1beta1CreateUserPreferencesResponse](docs/V1beta1CreateUserPreferencesResponse.md)
- [V1beta1CreateUserResponse](docs/V1beta1CreateUserResponse.md)
+ - [V1beta1DelegatedCheckoutResponse](docs/V1beta1DelegatedCheckoutResponse.md)
- [V1beta1DescribePreferencesResponse](docs/V1beta1DescribePreferencesResponse.md)
- [V1beta1Domain](docs/V1beta1Domain.md)
- [V1beta1Feature](docs/V1beta1Feature.md)
@@ -407,6 +411,7 @@ Class | Method | HTTP request | Description
- [V1beta1ListOrganizationsResponse](docs/V1beta1ListOrganizationsResponse.md)
- [V1beta1ListPermissionsResponse](docs/V1beta1ListPermissionsResponse.md)
- [V1beta1ListPlansResponse](docs/V1beta1ListPlansResponse.md)
+ - [V1beta1ListPlatformUsersResponse](docs/V1beta1ListPlatformUsersResponse.md)
- [V1beta1ListPoliciesResponse](docs/V1beta1ListPoliciesResponse.md)
- [V1beta1ListPreferencesResponse](docs/V1beta1ListPreferencesResponse.md)
- [V1beta1ListProjectAdminsResponse](docs/V1beta1ListProjectAdminsResponse.md)
diff --git a/docs/AdminServiceDelegatedCheckoutRequest.md b/docs/AdminServiceDelegatedCheckoutRequest.md
new file mode 100644
index 0000000..2de34c9
--- /dev/null
+++ b/docs/AdminServiceDelegatedCheckoutRequest.md
@@ -0,0 +1,29 @@
+# AdminServiceDelegatedCheckoutRequest
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**subscription_body** | [**V1beta1CheckoutSubscriptionBody**](V1beta1CheckoutSubscriptionBody.md) | | [optional]
+**feature_body** | [**V1beta1CheckoutFeatureBody**](V1beta1CheckoutFeatureBody.md) | | [optional]
+
+## Example
+
+```python
+from frontier_api.models.admin_service_delegated_checkout_request import AdminServiceDelegatedCheckoutRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of AdminServiceDelegatedCheckoutRequest from a JSON string
+admin_service_delegated_checkout_request_instance = AdminServiceDelegatedCheckoutRequest.from_json(json)
+# print the JSON string representation of the object
+print AdminServiceDelegatedCheckoutRequest.to_json()
+
+# convert the object into a dict
+admin_service_delegated_checkout_request_dict = admin_service_delegated_checkout_request_instance.to_dict()
+# create an instance of AdminServiceDelegatedCheckoutRequest from a dict
+admin_service_delegated_checkout_request_form_dict = admin_service_delegated_checkout_request.from_dict(admin_service_delegated_checkout_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/CheckoutApi.md b/docs/CheckoutApi.md
index 490a613..5653803 100644
--- a/docs/CheckoutApi.md
+++ b/docs/CheckoutApi.md
@@ -4,10 +4,100 @@ All URIs are relative to *http://127.0.0.1:7400*
Method | HTTP request | Description
------------- | ------------- | -------------
+[**admin_service_delegated_checkout**](CheckoutApi.md#admin_service_delegated_checkout) | **POST** /v1beta1/admin/organizations/{orgId}/billing/{billingId}/checkouts | Checkout a feature or subscription
[**frontier_service_create_checkout**](CheckoutApi.md#frontier_service_create_checkout) | **POST** /v1beta1/organizations/{orgId}/billing/{billingId}/checkouts | Checkout a feature or subscription
[**frontier_service_list_checkouts**](CheckoutApi.md#frontier_service_list_checkouts) | **GET** /v1beta1/organizations/{orgId}/billing/{billingId}/checkouts | List checkouts
+# **admin_service_delegated_checkout**
+> V1beta1DelegatedCheckoutResponse admin_service_delegated_checkout(org_id, billing_id, body)
+
+Checkout a feature or subscription
+
+Checkout a feature to buy it one time or start a subscription plan on a billing account manually. It bypasses billing engine.
+
+### Example
+
+* Basic Authentication (Basic):
+```python
+import time
+import os
+import frontier_api
+from frontier_api.models.admin_service_delegated_checkout_request import AdminServiceDelegatedCheckoutRequest
+from frontier_api.models.v1beta1_delegated_checkout_response import V1beta1DelegatedCheckoutResponse
+from frontier_api.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to http://127.0.0.1:7400
+# See configuration.py for a list of all supported configuration parameters.
+configuration = frontier_api.Configuration(
+ host = "http://127.0.0.1:7400"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure HTTP basic authorization: Basic
+configuration = frontier_api.Configuration(
+ username = os.environ["USERNAME"],
+ password = os.environ["PASSWORD"]
+)
+
+# Enter a context with an instance of the API client
+with frontier_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = frontier_api.CheckoutApi(api_client)
+ org_id = 'org_id_example' # str |
+ billing_id = 'billing_id_example' # str | ID of the billing account to update the subscription for
+ body = frontier_api.AdminServiceDelegatedCheckoutRequest() # AdminServiceDelegatedCheckoutRequest |
+
+ try:
+ # Checkout a feature or subscription
+ api_response = api_instance.admin_service_delegated_checkout(org_id, billing_id, body)
+ print("The response of CheckoutApi->admin_service_delegated_checkout:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling CheckoutApi->admin_service_delegated_checkout: %s\n" % e)
+```
+
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **org_id** | **str**| |
+ **billing_id** | **str**| ID of the billing account to update the subscription for |
+ **body** | [**AdminServiceDelegatedCheckoutRequest**](AdminServiceDelegatedCheckoutRequest.md)| |
+
+### Return type
+
+[**V1beta1DelegatedCheckoutResponse**](V1beta1DelegatedCheckoutResponse.md)
+
+### Authorization
+
+[Basic](../README.md#Basic)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | A successful response. | - |
+**400** | Bad Request - The request was malformed or contained invalid parameters. | - |
+**401** | Unauthorized - Authentication is required | - |
+**403** | Forbidden - User does not have permission to access the resource | - |
+**404** | Not Found - The requested resource was not found | - |
+**500** | Internal Server Error. Returned when theres is something wrong with Frontier server. | - |
+**0** | An unexpected error response. | - |
+
+[[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)
+
# **frontier_service_create_checkout**
> V1beta1CreateCheckoutResponse frontier_service_create_checkout(org_id, billing_id, body)
diff --git a/docs/GroupApi.md b/docs/GroupApi.md
index 2b5f5da..ddc1b8d 100644
--- a/docs/GroupApi.md
+++ b/docs/GroupApi.md
@@ -712,7 +712,7 @@ 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)
# **frontier_service_list_organization_groups**
-> V1beta1ListOrganizationGroupsResponse frontier_service_list_organization_groups(org_id, state=state, group_ids=group_ids, with_members=with_members)
+> V1beta1ListOrganizationGroupsResponse frontier_service_list_organization_groups(org_id, state=state, group_ids=group_ids, with_members=with_members, with_member_count=with_member_count)
List organization groups
@@ -754,10 +754,11 @@ with frontier_api.ApiClient(configuration) as api_client:
state = 'state_example' # str | The state of the group to filter by. It can be enabled or disabled. (optional)
group_ids = ['group_ids_example'] # List[str] | (optional)
with_members = True # bool | (optional)
+ with_member_count = True # bool | (optional)
try:
# List organization groups
- api_response = api_instance.frontier_service_list_organization_groups(org_id, state=state, group_ids=group_ids, with_members=with_members)
+ api_response = api_instance.frontier_service_list_organization_groups(org_id, state=state, group_ids=group_ids, with_members=with_members, with_member_count=with_member_count)
print("The response of GroupApi->frontier_service_list_organization_groups:\n")
pprint(api_response)
except Exception as e:
@@ -774,6 +775,7 @@ Name | Type | Description | Notes
**state** | **str**| The state of the group to filter by. It can be enabled or disabled. | [optional]
**group_ids** | [**List[str]**](str.md)| | [optional]
**with_members** | **bool**| | [optional]
+ **with_member_count** | **bool**| | [optional]
### Return type
diff --git a/docs/OrganizationApi.md b/docs/OrganizationApi.md
index 01adf60..bcca41e 100644
--- a/docs/OrganizationApi.md
+++ b/docs/OrganizationApi.md
@@ -1564,7 +1564,7 @@ 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)
# **frontier_service_list_organization_projects**
-> V1beta1ListOrganizationProjectsResponse frontier_service_list_organization_projects(id, state=state)
+> V1beta1ListOrganizationProjectsResponse frontier_service_list_organization_projects(id, state=state, with_member_count=with_member_count)
Get organization projects
@@ -1604,10 +1604,11 @@ with frontier_api.ApiClient(configuration) as api_client:
api_instance = frontier_api.OrganizationApi(api_client)
id = 'id_example' # str |
state = 'state_example' # str | Filter projects by state. If not specified, all projects are returned.
*Possible values:* `enabled` or `disabled` (optional)
+ with_member_count = True # bool | (optional)
try:
# Get organization projects
- api_response = api_instance.frontier_service_list_organization_projects(id, state=state)
+ api_response = api_instance.frontier_service_list_organization_projects(id, state=state, with_member_count=with_member_count)
print("The response of OrganizationApi->frontier_service_list_organization_projects:\n")
pprint(api_response)
except Exception as e:
@@ -1622,6 +1623,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| |
**state** | **str**| Filter projects by state. If not specified, all projects are returned. <br/> *Possible values:* `enabled` or `disabled` | [optional]
+ **with_member_count** | **bool**| | [optional]
### Return type
diff --git a/docs/PlatformApi.md b/docs/PlatformApi.md
index 569705d..2524e5e 100644
--- a/docs/PlatformApi.md
+++ b/docs/PlatformApi.md
@@ -5,6 +5,7 @@ All URIs are relative to *http://127.0.0.1:7400*
Method | HTTP request | Description
------------- | ------------- | -------------
[**admin_service_add_platform_user**](PlatformApi.md#admin_service_add_platform_user) | **POST** /v1beta1/admin/platform/users | Add platform user
+[**admin_service_list_platform_users**](PlatformApi.md#admin_service_list_platform_users) | **GET** /v1beta1/admin/platform/users | List platform users
# **admin_service_add_platform_user**
@@ -12,7 +13,7 @@ Method | HTTP request | Description
Add platform user
-Adds a user to a platform.
+Adds a user to the platform.
### Example
@@ -91,3 +92,83 @@ 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)
+# **admin_service_list_platform_users**
+> V1beta1ListPlatformUsersResponse admin_service_list_platform_users()
+
+List platform users
+
+Lists all the users added to the platform.
+
+### Example
+
+* Basic Authentication (Basic):
+```python
+import time
+import os
+import frontier_api
+from frontier_api.models.v1beta1_list_platform_users_response import V1beta1ListPlatformUsersResponse
+from frontier_api.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to http://127.0.0.1:7400
+# See configuration.py for a list of all supported configuration parameters.
+configuration = frontier_api.Configuration(
+ host = "http://127.0.0.1:7400"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure HTTP basic authorization: Basic
+configuration = frontier_api.Configuration(
+ username = os.environ["USERNAME"],
+ password = os.environ["PASSWORD"]
+)
+
+# Enter a context with an instance of the API client
+with frontier_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = frontier_api.PlatformApi(api_client)
+
+ try:
+ # List platform users
+ api_response = api_instance.admin_service_list_platform_users()
+ print("The response of PlatformApi->admin_service_list_platform_users:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling PlatformApi->admin_service_list_platform_users: %s\n" % e)
+```
+
+
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+[**V1beta1ListPlatformUsersResponse**](V1beta1ListPlatformUsersResponse.md)
+
+### Authorization
+
+[Basic](../README.md#Basic)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | A successful response. | - |
+**400** | Bad Request - The request was malformed or contained invalid parameters. | - |
+**401** | Unauthorized - Authentication is required | - |
+**403** | Forbidden - User does not have permission to access the resource | - |
+**404** | Not Found - The requested resource was not found | - |
+**500** | Internal Server Error. Returned when theres is something wrong with Frontier server. | - |
+**0** | An unexpected error response. | - |
+
+[[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/RelationApi.md b/docs/RelationApi.md
index 280e042..ca838e5 100644
--- a/docs/RelationApi.md
+++ b/docs/RelationApi.md
@@ -11,7 +11,7 @@ Method | HTTP request | Description
# **admin_service_list_relations**
-> V1beta1ListRelationsResponse admin_service_list_relations()
+> V1beta1ListRelationsResponse admin_service_list_relations(subject=subject, object=object)
List all relations
@@ -47,10 +47,12 @@ configuration = frontier_api.Configuration(
with frontier_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = frontier_api.RelationApi(api_client)
+ subject = 'subject_example' # str | The subject to filter by. (optional)
+ object = 'object_example' # str | The object to filter by. (optional)
try:
# List all relations
- api_response = api_instance.admin_service_list_relations()
+ api_response = api_instance.admin_service_list_relations(subject=subject, object=object)
print("The response of RelationApi->admin_service_list_relations:\n")
pprint(api_response)
except Exception as e:
@@ -60,7 +62,11 @@ with frontier_api.ApiClient(configuration) as api_client:
### Parameters
-This endpoint does not need any parameter.
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **subject** | **str**| The subject to filter by. | [optional]
+ **object** | **str**| The object to filter by. | [optional]
### Return type
diff --git a/docs/UserApi.md b/docs/UserApi.md
index ba18222..8587251 100644
--- a/docs/UserApi.md
+++ b/docs/UserApi.md
@@ -608,7 +608,7 @@ 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)
# **frontier_service_list_current_user_groups**
-> V1beta1ListCurrentUserGroupsResponse frontier_service_list_current_user_groups(org_id=org_id, with_permissions=with_permissions)
+> V1beta1ListCurrentUserGroupsResponse frontier_service_list_current_user_groups(org_id=org_id, with_permissions=with_permissions, with_member_count=with_member_count)
List my groups
@@ -646,10 +646,11 @@ with frontier_api.ApiClient(configuration) as api_client:
api_instance = frontier_api.UserApi(api_client)
org_id = 'org_id_example' # str | org_id is optional filter over an organization (optional)
with_permissions = ['with_permissions_example'] # List[str] | (optional)
+ with_member_count = True # bool | (optional)
try:
# List my groups
- api_response = api_instance.frontier_service_list_current_user_groups(org_id=org_id, with_permissions=with_permissions)
+ api_response = api_instance.frontier_service_list_current_user_groups(org_id=org_id, with_permissions=with_permissions, with_member_count=with_member_count)
print("The response of UserApi->frontier_service_list_current_user_groups:\n")
pprint(api_response)
except Exception as e:
@@ -664,6 +665,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**org_id** | **str**| org_id is optional filter over an organization | [optional]
**with_permissions** | [**List[str]**](str.md)| | [optional]
+ **with_member_count** | **bool**| | [optional]
### Return type
@@ -940,7 +942,7 @@ 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)
# **frontier_service_list_projects_by_current_user**
-> V1beta1ListProjectsByCurrentUserResponse frontier_service_list_projects_by_current_user(org_id=org_id, with_permissions=with_permissions)
+> V1beta1ListProjectsByCurrentUserResponse frontier_service_list_projects_by_current_user(org_id=org_id, with_permissions=with_permissions, non_inherited=non_inherited, with_member_count=with_member_count)
Get my projects
@@ -980,10 +982,12 @@ with frontier_api.ApiClient(configuration) as api_client:
api_instance = frontier_api.UserApi(api_client)
org_id = 'org_id_example' # str | org_id is optional and filter projects by org (optional)
with_permissions = ['with_permissions_example'] # List[str] | list of permissions needs to be checked against each project query params are set as with_permissions=get&with_permissions=delete to be represented as array (optional)
+ non_inherited = True # bool | Note: this is a bad design and would recommend against using this filter It is used to list only projects which are explicitly given permission to user. A user could get permission to access a project either via getting access from organization level role or a group. But for some reason we want only users who could have inherited these permissions from top but we only want explictly added ones. (optional)
+ with_member_count = True # bool | (optional)
try:
# Get my projects
- api_response = api_instance.frontier_service_list_projects_by_current_user(org_id=org_id, with_permissions=with_permissions)
+ api_response = api_instance.frontier_service_list_projects_by_current_user(org_id=org_id, with_permissions=with_permissions, non_inherited=non_inherited, with_member_count=with_member_count)
print("The response of UserApi->frontier_service_list_projects_by_current_user:\n")
pprint(api_response)
except Exception as e:
@@ -998,6 +1002,8 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**org_id** | **str**| org_id is optional and filter projects by org | [optional]
**with_permissions** | [**List[str]**](str.md)| list of permissions needs to be checked against each project query params are set as with_permissions=get&with_permissions=delete to be represented as array | [optional]
+ **non_inherited** | **bool**| Note: this is a bad design and would recommend against using this filter It is used to list only projects which are explicitly given permission to user. A user could get permission to access a project either via getting access from organization level role or a group. But for some reason we want only users who could have inherited these permissions from top but we only want explictly added ones. | [optional]
+ **with_member_count** | **bool**| | [optional]
### Return type
diff --git a/docs/V1beta1DelegatedCheckoutResponse.md b/docs/V1beta1DelegatedCheckoutResponse.md
new file mode 100644
index 0000000..4862c0b
--- /dev/null
+++ b/docs/V1beta1DelegatedCheckoutResponse.md
@@ -0,0 +1,28 @@
+# V1beta1DelegatedCheckoutResponse
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**checkout_session** | [**V1beta1CheckoutSession**](V1beta1CheckoutSession.md) | | [optional]
+
+## Example
+
+```python
+from frontier_api.models.v1beta1_delegated_checkout_response import V1beta1DelegatedCheckoutResponse
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of V1beta1DelegatedCheckoutResponse from a JSON string
+v1beta1_delegated_checkout_response_instance = V1beta1DelegatedCheckoutResponse.from_json(json)
+# print the JSON string representation of the object
+print V1beta1DelegatedCheckoutResponse.to_json()
+
+# convert the object into a dict
+v1beta1_delegated_checkout_response_dict = v1beta1_delegated_checkout_response_instance.to_dict()
+# create an instance of V1beta1DelegatedCheckoutResponse from a dict
+v1beta1_delegated_checkout_response_form_dict = v1beta1_delegated_checkout_response.from_dict(v1beta1_delegated_checkout_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/V1beta1Group.md b/docs/V1beta1Group.md
index c5e1505..c7b31f6 100644
--- a/docs/V1beta1Group.md
+++ b/docs/V1beta1Group.md
@@ -12,6 +12,7 @@ Name | Type | Description | Notes
**created_at** | **datetime** | The time the group was created. | [optional]
**updated_at** | **datetime** | The time the group was last updated. | [optional]
**users** | [**List[V1beta1User]**](V1beta1User.md) | | [optional] [readonly]
+**members_count** | **int** | The number of members explicitly added in the project. | [optional] [readonly]
## Example
diff --git a/docs/V1beta1ListPlatformUsersResponse.md b/docs/V1beta1ListPlatformUsersResponse.md
new file mode 100644
index 0000000..40f3fed
--- /dev/null
+++ b/docs/V1beta1ListPlatformUsersResponse.md
@@ -0,0 +1,29 @@
+# V1beta1ListPlatformUsersResponse
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**users** | [**List[V1beta1User]**](V1beta1User.md) | | [optional]
+**serviceusers** | [**List[V1beta1ServiceUser]**](V1beta1ServiceUser.md) | | [optional]
+
+## Example
+
+```python
+from frontier_api.models.v1beta1_list_platform_users_response import V1beta1ListPlatformUsersResponse
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of V1beta1ListPlatformUsersResponse from a JSON string
+v1beta1_list_platform_users_response_instance = V1beta1ListPlatformUsersResponse.from_json(json)
+# print the JSON string representation of the object
+print V1beta1ListPlatformUsersResponse.to_json()
+
+# convert the object into a dict
+v1beta1_list_platform_users_response_dict = v1beta1_list_platform_users_response_instance.to_dict()
+# create an instance of V1beta1ListPlatformUsersResponse from a dict
+v1beta1_list_platform_users_response_form_dict = v1beta1_list_platform_users_response.from_dict(v1beta1_list_platform_users_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/V1beta1Project.md b/docs/V1beta1Project.md
index 8b6f62c..0f37e52 100644
--- a/docs/V1beta1Project.md
+++ b/docs/V1beta1Project.md
@@ -11,6 +11,7 @@ Name | Type | Description | Notes
**metadata** | **object** | | [optional]
**created_at** | **datetime** | The time the project was created. | [optional]
**updated_at** | **datetime** | The time the project was last updated. | [optional]
+**members_count** | **int** | The number of members explicitly added in the project. | [optional] [readonly]
## Example
diff --git a/example/list.py b/example/list.py
deleted file mode 100644
index d87c92c..0000000
--- a/example/list.py
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/env python3
-"""
-Example demonstrating how to list users using python client
-"""
-
-from pprint import pprint
-from frontier_api import *
-from frontier_api.api import user_api
-from frontier_api.models.v1beta1_list_users_response import V1beta1ListUsersResponse
-
-HOST = "http://127.0.0.1:7400"
-
-# Defining the host is optional and defaults to http://127.0.0.1:7400
-# See configuration.py for a list of all supported configuration parameters.
-configuration = Configuration(
- host = HOST
-)
-
-def fetch_users():
- # Enter a context with an instance of the API client
- with ApiClient(configuration) as api_client:
- # Create an instance of the API class
- api_instance = user_api.UserApi(api_client)
- try:
- api_response = api_instance.frontier_service_list_users()
- assert isinstance(api_response, V1beta1ListUsersResponse)
- pprint(api_response)
- except ApiException as e:
- print("Exception when calling user_api->FrontierServiceListUsers: %s\n" % e)
-
-
-if __name__ == "__main__":
- fetch_users()
\ No newline at end of file
diff --git a/frontier_api/__init__.py b/frontier_api/__init__.py
index feff2ef..953eeb3 100644
--- a/frontier_api/__init__.py
+++ b/frontier_api/__init__.py
@@ -56,6 +56,7 @@
from frontier_api.exceptions import ApiException
# import models into sdk package
+from frontier_api.models.admin_service_delegated_checkout_request import AdminServiceDelegatedCheckoutRequest
from frontier_api.models.billing_account_address import BillingAccountAddress
from frontier_api.models.billing_account_balance import BillingAccountBalance
from frontier_api.models.frontier_service_add_group_users_request import FrontierServiceAddGroupUsersRequest
@@ -132,6 +133,7 @@
from frontier_api.models.v1beta1_create_service_user_secret_response import V1beta1CreateServiceUserSecretResponse
from frontier_api.models.v1beta1_create_user_preferences_response import V1beta1CreateUserPreferencesResponse
from frontier_api.models.v1beta1_create_user_response import V1beta1CreateUserResponse
+from frontier_api.models.v1beta1_delegated_checkout_response import V1beta1DelegatedCheckoutResponse
from frontier_api.models.v1beta1_describe_preferences_response import V1beta1DescribePreferencesResponse
from frontier_api.models.v1beta1_domain import V1beta1Domain
from frontier_api.models.v1beta1_feature import V1beta1Feature
@@ -197,6 +199,7 @@
from frontier_api.models.v1beta1_list_organizations_response import V1beta1ListOrganizationsResponse
from frontier_api.models.v1beta1_list_permissions_response import V1beta1ListPermissionsResponse
from frontier_api.models.v1beta1_list_plans_response import V1beta1ListPlansResponse
+from frontier_api.models.v1beta1_list_platform_users_response import V1beta1ListPlatformUsersResponse
from frontier_api.models.v1beta1_list_policies_response import V1beta1ListPoliciesResponse
from frontier_api.models.v1beta1_list_preferences_response import V1beta1ListPreferencesResponse
from frontier_api.models.v1beta1_list_project_admins_response import V1beta1ListProjectAdminsResponse
diff --git a/frontier_api/api/audit_log_api.py b/frontier_api/api/audit_log_api.py
index 0749e99..d85a499 100644
--- a/frontier_api/api/audit_log_api.py
+++ b/frontier_api/api/audit_log_api.py
@@ -13,24 +13,18 @@
""" # noqa: E501
+import re # noqa: F401
import io
import warnings
-from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
-from typing import Dict, List, Optional, Tuple, Union, Any
+from pydantic import validate_arguments, ValidationError
-try:
- from typing import Annotated
-except ImportError:
- from typing_extensions import Annotated
-
-from pydantic import Field
from typing_extensions import Annotated
from datetime import datetime
-from pydantic import StrictStr
+from pydantic import Field, StrictStr
-from typing import Any, Dict, Optional, Union
+from typing import Any, Dict, Optional
from frontier_api.models.frontier_service_create_organization_audit_logs_request import FrontierServiceCreateOrganizationAuditLogsRequest
from frontier_api.models.v1beta1_get_organization_audit_log_response import V1beta1GetOrganizationAuditLogResponse
@@ -38,7 +32,10 @@
from frontier_api.api_client import ApiClient
from frontier_api.api_response import ApiResponse
-from frontier_api.rest import RESTResponseType
+from frontier_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class AuditLogApi:
@@ -53,634 +50,329 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client
+ @validate_arguments
+ def frontier_service_create_organization_audit_logs(self, org_id : StrictStr, body : FrontierServiceCreateOrganizationAuditLogsRequest, **kwargs) -> object: # noqa: E501
+ """Create audit log # noqa: E501
- @validate_call
- def frontier_service_create_organization_audit_logs(
- self,
- org_id: StrictStr,
- body: FrontierServiceCreateOrganizationAuditLogsRequest,
- _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 audit log
+ Create new audit logs in a batch. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Create new audit logs in a batch.
+ >>> thread = api.frontier_service_create_organization_audit_logs(org_id, body, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
:param body: (required)
:type body: FrontierServiceCreateOrganizationAuditLogsRequest
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_organization_audit_logs_serialize(
- org_id=org_id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_organization_audit_logs_with_http_info(
- self,
- org_id: StrictStr,
- body: FrontierServiceCreateOrganizationAuditLogsRequest,
- _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 audit log
-
- Create new audit logs in a batch.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_create_organization_audit_logs_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_create_organization_audit_logs_with_http_info(org_id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_create_organization_audit_logs_with_http_info(self, org_id : StrictStr, body : FrontierServiceCreateOrganizationAuditLogsRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Create audit log # noqa: E501
+
+ Create new audit logs in a batch. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_create_organization_audit_logs_with_http_info(org_id, body, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
:param body: (required)
:type body: FrontierServiceCreateOrganizationAuditLogsRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_organization_audit_logs_serialize(
- org_id=org_id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ _params = locals()
-
- @validate_call
- def frontier_service_create_organization_audit_logs_without_preload_content(
- self,
- org_id: StrictStr,
- body: FrontierServiceCreateOrganizationAuditLogsRequest,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'org_id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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 audit log
-
- Create new audit logs in a batch.
-
- :param org_id: (required)
- :type org_id: str
- :param body: (required)
- :type body: FrontierServiceCreateOrganizationAuditLogsRequest
- :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._frontier_service_create_organization_audit_logs_serialize(
- org_id=org_id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_create_organization_audit_logs_serialize(
- self,
- org_id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_create_organization_audit_logs" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "object",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/organization/{orgId}/auditlogs',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organization/{orgId}/auditlogs', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_get_organization_audit_log(self, org_id : StrictStr, id : StrictStr, **kwargs) -> V1beta1GetOrganizationAuditLogResponse: # noqa: E501
+ """Get audit log # noqa: E501
+ Get an audit log by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
-
- @validate_call
- def frontier_service_get_organization_audit_log(
- self,
- org_id: StrictStr,
- id: StrictStr,
- _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,
- ) -> V1beta1GetOrganizationAuditLogResponse:
- """Get audit log
-
- Get an audit log by ID.
+ >>> thread = api.frontier_service_get_organization_audit_log(org_id, id, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
:param id: (required)
:type id: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_get_organization_audit_log_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetOrganizationAuditLogResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_organization_audit_log_with_http_info(
- self,
- org_id: StrictStr,
- id: StrictStr,
- _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[V1beta1GetOrganizationAuditLogResponse]:
- """Get audit log
-
- Get an audit log by ID.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1GetOrganizationAuditLogResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_get_organization_audit_log_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_get_organization_audit_log_with_http_info(org_id, id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_get_organization_audit_log_with_http_info(self, org_id : StrictStr, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """Get audit log # noqa: E501
+
+ Get an audit log by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_get_organization_audit_log_with_http_info(org_id, id, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
:param id: (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_get_organization_audit_log_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetOrganizationAuditLogResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1GetOrganizationAuditLogResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_get_organization_audit_log_without_preload_content(
- self,
- org_id: StrictStr,
- id: StrictStr,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'org_id',
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Get audit log
-
- Get an audit log by ID.
-
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :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._frontier_service_get_organization_audit_log_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetOrganizationAuditLogResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
)
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_get_organization_audit_log" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_get_organization_audit_log_serialize(
- self,
- org_id,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _collection_formats = {}
- _host = None
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/organization/{orgId}/auditlogs/{id}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ _response_types_map = {
+ '200': "V1beta1GetOrganizationAuditLogResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
+
+ return self.api_client.call_api(
+ '/v1beta1/organization/{orgId}/auditlogs/{id}', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_organization_audit_logs(self, org_id : StrictStr, source : Optional[StrictStr] = None, action : Optional[StrictStr] = None, start_time : Annotated[Optional[datetime], Field(description="start_time and end_time are inclusive")] = None, end_time : Optional[datetime] = None, **kwargs) -> V1beta1ListOrganizationAuditLogsResponse: # noqa: E501
+ """List audit logs # noqa: E501
+ Returns a list of audit logs of an organization in Frontier. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_list_organization_audit_logs(
- self,
- org_id: StrictStr,
- source: Optional[StrictStr] = None,
- action: Optional[StrictStr] = None,
- start_time: Annotated[Optional[datetime], Field(description="start_time and end_time are inclusive")] = None,
- end_time: Optional[datetime] = None,
- _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,
- ) -> V1beta1ListOrganizationAuditLogsResponse:
- """List audit logs
-
- Returns a list of audit logs of an organization in Frontier.
+ >>> thread = api.frontier_service_list_organization_audit_logs(org_id, source, action, start_time, end_time, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
@@ -692,85 +384,33 @@ def frontier_service_list_organization_audit_logs(
:type start_time: datetime
:param end_time:
:type end_time: datetime
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_organization_audit_logs_serialize(
- org_id=org_id,
- source=source,
- action=action,
- start_time=start_time,
- end_time=end_time,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationAuditLogsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_organization_audit_logs_with_http_info(
- self,
- org_id: StrictStr,
- source: Optional[StrictStr] = None,
- action: Optional[StrictStr] = None,
- start_time: Annotated[Optional[datetime], Field(description="start_time and end_time are inclusive")] = None,
- end_time: Optional[datetime] = None,
- _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[V1beta1ListOrganizationAuditLogsResponse]:
- """List audit logs
-
- Returns a list of audit logs of an organization in Frontier.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListOrganizationAuditLogsResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_organization_audit_logs_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_organization_audit_logs_with_http_info(org_id, source, action, start_time, end_time, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_organization_audit_logs_with_http_info(self, org_id : StrictStr, source : Optional[StrictStr] = None, action : Optional[StrictStr] = None, start_time : Annotated[Optional[datetime], Field(description="start_time and end_time are inclusive")] = None, end_time : Optional[datetime] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """List audit logs # noqa: E501
+
+ Returns a list of audit logs of an organization in Frontier. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_organization_audit_logs_with_http_info(org_id, source, action, start_time, end_time, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
@@ -782,242 +422,126 @@ def frontier_service_list_organization_audit_logs_with_http_info(
:type start_time: datetime
:param end_time:
:type end_time: datetime
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_organization_audit_logs_serialize(
- org_id=org_id,
- source=source,
- action=action,
- start_time=start_time,
- end_time=end_time,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationAuditLogsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListOrganizationAuditLogsResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'org_id',
+ 'source',
+ 'action',
+ 'start_time',
+ 'end_time'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_organization_audit_logs" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- @validate_call
- def frontier_service_list_organization_audit_logs_without_preload_content(
- self,
- org_id: StrictStr,
- source: Optional[StrictStr] = None,
- action: Optional[StrictStr] = None,
- start_time: Annotated[Optional[datetime], Field(description="start_time and end_time are inclusive")] = None,
- end_time: Optional[datetime] = None,
- _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:
- """List audit logs
+ _collection_formats = {}
- Returns a list of audit logs of an organization in Frontier.
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- :param org_id: (required)
- :type org_id: str
- :param source:
- :type source: str
- :param action:
- :type action: str
- :param start_time: start_time and end_time are inclusive
- :type start_time: datetime
- :param end_time:
- :type end_time: datetime
- :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._frontier_service_list_organization_audit_logs_serialize(
- org_id=org_id,
- source=source,
- action=action,
- start_time=start_time,
- end_time=end_time,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationAuditLogsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_list_organization_audit_logs_serialize(
- self,
- org_id,
- source,
- action,
- start_time,
- end_time,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _host = None
-
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the query parameters
+ _query_params = []
+ if _params.get('source') is not None: # noqa: E501
+ _query_params.append(('source', _params['source']))
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ if _params.get('action') is not None: # noqa: E501
+ _query_params.append(('action', _params['action']))
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- # process the query parameters
- if source is not None:
-
- _query_params.append(('source', source))
-
- if action is not None:
-
- _query_params.append(('action', action))
-
- if start_time is not None:
- if isinstance(start_time, datetime):
- _query_params.append(
- (
- 'startTime',
- start_time.strftime(
- self.api_client.configuration.datetime_format
- )
- )
- )
+ if _params.get('start_time') is not None: # noqa: E501
+ if isinstance(_params['start_time'], datetime):
+ _query_params.append(('startTime', _params['start_time'].strftime(self.api_client.configuration.datetime_format)))
else:
- _query_params.append(('startTime', start_time))
-
- if end_time is not None:
- if isinstance(end_time, datetime):
- _query_params.append(
- (
- 'endTime',
- end_time.strftime(
- self.api_client.configuration.datetime_format
- )
- )
- )
+ _query_params.append(('startTime', _params['start_time']))
+
+ if _params.get('end_time') is not None: # noqa: E501
+ if isinstance(_params['end_time'], datetime):
+ _query_params.append(('endTime', _params['end_time'].strftime(self.api_client.configuration.datetime_format)))
else:
- _query_params.append(('endTime', end_time))
-
+ _query_params.append(('endTime', _params['end_time']))
+
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/organization/{orgId}/auditlogs',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ _response_types_map = {
+ '200': "V1beta1ListOrganizationAuditLogsResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
+
+ return self.api_client.call_api(
+ '/v1beta1/organization/{orgId}/auditlogs', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
diff --git a/frontier_api/api/authn_api.py b/frontier_api/api/authn_api.py
index 31c264b..957ac03 100644
--- a/frontier_api/api/authn_api.py
+++ b/frontier_api/api/authn_api.py
@@ -13,22 +13,16 @@
""" # noqa: E501
+import re # noqa: F401
import io
import warnings
-from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
-from typing import Dict, List, Optional, Tuple, Union, Any
+from pydantic import validate_arguments, ValidationError
-try:
- from typing import Annotated
-except ImportError:
- from typing_extensions import Annotated
-
-from pydantic import Field
from typing_extensions import Annotated
-from pydantic import StrictBool, StrictStr
+from pydantic import Field, StrictBool, StrictStr
-from typing import Any, Dict, Optional, Union
+from typing import Any, Dict, Optional
from frontier_api.models.frontier_service_authenticate2_request import FrontierServiceAuthenticate2Request
from frontier_api.models.v1beta1_auth_callback_request import V1beta1AuthCallbackRequest
@@ -39,7 +33,10 @@
from frontier_api.api_client import ApiClient
from frontier_api.api_response import ApiResponse
-from frontier_api.rest import RESTResponseType
+from frontier_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class AuthnApi:
@@ -54,30 +51,16 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client
+ @validate_arguments
+ def frontier_service_auth_callback(self, strategy_name : Annotated[Optional[StrictStr], Field(description="strategy_name will not be set for oidc but can be utilized for methods like email magic links")] = None, state : Annotated[Optional[StrictStr], Field(description="for oidc & magic links")] = None, code : Optional[StrictStr] = None, state_options : Annotated[Optional[Dict[str, Any]], Field(description="state_options has additional configurations for the authentication flow at hand for example, in case of passkey, it has challenge and public key")] = None, **kwargs) -> object: # noqa: E501
+ """Callback from a strategy # noqa: E501
- @validate_call
- def frontier_service_auth_callback(
- self,
- strategy_name: Annotated[Optional[StrictStr], Field(description="strategy_name will not be set for oidc but can be utilized for methods like email magic links")] = None,
- state: Annotated[Optional[StrictStr], Field(description="for oidc & magic links")] = None,
- code: Optional[StrictStr] = None,
- state_options: Annotated[Optional[Dict[str, Any]], Field(description="state_options has additional configurations for the authentication flow at hand for example, in case of passkey, it has challenge and public key")] = None,
- _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:
- """Callback from a strategy
+ Callback from a strategy. This is the endpoint where the strategy will redirect the user after successful authentication. This endpoint will be called with the code and state query parameters. The code will be used to get the access token from the strategy and the state will be used to get the return_to url from the session and redirect the user to that url. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Callback from a strategy. This is the endpoint where the strategy will redirect the user after successful authentication. This endpoint will be called with the code and state query parameters. The code will be used to get the access token from the strategy and the state will be used to get the return_to url from the session and redirect the user to that url.
+ >>> thread = api.frontier_service_auth_callback(strategy_name, state, code, state_options, async_req=True)
+ >>> result = thread.get()
:param strategy_name: strategy_name will not be set for oidc but can be utilized for methods like email magic links
:type strategy_name: str
@@ -87,83 +70,33 @@ def frontier_service_auth_callback(
:type code: str
:param state_options: state_options has additional configurations for the authentication flow at hand for example, in case of passkey, it has challenge and public key
:type state_options: object
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_auth_callback_serialize(
- strategy_name=strategy_name,
- state=state,
- code=code,
- state_options=state_options,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_auth_callback_with_http_info(
- self,
- strategy_name: Annotated[Optional[StrictStr], Field(description="strategy_name will not be set for oidc but can be utilized for methods like email magic links")] = None,
- state: Annotated[Optional[StrictStr], Field(description="for oidc & magic links")] = None,
- code: Optional[StrictStr] = None,
- state_options: Annotated[Optional[Dict[str, Any]], Field(description="state_options has additional configurations for the authentication flow at hand for example, in case of passkey, it has challenge and public key")] = None,
- _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]:
- """Callback from a strategy
-
- Callback from a strategy. This is the endpoint where the strategy will redirect the user after successful authentication. This endpoint will be called with the code and state query parameters. The code will be used to get the access token from the strategy and the state will be used to get the return_to url from the session and redirect the user to that url.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_auth_callback_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_auth_callback_with_http_info(strategy_name, state, code, state_options, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_auth_callback_with_http_info(self, strategy_name : Annotated[Optional[StrictStr], Field(description="strategy_name will not be set for oidc but can be utilized for methods like email magic links")] = None, state : Annotated[Optional[StrictStr], Field(description="for oidc & magic links")] = None, code : Optional[StrictStr] = None, state_options : Annotated[Optional[Dict[str, Any]], Field(description="state_options has additional configurations for the authentication flow at hand for example, in case of passkey, it has challenge and public key")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """Callback from a strategy # noqa: E501
+
+ Callback from a strategy. This is the endpoint where the strategy will redirect the user after successful authentication. This endpoint will be called with the code and state query parameters. The code will be used to get the access token from the strategy and the state will be used to get the return_to url from the session and redirect the user to that url. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_auth_callback_with_http_info(strategy_name, state, code, state_options, async_req=True)
+ >>> result = thread.get()
:param strategy_name: strategy_name will not be set for oidc but can be utilized for methods like email magic links
:type strategy_name: str
@@ -173,2247 +106,1164 @@ def frontier_service_auth_callback_with_http_info(
:type code: str
:param state_options: state_options has additional configurations for the authentication flow at hand for example, in case of passkey, it has challenge and public key
:type state_options: object
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_auth_callback_serialize(
- strategy_name=strategy_name,
- state=state,
- code=code,
- state_options=state_options,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'strategy_name',
+ 'state',
+ 'code',
+ 'state_options'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_auth_callback" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+
+ # process the query parameters
+ _query_params = []
+ if _params.get('strategy_name') is not None: # noqa: E501
+ _query_params.append(('strategyName', _params['strategy_name']))
+
+ if _params.get('state') is not None: # noqa: E501
+ _query_params.append(('state', _params['state']))
+
+ if _params.get('code') is not None: # noqa: E501
+ _query_params.append(('code', _params['code']))
+
+ if _params.get('state_options') is not None: # noqa: E501
+ _query_params.append(('stateOptions', _params['state_options']))
+
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
'200': "object",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/auth/callback', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_auth_callback2(self, body : V1beta1AuthCallbackRequest, **kwargs) -> object: # noqa: E501
+ """Callback from a strategy # noqa: E501
- @validate_call
- def frontier_service_auth_callback_without_preload_content(
- self,
- strategy_name: Annotated[Optional[StrictStr], Field(description="strategy_name will not be set for oidc but can be utilized for methods like email magic links")] = None,
- state: Annotated[Optional[StrictStr], Field(description="for oidc & magic links")] = None,
- code: Optional[StrictStr] = None,
- state_options: Annotated[Optional[Dict[str, Any]], Field(description="state_options has additional configurations for the authentication flow at hand for example, in case of passkey, it has challenge and public key")] = None,
- _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:
- """Callback from a strategy
+ Callback from a strategy. This is the endpoint where the strategy will redirect the user after successful authentication. This endpoint will be called with the code and state query parameters. The code will be used to get the access token from the strategy and the state will be used to get the return_to url from the session and redirect the user to that url. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Callback from a strategy. This is the endpoint where the strategy will redirect the user after successful authentication. This endpoint will be called with the code and state query parameters. The code will be used to get the access token from the strategy and the state will be used to get the return_to url from the session and redirect the user to that url.
+ >>> thread = api.frontier_service_auth_callback2(body, async_req=True)
+ >>> result = thread.get()
- :param strategy_name: strategy_name will not be set for oidc but can be utilized for methods like email magic links
- :type strategy_name: str
- :param state: for oidc & magic links
- :type state: str
- :param code:
- :type code: str
- :param state_options: state_options has additional configurations for the authentication flow at hand for example, in case of passkey, it has challenge and public key
- :type state_options: object
+ :param body: (required)
+ :type body: V1beta1AuthCallbackRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_auth_callback2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_auth_callback2_with_http_info(body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_auth_callback2_with_http_info(self, body : V1beta1AuthCallbackRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Callback from a strategy # noqa: E501
+
+ Callback from a strategy. This is the endpoint where the strategy will redirect the user after successful authentication. This endpoint will be called with the code and state query parameters. The code will be used to get the access token from the strategy and the state will be used to get the return_to url from the session and redirect the user to that url. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_auth_callback2_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1beta1AuthCallbackRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_auth_callback_serialize(
- strategy_name=strategy_name,
- state=state,
- code=code,
- state_options=state_options,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
- def _frontier_service_auth_callback_serialize(
- self,
- strategy_name,
- state,
- code,
- state_options,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _params = locals()
- _host = None
+ _all_params = [
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
- _collection_formats: Dict[str, str] = {
-
- }
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_auth_callback2" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
+ _path_params = {}
+
# process the query parameters
- if strategy_name is not None:
-
- _query_params.append(('strategyName', strategy_name))
-
- if state is not None:
-
- _query_params.append(('state', state))
-
- if code is not None:
-
- _query_params.append(('code', code))
-
- if state_options is not None:
-
- _query_params.append(('stateOptions', state_options))
-
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
+ # set the HTTP header `Content-Type`
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "object",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/auth/callback',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/auth/callback', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_auth_logout(self, **kwargs) -> object: # noqa: E501
+ """Logout from a strategy # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_auth_callback2(
- self,
- body: V1beta1AuthCallbackRequest,
- _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:
- """Callback from a strategy
-
- Callback from a strategy. This is the endpoint where the strategy will redirect the user after successful authentication. This endpoint will be called with the code and state query parameters. The code will be used to get the access token from the strategy and the state will be used to get the return_to url from the session and redirect the user to that url.
+ >>> thread = api.frontier_service_auth_logout(async_req=True)
+ >>> result = thread.get()
- :param body: (required)
- :type body: V1beta1AuthCallbackRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_auth_logout_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_auth_logout_with_http_info(**kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_auth_logout_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
+ """Logout from a strategy # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_auth_logout_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_auth_callback2_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_auth_logout" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
'200': "object",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/auth/logout', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- ).data
-
-
- @validate_call
- def frontier_service_auth_callback2_with_http_info(
- self,
- body: V1beta1AuthCallbackRequest,
- _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]:
- """Callback from a strategy
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
- Callback from a strategy. This is the endpoint where the strategy will redirect the user after successful authentication. This endpoint will be called with the code and state query parameters. The code will be used to get the access token from the strategy and the state will be used to get the return_to url from the session and redirect the user to that url.
+ @validate_arguments
+ def frontier_service_auth_logout2(self, **kwargs) -> object: # noqa: E501
+ """Logout from a strategy # noqa: E501
- :param body: (required)
- :type body: V1beta1AuthCallbackRequest
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_auth_logout2(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_auth_logout2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_auth_logout2_with_http_info(**kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_auth_logout2_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
+ """Logout from a strategy # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_auth_logout2_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_auth_callback2_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_auth_logout2" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
'200': "object",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/auth/logout', 'DELETE',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_auth_token(self, body : V1beta1AuthTokenRequest, **kwargs) -> V1beta1AuthTokenResponse: # noqa: E501
+ """Generate access token by given credentials # noqa: E501
- @validate_call
- def frontier_service_auth_callback2_without_preload_content(
- self,
- body: V1beta1AuthCallbackRequest,
- _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:
- """Callback from a strategy
+ Access token can be generated by providing the credentials in the request body/header. The credentials can be client id and secret or service account generated key jwt. Use the generated access token in Authorization header to access the frontier resources. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Callback from a strategy. This is the endpoint where the strategy will redirect the user after successful authentication. This endpoint will be called with the code and state query parameters. The code will be used to get the access token from the strategy and the state will be used to get the return_to url from the session and redirect the user to that url.
+ >>> thread = api.frontier_service_auth_token(body, async_req=True)
+ >>> result = thread.get()
:param body: (required)
- :type body: V1beta1AuthCallbackRequest
+ :type body: V1beta1AuthTokenRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1AuthTokenResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_auth_token_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_auth_token_with_http_info(body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_auth_token_with_http_info(self, body : V1beta1AuthTokenRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Generate access token by given credentials # noqa: E501
+
+ Access token can be generated by providing the credentials in the request body/header. The credentials can be client id and secret or service account generated key jwt. Use the generated access token in Authorization header to access the frontier resources. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_auth_token_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1beta1AuthTokenRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_auth_callback2_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1AuthTokenResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- def _frontier_service_auth_callback2_serialize(
- self,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _params = locals()
- _host = None
+ _all_params = [
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
- _collection_formats: Dict[str, str] = {
-
- }
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_auth_token" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
+ _path_params = {}
+
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1AuthTokenResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/auth/callback',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/auth/token', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_authenticate(self, strategy_name : Annotated[StrictStr, Field(..., description="Name of the strategy to use for authentication.
*Example:* `google`")], redirect_onstart : Annotated[Optional[StrictBool], Field(description="by default, location redirect header for starting authentication flow if applicable will be skipped unless this is set to true, useful in browser, same value will also be returned as endpoint in response anyway If set to true, location header will be set for redirect to start auth flow")] = None, return_to : Annotated[Optional[StrictStr], Field(description="by default, after successful authentication(flow completes) no operation will be performed, to apply redirection in case of browsers, provide an url that will be used after authentication where users are sent from frontier. return_to should be one of the allowed urls configured at instance level URL to redirect after successful authentication.
*Example:*`\"https://frontier.example.com\"`")] = None, email : Annotated[Optional[StrictStr], Field(description="email of the user for magic links Email of the user to authenticate. Used for magic links.
*Example:*`example@acme.org`")] = None, callback_url : Annotated[Optional[StrictStr], Field(description="callback_url will be used by strategy as last step to finish authentication flow in OIDC this host will receive \"state\" and \"code\" query params, in case of magic links this will be the url where user is redirected after clicking on magic link. For most cases it could be host of frontier but in case of proxies, this will be proxy public endpoint. callback_url should be one of the allowed urls configured at instance level Host which should handle the call to finish authentication flow, for most cases it could be host of frontier but in case of proxies, this will be proxy public endpoint.
*Example:*`https://frontier.example.com/v1beta1/auth/callback`")] = None, **kwargs) -> V1beta1AuthenticateResponse: # noqa: E501
+ """Authenticate with a strategy # noqa: E501
+ Authenticate a user with a strategy. By default, after successful authentication no operation will be performed to apply redirection in case of browsers, provide a url in the authenticate request body that will be used for redirection after authentication. Also set redirect as true for redirecting the user request to the redirect_url after successful authentication. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_auth_logout(
- self,
- _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:
- """Logout from a strategy
+ >>> thread = api.frontier_service_authenticate(strategy_name, redirect_onstart, return_to, email, callback_url, async_req=True)
+ >>> result = thread.get()
+ :param strategy_name: Name of the strategy to use for authentication.
*Example:* `google` (required)
+ :type strategy_name: str
+ :param redirect_onstart: by default, location redirect header for starting authentication flow if applicable will be skipped unless this is set to true, useful in browser, same value will also be returned as endpoint in response anyway If set to true, location header will be set for redirect to start auth flow
+ :type redirect_onstart: bool
+ :param return_to: by default, after successful authentication(flow completes) no operation will be performed, to apply redirection in case of browsers, provide an url that will be used after authentication where users are sent from frontier. return_to should be one of the allowed urls configured at instance level URL to redirect after successful authentication.
*Example:*`\"https://frontier.example.com\"`
+ :type return_to: str
+ :param email: email of the user for magic links Email of the user to authenticate. Used for magic links.
*Example:*`example@acme.org`
+ :type email: str
+ :param callback_url: callback_url will be used by strategy as last step to finish authentication flow in OIDC this host will receive \"state\" and \"code\" query params, in case of magic links this will be the url where user is redirected after clicking on magic link. For most cases it could be host of frontier but in case of proxies, this will be proxy public endpoint. callback_url should be one of the allowed urls configured at instance level Host which should handle the call to finish authentication flow, for most cases it could be host of frontier but in case of proxies, this will be proxy public endpoint.
*Example:*`https://frontier.example.com/v1beta1/auth/callback`
+ :type callback_url: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1AuthenticateResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_authenticate_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_authenticate_with_http_info(strategy_name, redirect_onstart, return_to, email, callback_url, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_authenticate_with_http_info(self, strategy_name : Annotated[StrictStr, Field(..., description="Name of the strategy to use for authentication.
*Example:* `google`")], redirect_onstart : Annotated[Optional[StrictBool], Field(description="by default, location redirect header for starting authentication flow if applicable will be skipped unless this is set to true, useful in browser, same value will also be returned as endpoint in response anyway If set to true, location header will be set for redirect to start auth flow")] = None, return_to : Annotated[Optional[StrictStr], Field(description="by default, after successful authentication(flow completes) no operation will be performed, to apply redirection in case of browsers, provide an url that will be used after authentication where users are sent from frontier. return_to should be one of the allowed urls configured at instance level URL to redirect after successful authentication.
*Example:*`\"https://frontier.example.com\"`")] = None, email : Annotated[Optional[StrictStr], Field(description="email of the user for magic links Email of the user to authenticate. Used for magic links.
*Example:*`example@acme.org`")] = None, callback_url : Annotated[Optional[StrictStr], Field(description="callback_url will be used by strategy as last step to finish authentication flow in OIDC this host will receive \"state\" and \"code\" query params, in case of magic links this will be the url where user is redirected after clicking on magic link. For most cases it could be host of frontier but in case of proxies, this will be proxy public endpoint. callback_url should be one of the allowed urls configured at instance level Host which should handle the call to finish authentication flow, for most cases it could be host of frontier but in case of proxies, this will be proxy public endpoint.
*Example:*`https://frontier.example.com/v1beta1/auth/callback`")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """Authenticate with a strategy # noqa: E501
+
+ Authenticate a user with a strategy. By default, after successful authentication no operation will be performed to apply redirection in case of browsers, provide a url in the authenticate request body that will be used for redirection after authentication. Also set redirect as true for redirecting the user request to the redirect_url after successful authentication. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_authenticate_with_http_info(strategy_name, redirect_onstart, return_to, email, callback_url, async_req=True)
+ >>> result = thread.get()
+ :param strategy_name: Name of the strategy to use for authentication.
*Example:* `google` (required)
+ :type strategy_name: str
+ :param redirect_onstart: by default, location redirect header for starting authentication flow if applicable will be skipped unless this is set to true, useful in browser, same value will also be returned as endpoint in response anyway If set to true, location header will be set for redirect to start auth flow
+ :type redirect_onstart: bool
+ :param return_to: by default, after successful authentication(flow completes) no operation will be performed, to apply redirection in case of browsers, provide an url that will be used after authentication where users are sent from frontier. return_to should be one of the allowed urls configured at instance level URL to redirect after successful authentication.
*Example:*`\"https://frontier.example.com\"`
+ :type return_to: str
+ :param email: email of the user for magic links Email of the user to authenticate. Used for magic links.
*Example:*`example@acme.org`
+ :type email: str
+ :param callback_url: callback_url will be used by strategy as last step to finish authentication flow in OIDC this host will receive \"state\" and \"code\" query params, in case of magic links this will be the url where user is redirected after clicking on magic link. For most cases it could be host of frontier but in case of proxies, this will be proxy public endpoint. callback_url should be one of the allowed urls configured at instance level Host which should handle the call to finish authentication flow, for most cases it could be host of frontier but in case of proxies, this will be proxy public endpoint.
*Example:*`https://frontier.example.com/v1beta1/auth/callback`
+ :type callback_url: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_auth_logout_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1AuthenticateResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'strategy_name',
+ 'redirect_onstart',
+ 'return_to',
+ 'email',
+ 'callback_url'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_authenticate" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['strategy_name']:
+ _path_params['strategyName'] = _params['strategy_name']
+
+
+ # process the query parameters
+ _query_params = []
+ if _params.get('redirect_onstart') is not None: # noqa: E501
+ _query_params.append(('redirectOnstart', _params['redirect_onstart']))
+
+ if _params.get('return_to') is not None: # noqa: E501
+ _query_params.append(('returnTo', _params['return_to']))
+
+ if _params.get('email') is not None: # noqa: E501
+ _query_params.append(('email', _params['email']))
+
+ if _params.get('callback_url') is not None: # noqa: E501
+ _query_params.append(('callbackUrl', _params['callback_url']))
+
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1AuthenticateResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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 frontier_service_auth_logout_with_http_info(
- self,
- _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]:
- """Logout from a strategy
-
- :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._frontier_service_auth_logout_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_auth_logout_without_preload_content(
- self,
- _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:
- """Logout from a strategy
-
-
- :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._frontier_service_auth_logout_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_auth_logout_serialize(
- self,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _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
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/auth/logout',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_auth_logout2(
- self,
- _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:
- """Logout from a strategy
-
-
- :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._frontier_service_auth_logout2_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_auth_logout2_with_http_info(
- self,
- _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]:
- """Logout from a strategy
-
-
- :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._frontier_service_auth_logout2_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_auth_logout2_without_preload_content(
- self,
- _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:
- """Logout from a strategy
-
-
- :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._frontier_service_auth_logout2_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_auth_logout2_serialize(
- self,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _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
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='DELETE',
- resource_path='/v1beta1/auth/logout',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_auth_token(
- self,
- body: V1beta1AuthTokenRequest,
- _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,
- ) -> V1beta1AuthTokenResponse:
- """Generate access token by given credentials
-
- Access token can be generated by providing the credentials in the request body/header. The credentials can be client id and secret or service account generated key jwt. Use the generated access token in Authorization header to access the frontier resources.
-
- :param body: (required)
- :type body: V1beta1AuthTokenRequest
- :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._frontier_service_auth_token_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1AuthTokenResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_auth_token_with_http_info(
- self,
- body: V1beta1AuthTokenRequest,
- _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[V1beta1AuthTokenResponse]:
- """Generate access token by given credentials
-
- Access token can be generated by providing the credentials in the request body/header. The credentials can be client id and secret or service account generated key jwt. Use the generated access token in Authorization header to access the frontier resources.
-
- :param body: (required)
- :type body: V1beta1AuthTokenRequest
- :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._frontier_service_auth_token_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1AuthTokenResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_auth_token_without_preload_content(
- self,
- body: V1beta1AuthTokenRequest,
- _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:
- """Generate access token by given credentials
-
- Access token can be generated by providing the credentials in the request body/header. The credentials can be client id and secret or service account generated key jwt. Use the generated access token in Authorization header to access the frontier resources.
-
- :param body: (required)
- :type body: V1beta1AuthTokenRequest
- :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._frontier_service_auth_token_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1AuthTokenResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_auth_token_serialize(
- self,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _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 body is not None:
- _body_params = body
-
-
- # 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] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/auth/token',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_authenticate(
- self,
- strategy_name: Annotated[StrictStr, Field(description="Name of the strategy to use for authentication.
*Example:* `google`")],
- redirect_onstart: Annotated[Optional[StrictBool], Field(description="by default, location redirect header for starting authentication flow if applicable will be skipped unless this is set to true, useful in browser, same value will also be returned as endpoint in response anyway If set to true, location header will be set for redirect to start auth flow")] = None,
- return_to: Annotated[Optional[StrictStr], Field(description="by default, after successful authentication(flow completes) no operation will be performed, to apply redirection in case of browsers, provide an url that will be used after authentication where users are sent from frontier. return_to should be one of the allowed urls configured at instance level URL to redirect after successful authentication.
*Example:*`\"https://frontier.example.com\"`")] = None,
- email: Annotated[Optional[StrictStr], Field(description="email of the user for magic links Email of the user to authenticate. Used for magic links.
*Example:*`example@acme.org`")] = None,
- callback_url: Annotated[Optional[StrictStr], Field(description="callback_url will be used by strategy as last step to finish authentication flow in OIDC this host will receive \"state\" and \"code\" query params, in case of magic links this will be the url where user is redirected after clicking on magic link. For most cases it could be host of frontier but in case of proxies, this will be proxy public endpoint. callback_url should be one of the allowed urls configured at instance level Host which should handle the call to finish authentication flow, for most cases it could be host of frontier but in case of proxies, this will be proxy public endpoint.
*Example:*`https://frontier.example.com/v1beta1/auth/callback`")] = None,
- _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,
- ) -> V1beta1AuthenticateResponse:
- """Authenticate with a strategy
-
- Authenticate a user with a strategy. By default, after successful authentication no operation will be performed to apply redirection in case of browsers, provide a url in the authenticate request body that will be used for redirection after authentication. Also set redirect as true for redirecting the user request to the redirect_url after successful authentication.
-
- :param strategy_name: Name of the strategy to use for authentication.
*Example:* `google` (required)
- :type strategy_name: str
- :param redirect_onstart: by default, location redirect header for starting authentication flow if applicable will be skipped unless this is set to true, useful in browser, same value will also be returned as endpoint in response anyway If set to true, location header will be set for redirect to start auth flow
- :type redirect_onstart: bool
- :param return_to: by default, after successful authentication(flow completes) no operation will be performed, to apply redirection in case of browsers, provide an url that will be used after authentication where users are sent from frontier. return_to should be one of the allowed urls configured at instance level URL to redirect after successful authentication.
*Example:*`\"https://frontier.example.com\"`
- :type return_to: str
- :param email: email of the user for magic links Email of the user to authenticate. Used for magic links.
*Example:*`example@acme.org`
- :type email: str
- :param callback_url: callback_url will be used by strategy as last step to finish authentication flow in OIDC this host will receive \"state\" and \"code\" query params, in case of magic links this will be the url where user is redirected after clicking on magic link. For most cases it could be host of frontier but in case of proxies, this will be proxy public endpoint. callback_url should be one of the allowed urls configured at instance level Host which should handle the call to finish authentication flow, for most cases it could be host of frontier but in case of proxies, this will be proxy public endpoint.
*Example:*`https://frontier.example.com/v1beta1/auth/callback`
- :type callback_url: str
- :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._frontier_service_authenticate_serialize(
- strategy_name=strategy_name,
- redirect_onstart=redirect_onstart,
- return_to=return_to,
- email=email,
- callback_url=callback_url,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1AuthenticateResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_authenticate_with_http_info(
- self,
- strategy_name: Annotated[StrictStr, Field(description="Name of the strategy to use for authentication.
*Example:* `google`")],
- redirect_onstart: Annotated[Optional[StrictBool], Field(description="by default, location redirect header for starting authentication flow if applicable will be skipped unless this is set to true, useful in browser, same value will also be returned as endpoint in response anyway If set to true, location header will be set for redirect to start auth flow")] = None,
- return_to: Annotated[Optional[StrictStr], Field(description="by default, after successful authentication(flow completes) no operation will be performed, to apply redirection in case of browsers, provide an url that will be used after authentication where users are sent from frontier. return_to should be one of the allowed urls configured at instance level URL to redirect after successful authentication.
*Example:*`\"https://frontier.example.com\"`")] = None,
- email: Annotated[Optional[StrictStr], Field(description="email of the user for magic links Email of the user to authenticate. Used for magic links.
*Example:*`example@acme.org`")] = None,
- callback_url: Annotated[Optional[StrictStr], Field(description="callback_url will be used by strategy as last step to finish authentication flow in OIDC this host will receive \"state\" and \"code\" query params, in case of magic links this will be the url where user is redirected after clicking on magic link. For most cases it could be host of frontier but in case of proxies, this will be proxy public endpoint. callback_url should be one of the allowed urls configured at instance level Host which should handle the call to finish authentication flow, for most cases it could be host of frontier but in case of proxies, this will be proxy public endpoint.
*Example:*`https://frontier.example.com/v1beta1/auth/callback`")] = None,
- _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[V1beta1AuthenticateResponse]:
- """Authenticate with a strategy
-
- Authenticate a user with a strategy. By default, after successful authentication no operation will be performed to apply redirection in case of browsers, provide a url in the authenticate request body that will be used for redirection after authentication. Also set redirect as true for redirecting the user request to the redirect_url after successful authentication.
-
- :param strategy_name: Name of the strategy to use for authentication.
*Example:* `google` (required)
- :type strategy_name: str
- :param redirect_onstart: by default, location redirect header for starting authentication flow if applicable will be skipped unless this is set to true, useful in browser, same value will also be returned as endpoint in response anyway If set to true, location header will be set for redirect to start auth flow
- :type redirect_onstart: bool
- :param return_to: by default, after successful authentication(flow completes) no operation will be performed, to apply redirection in case of browsers, provide an url that will be used after authentication where users are sent from frontier. return_to should be one of the allowed urls configured at instance level URL to redirect after successful authentication.
*Example:*`\"https://frontier.example.com\"`
- :type return_to: str
- :param email: email of the user for magic links Email of the user to authenticate. Used for magic links.
*Example:*`example@acme.org`
- :type email: str
- :param callback_url: callback_url will be used by strategy as last step to finish authentication flow in OIDC this host will receive \"state\" and \"code\" query params, in case of magic links this will be the url where user is redirected after clicking on magic link. For most cases it could be host of frontier but in case of proxies, this will be proxy public endpoint. callback_url should be one of the allowed urls configured at instance level Host which should handle the call to finish authentication flow, for most cases it could be host of frontier but in case of proxies, this will be proxy public endpoint.
*Example:*`https://frontier.example.com/v1beta1/auth/callback`
- :type callback_url: str
- :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._frontier_service_authenticate_serialize(
- strategy_name=strategy_name,
- redirect_onstart=redirect_onstart,
- return_to=return_to,
- email=email,
- callback_url=callback_url,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1AuthenticateResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_authenticate_without_preload_content(
- self,
- strategy_name: Annotated[StrictStr, Field(description="Name of the strategy to use for authentication.
*Example:* `google`")],
- redirect_onstart: Annotated[Optional[StrictBool], Field(description="by default, location redirect header for starting authentication flow if applicable will be skipped unless this is set to true, useful in browser, same value will also be returned as endpoint in response anyway If set to true, location header will be set for redirect to start auth flow")] = None,
- return_to: Annotated[Optional[StrictStr], Field(description="by default, after successful authentication(flow completes) no operation will be performed, to apply redirection in case of browsers, provide an url that will be used after authentication where users are sent from frontier. return_to should be one of the allowed urls configured at instance level URL to redirect after successful authentication.
*Example:*`\"https://frontier.example.com\"`")] = None,
- email: Annotated[Optional[StrictStr], Field(description="email of the user for magic links Email of the user to authenticate. Used for magic links.
*Example:*`example@acme.org`")] = None,
- callback_url: Annotated[Optional[StrictStr], Field(description="callback_url will be used by strategy as last step to finish authentication flow in OIDC this host will receive \"state\" and \"code\" query params, in case of magic links this will be the url where user is redirected after clicking on magic link. For most cases it could be host of frontier but in case of proxies, this will be proxy public endpoint. callback_url should be one of the allowed urls configured at instance level Host which should handle the call to finish authentication flow, for most cases it could be host of frontier but in case of proxies, this will be proxy public endpoint.
*Example:*`https://frontier.example.com/v1beta1/auth/callback`")] = None,
- _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:
- """Authenticate with a strategy
-
- Authenticate a user with a strategy. By default, after successful authentication no operation will be performed to apply redirection in case of browsers, provide a url in the authenticate request body that will be used for redirection after authentication. Also set redirect as true for redirecting the user request to the redirect_url after successful authentication.
-
- :param strategy_name: Name of the strategy to use for authentication.
*Example:* `google` (required)
- :type strategy_name: str
- :param redirect_onstart: by default, location redirect header for starting authentication flow if applicable will be skipped unless this is set to true, useful in browser, same value will also be returned as endpoint in response anyway If set to true, location header will be set for redirect to start auth flow
- :type redirect_onstart: bool
- :param return_to: by default, after successful authentication(flow completes) no operation will be performed, to apply redirection in case of browsers, provide an url that will be used after authentication where users are sent from frontier. return_to should be one of the allowed urls configured at instance level URL to redirect after successful authentication.
*Example:*`\"https://frontier.example.com\"`
- :type return_to: str
- :param email: email of the user for magic links Email of the user to authenticate. Used for magic links.
*Example:*`example@acme.org`
- :type email: str
- :param callback_url: callback_url will be used by strategy as last step to finish authentication flow in OIDC this host will receive \"state\" and \"code\" query params, in case of magic links this will be the url where user is redirected after clicking on magic link. For most cases it could be host of frontier but in case of proxies, this will be proxy public endpoint. callback_url should be one of the allowed urls configured at instance level Host which should handle the call to finish authentication flow, for most cases it could be host of frontier but in case of proxies, this will be proxy public endpoint.
*Example:*`https://frontier.example.com/v1beta1/auth/callback`
- :type callback_url: str
- :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._frontier_service_authenticate_serialize(
- strategy_name=strategy_name,
- redirect_onstart=redirect_onstart,
- return_to=return_to,
- email=email,
- callback_url=callback_url,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1AuthenticateResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_authenticate_serialize(
- self,
- strategy_name,
- redirect_onstart,
- return_to,
- email,
- callback_url,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if strategy_name is not None:
- _path_params['strategyName'] = strategy_name
- # process the query parameters
- if redirect_onstart is not None:
-
- _query_params.append(('redirectOnstart', redirect_onstart))
-
- if return_to is not None:
-
- _query_params.append(('returnTo', return_to))
-
- if email is not None:
-
- _query_params.append(('email', email))
-
- if callback_url is not None:
-
- _query_params.append(('callbackUrl', callback_url))
-
- # process the header parameters
- # process the form parameters
- # process the body parameter
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/auth/register/{strategyName}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/auth/register/{strategyName}', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_authenticate2(self, strategy_name : Annotated[StrictStr, Field(..., description="Name of the strategy to use for authentication.
*Example:* `google`")], body : FrontierServiceAuthenticate2Request, **kwargs) -> V1beta1AuthenticateResponse: # noqa: E501
+ """Authenticate with a strategy # noqa: E501
+ Authenticate a user with a strategy. By default, after successful authentication no operation will be performed to apply redirection in case of browsers, provide a url in the authenticate request body that will be used for redirection after authentication. Also set redirect as true for redirecting the user request to the redirect_url after successful authentication. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
-
- @validate_call
- def frontier_service_authenticate2(
- self,
- strategy_name: Annotated[StrictStr, Field(description="Name of the strategy to use for authentication.
*Example:* `google`")],
- body: FrontierServiceAuthenticate2Request,
- _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,
- ) -> V1beta1AuthenticateResponse:
- """Authenticate with a strategy
-
- Authenticate a user with a strategy. By default, after successful authentication no operation will be performed to apply redirection in case of browsers, provide a url in the authenticate request body that will be used for redirection after authentication. Also set redirect as true for redirecting the user request to the redirect_url after successful authentication.
+ >>> thread = api.frontier_service_authenticate2(strategy_name, body, async_req=True)
+ >>> result = thread.get()
:param strategy_name: Name of the strategy to use for authentication.
*Example:* `google` (required)
:type strategy_name: str
:param body: (required)
:type body: FrontierServiceAuthenticate2Request
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_authenticate2_serialize(
- strategy_name=strategy_name,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1AuthenticateResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_authenticate2_with_http_info(
- self,
- strategy_name: Annotated[StrictStr, Field(description="Name of the strategy to use for authentication.
*Example:* `google`")],
- body: FrontierServiceAuthenticate2Request,
- _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[V1beta1AuthenticateResponse]:
- """Authenticate with a strategy
-
- Authenticate a user with a strategy. By default, after successful authentication no operation will be performed to apply redirection in case of browsers, provide a url in the authenticate request body that will be used for redirection after authentication. Also set redirect as true for redirecting the user request to the redirect_url after successful authentication.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1AuthenticateResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_authenticate2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_authenticate2_with_http_info(strategy_name, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_authenticate2_with_http_info(self, strategy_name : Annotated[StrictStr, Field(..., description="Name of the strategy to use for authentication.
*Example:* `google`")], body : FrontierServiceAuthenticate2Request, **kwargs) -> ApiResponse: # noqa: E501
+ """Authenticate with a strategy # noqa: E501
+
+ Authenticate a user with a strategy. By default, after successful authentication no operation will be performed to apply redirection in case of browsers, provide a url in the authenticate request body that will be used for redirection after authentication. Also set redirect as true for redirecting the user request to the redirect_url after successful authentication. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_authenticate2_with_http_info(strategy_name, body, async_req=True)
+ >>> result = thread.get()
:param strategy_name: Name of the strategy to use for authentication.
*Example:* `google` (required)
:type strategy_name: str
:param body: (required)
:type body: FrontierServiceAuthenticate2Request
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_authenticate2_serialize(
- strategy_name=strategy_name,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1AuthenticateResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1AuthenticateResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_authenticate2_without_preload_content(
- self,
- strategy_name: Annotated[StrictStr, Field(description="Name of the strategy to use for authentication.
*Example:* `google`")],
- body: FrontierServiceAuthenticate2Request,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'strategy_name',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Authenticate with a strategy
-
- Authenticate a user with a strategy. By default, after successful authentication no operation will be performed to apply redirection in case of browsers, provide a url in the authenticate request body that will be used for redirection after authentication. Also set redirect as true for redirecting the user request to the redirect_url after successful authentication.
-
- :param strategy_name: Name of the strategy to use for authentication.
*Example:* `google` (required)
- :type strategy_name: str
- :param body: (required)
- :type body: FrontierServiceAuthenticate2Request
- :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._frontier_service_authenticate2_serialize(
- strategy_name=strategy_name,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1AuthenticateResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
)
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_authenticate2" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_authenticate2_serialize(
- self,
- strategy_name,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['strategy_name']:
+ _path_params['strategyName'] = _params['strategy_name']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if strategy_name is not None:
- _path_params['strategyName'] = strategy_name
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/auth/register/{strategyName}',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_list_auth_strategies(
- self,
- _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,
- ) -> V1beta1ListAuthStrategiesResponse:
- """List authentication strategies
-
- Returns a list of identity providers configured on an instance level in Frontier. e.g Google, AzureAD, Github etc
-
- :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._frontier_service_list_auth_strategies_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ _auth_settings = ['Basic'] # noqa: E501
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListAuthStrategiesResponse",
+ _response_types_map = {
+ '200': "V1beta1AuthenticateResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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 frontier_service_list_auth_strategies_with_http_info(
- self,
- _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[V1beta1ListAuthStrategiesResponse]:
- """List authentication strategies
-
- Returns a list of identity providers configured on an instance level in Frontier. e.g Google, AzureAD, Github etc
-
- :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._frontier_service_list_auth_strategies_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListAuthStrategiesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
+ return self.api_client.call_api(
+ '/v1beta1/auth/register/{strategyName}', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_auth_strategies(self, **kwargs) -> V1beta1ListAuthStrategiesResponse: # noqa: E501
+ """List authentication strategies # noqa: E501
- @validate_call
- def frontier_service_list_auth_strategies_without_preload_content(
- self,
- _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:
- """List authentication strategies
+ Returns a list of identity providers configured on an instance level in Frontier. e.g Google, AzureAD, Github etc # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Returns a list of identity providers configured on an instance level in Frontier. e.g Google, AzureAD, Github etc
+ >>> thread = api.frontier_service_list_auth_strategies(async_req=True)
+ >>> result = thread.get()
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListAuthStrategiesResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_auth_strategies_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_auth_strategies_with_http_info(**kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_auth_strategies_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
+ """List authentication strategies # noqa: E501
+
+ Returns a list of identity providers configured on an instance level in Frontier. e.g Google, AzureAD, Github etc # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_auth_strategies_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListAuthStrategiesResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _param = self._frontier_service_list_auth_strategies_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ _params = locals()
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListAuthStrategiesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
+ _all_params = [
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- return response_data.response
-
- def _frontier_service_list_auth_strategies_serialize(
- self,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _host = None
-
- _collection_formats: Dict[str, str] = {
-
- }
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_auth_strategies" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
+ _path_params = {}
+
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListAuthStrategiesResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/auth',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/auth', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
diff --git a/frontier_api/api/authz_api.py b/frontier_api/api/authz_api.py
index 691ea61..60f5948 100644
--- a/frontier_api/api/authz_api.py
+++ b/frontier_api/api/authz_api.py
@@ -13,16 +13,11 @@
""" # noqa: E501
+import re # noqa: F401
import io
import warnings
-from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
-from typing import Dict, List, Optional, Tuple, Union, Any
-
-try:
- from typing import Annotated
-except ImportError:
- from typing_extensions import Annotated
+from pydantic import validate_arguments, ValidationError
from frontier_api.models.v1beta1_batch_check_permission_request import V1beta1BatchCheckPermissionRequest
from frontier_api.models.v1beta1_batch_check_permission_response import V1beta1BatchCheckPermissionResponse
@@ -34,7 +29,10 @@
from frontier_api.api_client import ApiClient
from frontier_api.api_response import ApiResponse
-from frontier_api.rest import RESTResponseType
+from frontier_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class AuthzApi:
@@ -49,1405 +47,728 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client
+ @validate_arguments
+ def admin_service_check_federated_resource_permission(self, body : V1beta1CheckFederatedResourcePermissionRequest, **kwargs) -> V1beta1CheckFederatedResourcePermissionResponse: # noqa: E501
+ """Check # noqa: E501
- @validate_call
- def admin_service_check_federated_resource_permission(
- self,
- body: V1beta1CheckFederatedResourcePermissionRequest,
- _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,
- ) -> V1beta1CheckFederatedResourcePermissionResponse:
- """Check
+ Returns true if a principal has required permissions to access a resource and false otherwise.
Note the principal can be a user, group or a service account. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Returns true if a principal has required permissions to access a resource and false otherwise.
Note the principal can be a user, group or a service account.
+ >>> thread = api.admin_service_check_federated_resource_permission(body, async_req=True)
+ >>> result = thread.get()
:param body: (required)
:type body: V1beta1CheckFederatedResourcePermissionRequest
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_check_federated_resource_permission_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CheckFederatedResourcePermissionResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 admin_service_check_federated_resource_permission_with_http_info(
- self,
- body: V1beta1CheckFederatedResourcePermissionRequest,
- _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[V1beta1CheckFederatedResourcePermissionResponse]:
- """Check
-
- Returns true if a principal has required permissions to access a resource and false otherwise.
Note the principal can be a user, group or a service account.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CheckFederatedResourcePermissionResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the admin_service_check_federated_resource_permission_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.admin_service_check_federated_resource_permission_with_http_info(body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def admin_service_check_federated_resource_permission_with_http_info(self, body : V1beta1CheckFederatedResourcePermissionRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Check # noqa: E501
+
+ Returns true if a principal has required permissions to access a resource and false otherwise.
Note the principal can be a user, group or a service account. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.admin_service_check_federated_resource_permission_with_http_info(body, async_req=True)
+ >>> result = thread.get()
:param body: (required)
:type body: V1beta1CheckFederatedResourcePermissionRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_check_federated_resource_permission_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CheckFederatedResourcePermissionResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CheckFederatedResourcePermissionResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def admin_service_check_federated_resource_permission_without_preload_content(
- self,
- body: V1beta1CheckFederatedResourcePermissionRequest,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Check
-
- Returns true if a principal has required permissions to access a resource and false otherwise.
Note the principal can be a user, group or a service account.
-
- :param body: (required)
- :type body: V1beta1CheckFederatedResourcePermissionRequest
- :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._admin_service_check_federated_resource_permission_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CheckFederatedResourcePermissionResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
)
- return response_data.response
-
- def _admin_service_check_federated_resource_permission_serialize(
- self,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _host = None
-
- _collection_formats: Dict[str, str] = {
-
- }
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method admin_service_check_federated_resource_permission" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
+ _path_params = {}
+
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/admin/check',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ _response_types_map = {
+ '200': "V1beta1CheckFederatedResourcePermissionResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
+
+ return self.api_client.call_api(
+ '/v1beta1/admin/check', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_batch_check_permission(self, body : V1beta1BatchCheckPermissionRequest, **kwargs) -> V1beta1BatchCheckPermissionResponse: # noqa: E501
+ """Batch check # noqa: E501
+ Returns true if a principal has required permissions to access a resource and false otherwise.
Note the principal can be a user or a service account, and Frontier will the credentials from the current logged in principal from the session cookie (if any), or the client id and secret (in case of service users) or the access token (in case of human user accounts). # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
-
- @validate_call
- def frontier_service_batch_check_permission(
- self,
- body: V1beta1BatchCheckPermissionRequest,
- _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,
- ) -> V1beta1BatchCheckPermissionResponse:
- """Batch check
-
- Returns true if a principal has required permissions to access a resource and false otherwise.
Note the principal can be a user or a service account, and Frontier will the credentials from the current logged in principal from the session cookie (if any), or the client id and secret (in case of service users) or the access token (in case of human user accounts).
+ >>> thread = api.frontier_service_batch_check_permission(body, async_req=True)
+ >>> result = thread.get()
:param body: (required)
:type body: V1beta1BatchCheckPermissionRequest
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_batch_check_permission_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1BatchCheckPermissionResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_batch_check_permission_with_http_info(
- self,
- body: V1beta1BatchCheckPermissionRequest,
- _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[V1beta1BatchCheckPermissionResponse]:
- """Batch check
-
- Returns true if a principal has required permissions to access a resource and false otherwise.
Note the principal can be a user or a service account, and Frontier will the credentials from the current logged in principal from the session cookie (if any), or the client id and secret (in case of service users) or the access token (in case of human user accounts).
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1BatchCheckPermissionResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_batch_check_permission_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_batch_check_permission_with_http_info(body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_batch_check_permission_with_http_info(self, body : V1beta1BatchCheckPermissionRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Batch check # noqa: E501
+
+ Returns true if a principal has required permissions to access a resource and false otherwise.
Note the principal can be a user or a service account, and Frontier will the credentials from the current logged in principal from the session cookie (if any), or the client id and secret (in case of service users) or the access token (in case of human user accounts). # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_batch_check_permission_with_http_info(body, async_req=True)
+ >>> result = thread.get()
:param body: (required)
:type body: V1beta1BatchCheckPermissionRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_batch_check_permission_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1BatchCheckPermissionResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1BatchCheckPermissionResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_batch_check_permission_without_preload_content(
- self,
- body: V1beta1BatchCheckPermissionRequest,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Batch check
-
- Returns true if a principal has required permissions to access a resource and false otherwise.
Note the principal can be a user or a service account, and Frontier will the credentials from the current logged in principal from the session cookie (if any), or the client id and secret (in case of service users) or the access token (in case of human user accounts).
-
- :param body: (required)
- :type body: V1beta1BatchCheckPermissionRequest
- :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._frontier_service_batch_check_permission_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1BatchCheckPermissionResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
)
- return response_data.response
-
-
- def _frontier_service_batch_check_permission_serialize(
- self,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
- _host = None
-
- _collection_formats: Dict[str, str] = {
-
- }
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_batch_check_permission" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
+ _path_params = {}
+
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1BatchCheckPermissionResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/batchcheck',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/batchcheck', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_check_resource_permission(self, body : V1beta1CheckResourcePermissionRequest, **kwargs) -> V1beta1CheckResourcePermissionResponse: # noqa: E501
+ """Check # noqa: E501
- @validate_call
- def frontier_service_check_resource_permission(
- self,
- body: V1beta1CheckResourcePermissionRequest,
- _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,
- ) -> V1beta1CheckResourcePermissionResponse:
- """Check
+ Returns true if a principal has required permissions to access a resource and false otherwise.
Note the principal can be a user or a service account. Frontier will extract principal from the current logged in session cookie (if any), or the client id and secret (in case of service users) or the access token. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Returns true if a principal has required permissions to access a resource and false otherwise.
Note the principal can be a user or a service account. Frontier will extract principal from the current logged in session cookie (if any), or the client id and secret (in case of service users) or the access token.
+ >>> thread = api.frontier_service_check_resource_permission(body, async_req=True)
+ >>> result = thread.get()
:param body: (required)
:type body: V1beta1CheckResourcePermissionRequest
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_check_resource_permission_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CheckResourcePermissionResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_check_resource_permission_with_http_info(
- self,
- body: V1beta1CheckResourcePermissionRequest,
- _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[V1beta1CheckResourcePermissionResponse]:
- """Check
-
- Returns true if a principal has required permissions to access a resource and false otherwise.
Note the principal can be a user or a service account. Frontier will extract principal from the current logged in session cookie (if any), or the client id and secret (in case of service users) or the access token.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CheckResourcePermissionResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_check_resource_permission_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_check_resource_permission_with_http_info(body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_check_resource_permission_with_http_info(self, body : V1beta1CheckResourcePermissionRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Check # noqa: E501
+
+ Returns true if a principal has required permissions to access a resource and false otherwise.
Note the principal can be a user or a service account. Frontier will extract principal from the current logged in session cookie (if any), or the client id and secret (in case of service users) or the access token. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_check_resource_permission_with_http_info(body, async_req=True)
+ >>> result = thread.get()
:param body: (required)
:type body: V1beta1CheckResourcePermissionRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_check_resource_permission_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CheckResourcePermissionResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CheckResourcePermissionResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_check_resource_permission_without_preload_content(
- self,
- body: V1beta1CheckResourcePermissionRequest,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Check
-
- Returns true if a principal has required permissions to access a resource and false otherwise.
Note the principal can be a user or a service account. Frontier will extract principal from the current logged in session cookie (if any), or the client id and secret (in case of service users) or the access token.
-
- :param body: (required)
- :type body: V1beta1CheckResourcePermissionRequest
- :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._frontier_service_check_resource_permission_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CheckResourcePermissionResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_check_resource_permission_serialize(
- self,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _host = None
-
- _collection_formats: Dict[str, str] = {
-
- }
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_check_resource_permission" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
+ _path_params = {}
+
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/check',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_get_jwks(
- self,
- _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,
- ) -> V1beta1GetJWKsResponse:
- """Get well known JWKs
-
-
- :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._frontier_service_get_jwks_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ _auth_settings = ['Basic'] # noqa: E501
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetJWKsResponse",
+ _response_types_map = {
+ '200': "V1beta1CheckResourcePermissionResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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 frontier_service_get_jwks_with_http_info(
- self,
- _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[V1beta1GetJWKsResponse]:
- """Get well known JWKs
-
- :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._frontier_service_get_jwks_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetJWKsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
+ return self.api_client.call_api(
+ '/v1beta1/check', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_get_jwks(self, **kwargs) -> V1beta1GetJWKsResponse: # noqa: E501
+ """Get well known JWKs # noqa: E501
- @validate_call
- def frontier_service_get_jwks_without_preload_content(
- self,
- _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:
- """Get well known JWKs
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.frontier_service_get_jwks(async_req=True)
+ >>> result = thread.get()
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1GetJWKsResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_get_jwks_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_get_jwks_with_http_info(**kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_get_jwks_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
+ """Get well known JWKs # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_get_jwks_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1GetJWKsResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _param = self._frontier_service_get_jwks_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ _params = locals()
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetJWKsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
+ _all_params = [
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- return response_data.response
-
-
- def _frontier_service_get_jwks_serialize(
- self,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
- _host = None
-
- _collection_formats: Dict[str, str] = {
-
- }
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_get_jwks" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
+ _path_params = {}
+
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/auth/jwks',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_get_jwks2(
- self,
- _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,
- ) -> V1beta1GetJWKsResponse:
- """Get well known JWKs
-
-
- :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._frontier_service_get_jwks2_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
+ _response_types_map = {
'200': "V1beta1GetJWKsResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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 frontier_service_get_jwks2_with_http_info(
- self,
- _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[V1beta1GetJWKsResponse]:
- """Get well known JWKs
-
-
- :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._frontier_service_get_jwks2_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetJWKsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
+ return self.api_client.call_api(
+ '/v1beta1/auth/jwks', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_get_jwks2(self, **kwargs) -> V1beta1GetJWKsResponse: # noqa: E501
+ """Get well known JWKs # noqa: E501
- @validate_call
- def frontier_service_get_jwks2_without_preload_content(
- self,
- _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:
- """Get well known JWKs
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.frontier_service_get_jwks2(async_req=True)
+ >>> result = thread.get()
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1GetJWKsResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_get_jwks2_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_get_jwks2_with_http_info(**kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_get_jwks2_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
+ """Get well known JWKs # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_get_jwks2_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1GetJWKsResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _param = self._frontier_service_get_jwks2_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ _params = locals()
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetJWKsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
+ _all_params = [
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- return response_data.response
-
- def _frontier_service_get_jwks2_serialize(
- self,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _host = None
-
- _collection_formats: Dict[str, str] = {
-
- }
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_get_jwks2" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
+ _path_params = {}
+
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/.well-known/jwks.json',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ _response_types_map = {
+ '200': "V1beta1GetJWKsResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
+
+ return self.api_client.call_api(
+ '/.well-known/jwks.json', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
diff --git a/frontier_api/api/billing_api.py b/frontier_api/api/billing_api.py
index a24676a..b448e97 100644
--- a/frontier_api/api/billing_api.py
+++ b/frontier_api/api/billing_api.py
@@ -13,22 +13,16 @@
""" # noqa: E501
+import re # noqa: F401
import io
import warnings
-from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
-from typing import Dict, List, Optional, Tuple, Union, Any
+from pydantic import validate_arguments, ValidationError
-try:
- from typing import Annotated
-except ImportError:
- from typing_extensions import Annotated
-
-from pydantic import Field
from typing_extensions import Annotated
-from pydantic import StrictStr
+from pydantic import Field, StrictStr
-from typing import Any, Dict, Union
+from typing import Any, Dict
from frontier_api.models.frontier_service_create_billing_account_request import FrontierServiceCreateBillingAccountRequest
from frontier_api.models.v1beta1_create_billing_account_response import V1beta1CreateBillingAccountResponse
@@ -39,7 +33,10 @@
from frontier_api.api_client import ApiClient
from frontier_api.api_response import ApiResponse
-from frontier_api.rest import RESTResponseType
+from frontier_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class BillingApi:
@@ -54,1502 +51,780 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client
+ @validate_arguments
+ def frontier_service_create_billing_account(self, org_id : Annotated[StrictStr, Field(..., description="ID of the organization to create the billing account for")], body : FrontierServiceCreateBillingAccountRequest, **kwargs) -> V1beta1CreateBillingAccountResponse: # noqa: E501
+ """Create billing account # noqa: E501
- @validate_call
- def frontier_service_create_billing_account(
- self,
- org_id: Annotated[StrictStr, Field(description="ID of the organization to create the billing account for")],
- body: FrontierServiceCreateBillingAccountRequest,
- _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,
- ) -> V1beta1CreateBillingAccountResponse:
- """Create billing account
+ Create a new billing account for an organization. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Create a new billing account for an organization.
+ >>> thread = api.frontier_service_create_billing_account(org_id, body, async_req=True)
+ >>> result = thread.get()
:param org_id: ID of the organization to create the billing account for (required)
:type org_id: str
:param body: (required)
:type body: FrontierServiceCreateBillingAccountRequest
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_billing_account_serialize(
- org_id=org_id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateBillingAccountResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_billing_account_with_http_info(
- self,
- org_id: Annotated[StrictStr, Field(description="ID of the organization to create the billing account for")],
- body: FrontierServiceCreateBillingAccountRequest,
- _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[V1beta1CreateBillingAccountResponse]:
- """Create billing account
-
- Create a new billing account for an organization.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CreateBillingAccountResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_create_billing_account_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_create_billing_account_with_http_info(org_id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_create_billing_account_with_http_info(self, org_id : Annotated[StrictStr, Field(..., description="ID of the organization to create the billing account for")], body : FrontierServiceCreateBillingAccountRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Create billing account # noqa: E501
+
+ Create a new billing account for an organization. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_create_billing_account_with_http_info(org_id, body, async_req=True)
+ >>> result = thread.get()
:param org_id: ID of the organization to create the billing account for (required)
:type org_id: str
:param body: (required)
:type body: FrontierServiceCreateBillingAccountRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_billing_account_serialize(
- org_id=org_id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateBillingAccountResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CreateBillingAccountResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_create_billing_account_without_preload_content(
- self,
- org_id: Annotated[StrictStr, Field(description="ID of the organization to create the billing account for")],
- body: FrontierServiceCreateBillingAccountRequest,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'org_id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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 billing account
-
- Create a new billing account for an organization.
-
- :param org_id: ID of the organization to create the billing account for (required)
- :type org_id: str
- :param body: (required)
- :type body: FrontierServiceCreateBillingAccountRequest
- :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._frontier_service_create_billing_account_serialize(
- org_id=org_id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateBillingAccountResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_create_billing_account_serialize(
- self,
- org_id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_create_billing_account" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1CreateBillingAccountResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/organizations/{orgId}/billing',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/billing', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_delete_billing_account(self, org_id : StrictStr, id : Annotated[StrictStr, Field(..., description="ID of the billing account to delete")], **kwargs) -> object: # noqa: E501
+ """Delete billing account # noqa: E501
+ Delete a billing account by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_delete_billing_account(
- self,
- org_id: StrictStr,
- id: Annotated[StrictStr, Field(description="ID of the billing account to delete")],
- _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:
- """Delete billing account
-
- Delete a billing account by ID.
+ >>> thread = api.frontier_service_delete_billing_account(org_id, id, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
:param id: ID of the billing account to delete (required)
:type id: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_delete_billing_account_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_delete_billing_account_with_http_info(
- self,
- org_id: StrictStr,
- id: Annotated[StrictStr, Field(description="ID of the billing account to delete")],
- _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]:
- """Delete billing account
-
- Delete a billing account by ID.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_delete_billing_account_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_delete_billing_account_with_http_info(org_id, id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_delete_billing_account_with_http_info(self, org_id : StrictStr, id : Annotated[StrictStr, Field(..., description="ID of the billing account to delete")], **kwargs) -> ApiResponse: # noqa: E501
+ """Delete billing account # noqa: E501
+
+ Delete a billing account by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_delete_billing_account_with_http_info(org_id, id, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
:param id: ID of the billing account to delete (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_delete_billing_account_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_delete_billing_account_without_preload_content(
- self,
- org_id: StrictStr,
- id: Annotated[StrictStr, Field(description="ID of the billing account to delete")],
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'org_id',
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Delete billing account
-
- Delete a billing account by ID.
-
- :param org_id: (required)
- :type org_id: str
- :param id: ID of the billing account to delete (required)
- :type id: str
- :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._frontier_service_delete_billing_account_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
)
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_delete_billing_account" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_delete_billing_account_serialize(
- self,
- org_id,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _collection_formats = {}
- _host = None
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "object",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='DELETE',
- resource_path='/v1beta1/organizations/{orgId}/billing/{id}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/billing/{id}', 'DELETE',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_get_billing_account(self, org_id : StrictStr, id : Annotated[StrictStr, Field(..., description="ID of the billing account to get")], **kwargs) -> V1beta1GetBillingAccountResponse: # noqa: E501
+ """Get billing account # noqa: E501
+ Get a billing account by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
-
- @validate_call
- def frontier_service_get_billing_account(
- self,
- org_id: StrictStr,
- id: Annotated[StrictStr, Field(description="ID of the billing account to get")],
- _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,
- ) -> V1beta1GetBillingAccountResponse:
- """Get billing account
-
- Get a billing account by ID.
+ >>> thread = api.frontier_service_get_billing_account(org_id, id, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
:param id: ID of the billing account to get (required)
:type id: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_get_billing_account_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetBillingAccountResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_billing_account_with_http_info(
- self,
- org_id: StrictStr,
- id: Annotated[StrictStr, Field(description="ID of the billing account to get")],
- _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[V1beta1GetBillingAccountResponse]:
- """Get billing account
-
- Get a billing account by ID.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1GetBillingAccountResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_get_billing_account_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_get_billing_account_with_http_info(org_id, id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_get_billing_account_with_http_info(self, org_id : StrictStr, id : Annotated[StrictStr, Field(..., description="ID of the billing account to get")], **kwargs) -> ApiResponse: # noqa: E501
+ """Get billing account # noqa: E501
+
+ Get a billing account by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_get_billing_account_with_http_info(org_id, id, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
:param id: ID of the billing account to get (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_get_billing_account_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetBillingAccountResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1GetBillingAccountResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_get_billing_account_without_preload_content(
- self,
- org_id: StrictStr,
- id: Annotated[StrictStr, Field(description="ID of the billing account to get")],
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'org_id',
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Get billing account
-
- Get a billing account by ID.
-
- :param org_id: (required)
- :type org_id: str
- :param id: ID of the billing account to get (required)
- :type id: str
- :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._frontier_service_get_billing_account_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetBillingAccountResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_get_billing_account" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+ _collection_formats = {}
- def _frontier_service_get_billing_account_serialize(
- self,
- org_id,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _host = None
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1GetBillingAccountResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/organizations/{orgId}/billing/{id}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/billing/{id}', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_get_billing_balance(self, org_id : StrictStr, id : Annotated[StrictStr, Field(..., description="ID of the billing account to get the balance for")], **kwargs) -> V1beta1GetBillingBalanceResponse: # noqa: E501
+ """Get billing balance # noqa: E501
+ Get the balance of a billing account by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_get_billing_balance(
- self,
- org_id: StrictStr,
- id: Annotated[StrictStr, Field(description="ID of the billing account to get the balance for")],
- _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,
- ) -> V1beta1GetBillingBalanceResponse:
- """Get billing balance
-
- Get the balance of a billing account by ID.
+ >>> thread = api.frontier_service_get_billing_balance(org_id, id, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
:param id: ID of the billing account to get the balance for (required)
:type id: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_get_billing_balance_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetBillingBalanceResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_billing_balance_with_http_info(
- self,
- org_id: StrictStr,
- id: Annotated[StrictStr, Field(description="ID of the billing account to get the balance for")],
- _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[V1beta1GetBillingBalanceResponse]:
- """Get billing balance
-
- Get the balance of a billing account by ID.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1GetBillingBalanceResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_get_billing_balance_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_get_billing_balance_with_http_info(org_id, id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_get_billing_balance_with_http_info(self, org_id : StrictStr, id : Annotated[StrictStr, Field(..., description="ID of the billing account to get the balance for")], **kwargs) -> ApiResponse: # noqa: E501
+ """Get billing balance # noqa: E501
+
+ Get the balance of a billing account by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_get_billing_balance_with_http_info(org_id, id, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
:param id: ID of the billing account to get the balance for (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_get_billing_balance_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetBillingBalanceResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1GetBillingBalanceResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_get_billing_balance_without_preload_content(
- self,
- org_id: StrictStr,
- id: Annotated[StrictStr, Field(description="ID of the billing account to get the balance for")],
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'org_id',
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Get billing balance
-
- Get the balance of a billing account by ID.
-
- :param org_id: (required)
- :type org_id: str
- :param id: ID of the billing account to get the balance for (required)
- :type id: str
- :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._frontier_service_get_billing_balance_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetBillingBalanceResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_get_billing_balance" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_get_billing_balance_serialize(
- self,
- org_id,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _collection_formats = {}
- _host = None
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1GetBillingBalanceResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/organizations/{orgId}/billing/{id}/balance',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/billing/{id}/balance', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_billing_accounts(self, org_id : Annotated[StrictStr, Field(..., description="ID of the organization to list billing accounts for")], **kwargs) -> V1beta1ListBillingAccountsResponse: # noqa: E501
+ """List billing accounts # noqa: E501
- @validate_call
- def frontier_service_list_billing_accounts(
- self,
- org_id: Annotated[StrictStr, Field(description="ID of the organization to list billing accounts for")],
- _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,
- ) -> V1beta1ListBillingAccountsResponse:
- """List billing accounts
+ List billing accounts of an organization. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- List billing accounts of an organization.
+ >>> thread = api.frontier_service_list_billing_accounts(org_id, async_req=True)
+ >>> result = thread.get()
:param org_id: ID of the organization to list billing accounts for (required)
:type org_id: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_billing_accounts_serialize(
- org_id=org_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListBillingAccountsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_billing_accounts_with_http_info(
- self,
- org_id: Annotated[StrictStr, Field(description="ID of the organization to list billing accounts for")],
- _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[V1beta1ListBillingAccountsResponse]:
- """List billing accounts
-
- List billing accounts of an organization.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListBillingAccountsResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_billing_accounts_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_billing_accounts_with_http_info(org_id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_billing_accounts_with_http_info(self, org_id : Annotated[StrictStr, Field(..., description="ID of the organization to list billing accounts for")], **kwargs) -> ApiResponse: # noqa: E501
+ """List billing accounts # noqa: E501
+
+ List billing accounts of an organization. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_billing_accounts_with_http_info(org_id, async_req=True)
+ >>> result = thread.get()
:param org_id: ID of the organization to list billing accounts for (required)
:type org_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_billing_accounts_serialize(
- org_id=org_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListBillingAccountsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListBillingAccountsResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_list_billing_accounts_without_preload_content(
- self,
- org_id: Annotated[StrictStr, Field(description="ID of the organization to list billing accounts for")],
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'org_id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """List billing accounts
-
- List billing accounts of an organization.
-
- :param org_id: ID of the organization to list billing accounts for (required)
- :type org_id: str
- :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._frontier_service_list_billing_accounts_serialize(
- org_id=org_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListBillingAccountsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_list_billing_accounts_serialize(
- self,
- org_id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_billing_accounts" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/organizations/{orgId}/billing',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ _response_types_map = {
+ '200': "V1beta1ListBillingAccountsResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
+
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/billing', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_update_billing_account(self, org_id : StrictStr, id : Annotated[StrictStr, Field(..., description="ID of the billing account to update")], body : FrontierServiceCreateBillingAccountRequest, **kwargs) -> V1beta1UpdateBillingAccountResponse: # noqa: E501
+ """Update billing account # noqa: E501
+ Update a billing account by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
-
- @validate_call
- def frontier_service_update_billing_account(
- self,
- org_id: StrictStr,
- id: Annotated[StrictStr, Field(description="ID of the billing account to update")],
- body: FrontierServiceCreateBillingAccountRequest,
- _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,
- ) -> V1beta1UpdateBillingAccountResponse:
- """Update billing account
-
- Update a billing account by ID.
+ >>> thread = api.frontier_service_update_billing_account(org_id, id, body, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
@@ -1557,81 +832,33 @@ def frontier_service_update_billing_account(
:type id: str
:param body: (required)
:type body: FrontierServiceCreateBillingAccountRequest
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_update_billing_account_serialize(
- org_id=org_id,
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateBillingAccountResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_update_billing_account_with_http_info(
- self,
- org_id: StrictStr,
- id: Annotated[StrictStr, Field(description="ID of the billing account to update")],
- body: FrontierServiceCreateBillingAccountRequest,
- _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[V1beta1UpdateBillingAccountResponse]:
- """Update billing account
-
- Update a billing account by ID.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1UpdateBillingAccountResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_update_billing_account_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_update_billing_account_with_http_info(org_id, id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_update_billing_account_with_http_info(self, org_id : StrictStr, id : Annotated[StrictStr, Field(..., description="ID of the billing account to update")], body : FrontierServiceCreateBillingAccountRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Update billing account # noqa: E501
+
+ Update a billing account by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_update_billing_account_with_http_info(org_id, id, body, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
@@ -1639,213 +866,119 @@ def frontier_service_update_billing_account_with_http_info(
:type id: str
:param body: (required)
:type body: FrontierServiceCreateBillingAccountRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_update_billing_account_serialize(
- org_id=org_id,
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1UpdateBillingAccountResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateBillingAccountResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ _params = locals()
-
- @validate_call
- def frontier_service_update_billing_account_without_preload_content(
- self,
- org_id: StrictStr,
- id: Annotated[StrictStr, Field(description="ID of the billing account to update")],
- body: FrontierServiceCreateBillingAccountRequest,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'org_id',
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Update billing account
-
- Update a billing account by ID.
-
- :param org_id: (required)
- :type org_id: str
- :param id: ID of the billing account to update (required)
- :type id: str
- :param body: (required)
- :type body: FrontierServiceCreateBillingAccountRequest
- :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._frontier_service_update_billing_account_serialize(
- org_id=org_id,
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateBillingAccountResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_update_billing_account" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_update_billing_account_serialize(
- self,
- org_id,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _collection_formats = {}
- _host = None
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1UpdateBillingAccountResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='PUT',
- resource_path='/v1beta1/organizations/{orgId}/billing/{id}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/billing/{id}', 'PUT',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
diff --git a/frontier_api/api/checkout_api.py b/frontier_api/api/checkout_api.py
index 90d6dfb..957b5fb 100644
--- a/frontier_api/api/checkout_api.py
+++ b/frontier_api/api/checkout_api.py
@@ -13,28 +13,27 @@
""" # noqa: E501
+import re # noqa: F401
import io
import warnings
-from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
-from typing import Dict, List, Optional, Tuple, Union, Any
+from pydantic import validate_arguments, ValidationError
-try:
- from typing import Annotated
-except ImportError:
- from typing_extensions import Annotated
-
-from pydantic import Field
from typing_extensions import Annotated
-from pydantic import StrictStr
+from pydantic import Field, StrictStr
+from frontier_api.models.admin_service_delegated_checkout_request import AdminServiceDelegatedCheckoutRequest
from frontier_api.models.frontier_service_create_checkout_request import FrontierServiceCreateCheckoutRequest
from frontier_api.models.v1beta1_create_checkout_response import V1beta1CreateCheckoutResponse
+from frontier_api.models.v1beta1_delegated_checkout_response import V1beta1DelegatedCheckoutResponse
from frontier_api.models.v1beta1_list_checkouts_response import V1beta1ListCheckoutsResponse
from frontier_api.api_client import ApiClient
from frontier_api.api_response import ApiResponse
-from frontier_api.rest import RESTResponseType
+from frontier_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class CheckoutApi:
@@ -49,193 +48,184 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client
+ @validate_arguments
+ def admin_service_delegated_checkout(self, org_id : StrictStr, billing_id : Annotated[StrictStr, Field(..., description="ID of the billing account to update the subscription for")], body : AdminServiceDelegatedCheckoutRequest, **kwargs) -> V1beta1DelegatedCheckoutResponse: # noqa: E501
+ """Checkout a feature or subscription # noqa: E501
- @validate_call
- def frontier_service_create_checkout(
- self,
- org_id: StrictStr,
- billing_id: Annotated[StrictStr, Field(description="ID of the billing account to update the subscription for")],
- body: FrontierServiceCreateCheckoutRequest,
- _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,
- ) -> V1beta1CreateCheckoutResponse:
- """Checkout a feature or subscription
+ Checkout a feature to buy it one time or start a subscription plan on a billing account manually. It bypasses billing engine. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Checkout a feature to buy it one time or start a subscription plan on a billing account.
+ >>> thread = api.admin_service_delegated_checkout(org_id, billing_id, body, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
:param billing_id: ID of the billing account to update the subscription for (required)
:type billing_id: str
:param body: (required)
- :type body: FrontierServiceCreateCheckoutRequest
- :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
+ :type body: AdminServiceDelegatedCheckoutRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_checkout_serialize(
- org_id=org_id,
- billing_id=billing_id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateCheckoutResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_checkout_with_http_info(
- self,
- org_id: StrictStr,
- billing_id: Annotated[StrictStr, Field(description="ID of the billing account to update the subscription for")],
- body: FrontierServiceCreateCheckoutRequest,
- _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[V1beta1CreateCheckoutResponse]:
- """Checkout a feature or subscription
-
- Checkout a feature to buy it one time or start a subscription plan on a billing account.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1DelegatedCheckoutResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the admin_service_delegated_checkout_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.admin_service_delegated_checkout_with_http_info(org_id, billing_id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def admin_service_delegated_checkout_with_http_info(self, org_id : StrictStr, billing_id : Annotated[StrictStr, Field(..., description="ID of the billing account to update the subscription for")], body : AdminServiceDelegatedCheckoutRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Checkout a feature or subscription # noqa: E501
+
+ Checkout a feature to buy it one time or start a subscription plan on a billing account manually. It bypasses billing engine. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.admin_service_delegated_checkout_with_http_info(org_id, billing_id, body, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
:param billing_id: ID of the billing account to update the subscription for (required)
:type billing_id: str
:param body: (required)
- :type body: FrontierServiceCreateCheckoutRequest
+ :type body: AdminServiceDelegatedCheckoutRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_checkout_serialize(
- org_id=org_id,
- billing_id=billing_id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1DelegatedCheckoutResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'org_id',
+ 'billing_id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateCheckoutResponse",
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method admin_service_delegated_checkout" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
+
+ if _params['billing_id']:
+ _path_params['billingId'] = _params['billing_id']
+
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # set the HTTP header `Content-Type`
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1DelegatedCheckoutResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/admin/organizations/{orgId}/billing/{billingId}/checkouts', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_create_checkout(self, org_id : StrictStr, billing_id : Annotated[StrictStr, Field(..., description="ID of the billing account to update the subscription for")], body : FrontierServiceCreateCheckoutRequest, **kwargs) -> V1beta1CreateCheckoutResponse: # noqa: E501
+ """Checkout a feature or subscription # noqa: E501
- @validate_call
- def frontier_service_create_checkout_without_preload_content(
- self,
- org_id: StrictStr,
- billing_id: Annotated[StrictStr, Field(description="ID of the billing account to update the subscription for")],
- body: FrontierServiceCreateCheckoutRequest,
- _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:
- """Checkout a feature or subscription
+ Checkout a feature to buy it one time or start a subscription plan on a billing account. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Checkout a feature to buy it one time or start a subscription plan on a billing account.
+ >>> thread = api.frontier_service_create_checkout(org_id, billing_id, body, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
@@ -243,426 +233,306 @@ def frontier_service_create_checkout_without_preload_content(
:type billing_id: str
:param body: (required)
:type body: FrontierServiceCreateCheckoutRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CreateCheckoutResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_create_checkout_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_create_checkout_with_http_info(org_id, billing_id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_create_checkout_with_http_info(self, org_id : StrictStr, billing_id : Annotated[StrictStr, Field(..., description="ID of the billing account to update the subscription for")], body : FrontierServiceCreateCheckoutRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Checkout a feature or subscription # noqa: E501
+
+ Checkout a feature to buy it one time or start a subscription plan on a billing account. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_create_checkout_with_http_info(org_id, billing_id, body, async_req=True)
+ >>> result = thread.get()
+
+ :param org_id: (required)
+ :type org_id: str
+ :param billing_id: ID of the billing account to update the subscription for (required)
+ :type billing_id: str
+ :param body: (required)
+ :type body: FrontierServiceCreateCheckoutRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_checkout_serialize(
- org_id=org_id,
- billing_id=billing_id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CreateCheckoutResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateCheckoutResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
+ _params = locals()
+
+ _all_params = [
+ 'org_id',
+ 'billing_id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_create_checkout" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_create_checkout_serialize(
- self,
- org_id,
- billing_id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _collection_formats = {}
- _host = None
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['billing_id']:
+ _path_params['billingId'] = _params['billing_id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if billing_id is not None:
- _path_params['billingId'] = billing_id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1CreateCheckoutResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/organizations/{orgId}/billing/{billingId}/checkouts',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/billing/{billingId}/checkouts', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_checkouts(self, org_id : StrictStr, billing_id : Annotated[StrictStr, Field(..., description="ID of the billing account to update the subscription for")], **kwargs) -> V1beta1ListCheckoutsResponse: # noqa: E501
+ """List checkouts # noqa: E501
+ List all checkouts of a billing account. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_list_checkouts(
- self,
- org_id: StrictStr,
- billing_id: Annotated[StrictStr, Field(description="ID of the billing account to update the subscription for")],
- _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,
- ) -> V1beta1ListCheckoutsResponse:
- """List checkouts
-
- List all checkouts of a billing account.
+ >>> thread = api.frontier_service_list_checkouts(org_id, billing_id, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
:param billing_id: ID of the billing account to update the subscription for (required)
:type billing_id: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_checkouts_serialize(
- org_id=org_id,
- billing_id=billing_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListCheckoutsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_checkouts_with_http_info(
- self,
- org_id: StrictStr,
- billing_id: Annotated[StrictStr, Field(description="ID of the billing account to update the subscription for")],
- _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[V1beta1ListCheckoutsResponse]:
- """List checkouts
-
- List all checkouts of a billing account.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListCheckoutsResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_checkouts_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_checkouts_with_http_info(org_id, billing_id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_checkouts_with_http_info(self, org_id : StrictStr, billing_id : Annotated[StrictStr, Field(..., description="ID of the billing account to update the subscription for")], **kwargs) -> ApiResponse: # noqa: E501
+ """List checkouts # noqa: E501
+
+ List all checkouts of a billing account. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_checkouts_with_http_info(org_id, billing_id, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
:param billing_id: ID of the billing account to update the subscription for (required)
:type billing_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_checkouts_serialize(
- org_id=org_id,
- billing_id=billing_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListCheckoutsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListCheckoutsResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_list_checkouts_without_preload_content(
- self,
- org_id: StrictStr,
- billing_id: Annotated[StrictStr, Field(description="ID of the billing account to update the subscription for")],
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'org_id',
+ 'billing_id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """List checkouts
-
- List all checkouts of a billing account.
-
- :param org_id: (required)
- :type org_id: str
- :param billing_id: ID of the billing account to update the subscription for (required)
- :type billing_id: str
- :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._frontier_service_list_checkouts_serialize(
- org_id=org_id,
- billing_id=billing_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListCheckoutsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_checkouts" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_list_checkouts_serialize(
- self,
- org_id,
- billing_id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _collection_formats = {}
- _host = None
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['billing_id']:
+ _path_params['billingId'] = _params['billing_id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if billing_id is not None:
- _path_params['billingId'] = billing_id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListCheckoutsResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/organizations/{orgId}/billing/{billingId}/checkouts',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/billing/{billingId}/checkouts', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
diff --git a/frontier_api/api/entitlement_api.py b/frontier_api/api/entitlement_api.py
index be4fe92..f27fbe0 100644
--- a/frontier_api/api/entitlement_api.py
+++ b/frontier_api/api/entitlement_api.py
@@ -13,27 +13,24 @@
""" # noqa: E501
+import re # noqa: F401
import io
import warnings
-from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
-from typing import Dict, List, Optional, Tuple, Union, Any
+from pydantic import validate_arguments, ValidationError
-try:
- from typing import Annotated
-except ImportError:
- from typing_extensions import Annotated
-
-from pydantic import Field
from typing_extensions import Annotated
-from pydantic import StrictStr
+from pydantic import Field, StrictStr
from frontier_api.models.frontier_service_check_feature_entitlement_request import FrontierServiceCheckFeatureEntitlementRequest
from frontier_api.models.v1beta1_check_feature_entitlement_response import V1beta1CheckFeatureEntitlementResponse
from frontier_api.api_client import ApiClient
from frontier_api.api_response import ApiResponse
-from frontier_api.rest import RESTResponseType
+from frontier_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class EntitlementApi:
@@ -48,29 +45,16 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client
+ @validate_arguments
+ def frontier_service_check_feature_entitlement(self, org_id : StrictStr, billing_id : Annotated[StrictStr, Field(..., description="ID of the billing account to update the subscription for")], body : FrontierServiceCheckFeatureEntitlementRequest, **kwargs) -> V1beta1CheckFeatureEntitlementResponse: # noqa: E501
+ """Check entitlement # noqa: E501
- @validate_call
- def frontier_service_check_feature_entitlement(
- self,
- org_id: StrictStr,
- billing_id: Annotated[StrictStr, Field(description="ID of the billing account to update the subscription for")],
- body: FrontierServiceCheckFeatureEntitlementRequest,
- _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,
- ) -> V1beta1CheckFeatureEntitlementResponse:
- """Check entitlement
+ Check if a billing account is entitled to a feature. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Check if a billing account is entitled to a feature.
+ >>> thread = api.frontier_service_check_feature_entitlement(org_id, billing_id, body, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
@@ -78,81 +62,33 @@ def frontier_service_check_feature_entitlement(
:type billing_id: str
:param body: (required)
:type body: FrontierServiceCheckFeatureEntitlementRequest
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_check_feature_entitlement_serialize(
- org_id=org_id,
- billing_id=billing_id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CheckFeatureEntitlementResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_check_feature_entitlement_with_http_info(
- self,
- org_id: StrictStr,
- billing_id: Annotated[StrictStr, Field(description="ID of the billing account to update the subscription for")],
- body: FrontierServiceCheckFeatureEntitlementRequest,
- _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[V1beta1CheckFeatureEntitlementResponse]:
- """Check entitlement
-
- Check if a billing account is entitled to a feature.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CheckFeatureEntitlementResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_check_feature_entitlement_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_check_feature_entitlement_with_http_info(org_id, billing_id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_check_feature_entitlement_with_http_info(self, org_id : StrictStr, billing_id : Annotated[StrictStr, Field(..., description="ID of the billing account to update the subscription for")], body : FrontierServiceCheckFeatureEntitlementRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Check entitlement # noqa: E501
+
+ Check if a billing account is entitled to a feature. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_check_feature_entitlement_with_http_info(org_id, billing_id, body, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
@@ -160,213 +96,119 @@ def frontier_service_check_feature_entitlement_with_http_info(
:type billing_id: str
:param body: (required)
:type body: FrontierServiceCheckFeatureEntitlementRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_check_feature_entitlement_serialize(
- org_id=org_id,
- billing_id=billing_id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CheckFeatureEntitlementResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CheckFeatureEntitlementResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_check_feature_entitlement_without_preload_content(
- self,
- org_id: StrictStr,
- billing_id: Annotated[StrictStr, Field(description="ID of the billing account to update the subscription for")],
- body: FrontierServiceCheckFeatureEntitlementRequest,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'org_id',
+ 'billing_id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Check entitlement
-
- Check if a billing account is entitled to a feature.
-
- :param org_id: (required)
- :type org_id: str
- :param billing_id: ID of the billing account to update the subscription for (required)
- :type billing_id: str
- :param body: (required)
- :type body: FrontierServiceCheckFeatureEntitlementRequest
- :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._frontier_service_check_feature_entitlement_serialize(
- org_id=org_id,
- billing_id=billing_id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CheckFeatureEntitlementResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
)
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_check_feature_entitlement" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_check_feature_entitlement_serialize(
- self,
- org_id,
- billing_id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _collection_formats = {}
- _host = None
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['billing_id']:
+ _path_params['billingId'] = _params['billing_id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if billing_id is not None:
- _path_params['billingId'] = billing_id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1CheckFeatureEntitlementResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/organizations/{orgId}/billing/{billingId}/check',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/billing/{billingId}/check', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
diff --git a/frontier_api/api/feature_api.py b/frontier_api/api/feature_api.py
index a76c4ed..eb3d086 100644
--- a/frontier_api/api/feature_api.py
+++ b/frontier_api/api/feature_api.py
@@ -13,20 +13,14 @@
""" # noqa: E501
+import re # noqa: F401
import io
import warnings
-from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
-from typing import Dict, List, Optional, Tuple, Union, Any
+from pydantic import validate_arguments, ValidationError
-try:
- from typing import Annotated
-except ImportError:
- from typing_extensions import Annotated
-
-from pydantic import Field
from typing_extensions import Annotated
-from pydantic import StrictStr
+from pydantic import Field, StrictStr
from frontier_api.models.frontier_service_update_feature_request import FrontierServiceUpdateFeatureRequest
from frontier_api.models.v1beta1_create_feature_request import V1beta1CreateFeatureRequest
@@ -37,7 +31,10 @@
from frontier_api.api_client import ApiClient
from frontier_api.api_response import ApiResponse
-from frontier_api.rest import RESTResponseType
+from frontier_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class FeatureApi:
@@ -52,1148 +49,596 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client
+ @validate_arguments
+ def frontier_service_create_feature(self, body : V1beta1CreateFeatureRequest, **kwargs) -> V1beta1CreateFeatureResponse: # noqa: E501
+ """Create feature # noqa: E501
- @validate_call
- def frontier_service_create_feature(
- self,
- body: V1beta1CreateFeatureRequest,
- _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,
- ) -> V1beta1CreateFeatureResponse:
- """Create feature
+ Create a new feature for platform. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Create a new feature for platform.
+ >>> thread = api.frontier_service_create_feature(body, async_req=True)
+ >>> result = thread.get()
:param body: (required)
:type body: V1beta1CreateFeatureRequest
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_feature_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateFeatureResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_feature_with_http_info(
- self,
- body: V1beta1CreateFeatureRequest,
- _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[V1beta1CreateFeatureResponse]:
- """Create feature
-
- Create a new feature for platform.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CreateFeatureResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_create_feature_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_create_feature_with_http_info(body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_create_feature_with_http_info(self, body : V1beta1CreateFeatureRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Create feature # noqa: E501
+
+ Create a new feature for platform. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_create_feature_with_http_info(body, async_req=True)
+ >>> result = thread.get()
:param body: (required)
:type body: V1beta1CreateFeatureRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_feature_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateFeatureResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CreateFeatureResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_create_feature_without_preload_content(
- self,
- body: V1beta1CreateFeatureRequest,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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 feature
-
- Create a new feature for platform.
-
- :param body: (required)
- :type body: V1beta1CreateFeatureRequest
- :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._frontier_service_create_feature_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateFeatureResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
)
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_create_feature" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_create_feature_serialize(
- self,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
+ _path_params = {}
+
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/billing/features',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ _response_types_map = {
+ '200': "V1beta1CreateFeatureResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
+
+ return self.api_client.call_api(
+ '/v1beta1/billing/features', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_get_feature(self, id : Annotated[StrictStr, Field(..., description="ID of the feature to get")], **kwargs) -> V1beta1GetFeatureResponse: # noqa: E501
+ """Get feature # noqa: E501
- @validate_call
- def frontier_service_get_feature(
- self,
- id: Annotated[StrictStr, Field(description="ID of the feature to get")],
- _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,
- ) -> V1beta1GetFeatureResponse:
- """Get feature
+ Get a feature by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Get a feature by ID.
+ >>> thread = api.frontier_service_get_feature(id, async_req=True)
+ >>> result = thread.get()
:param id: ID of the feature to get (required)
:type id: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_get_feature_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetFeatureResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_feature_with_http_info(
- self,
- id: Annotated[StrictStr, Field(description="ID of the feature to get")],
- _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[V1beta1GetFeatureResponse]:
- """Get feature
-
- Get a feature by ID.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1GetFeatureResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_get_feature_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_get_feature_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_get_feature_with_http_info(self, id : Annotated[StrictStr, Field(..., description="ID of the feature to get")], **kwargs) -> ApiResponse: # noqa: E501
+ """Get feature # noqa: E501
+
+ Get a feature by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_get_feature_with_http_info(id, async_req=True)
+ >>> result = thread.get()
:param id: ID of the feature to get (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_get_feature_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetFeatureResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1GetFeatureResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_get_feature_without_preload_content(
- self,
- id: Annotated[StrictStr, Field(description="ID of the feature to get")],
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Get feature
-
- Get a feature by ID.
-
- :param id: ID of the feature to get (required)
- :type id: str
- :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._frontier_service_get_feature_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetFeatureResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
)
- return response_data.response
-
- def _frontier_service_get_feature_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_get_feature" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/billing/features/{id}',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_list_features(
- self,
- _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,
- ) -> V1beta1ListFeaturesResponse:
- """List features
-
- List all features of a platform.
+ _auth_settings = ['Basic'] # noqa: E501
- :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._frontier_service_list_features_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListFeaturesResponse",
+ _response_types_map = {
+ '200': "V1beta1GetFeatureResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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 frontier_service_list_features_with_http_info(
- self,
- _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[V1beta1ListFeaturesResponse]:
- """List features
-
- List all features of a platform.
-
- :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._frontier_service_list_features_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListFeaturesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
+ return self.api_client.call_api(
+ '/v1beta1/billing/features/{id}', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_features(self, **kwargs) -> V1beta1ListFeaturesResponse: # noqa: E501
+ """List features # noqa: E501
- @validate_call
- def frontier_service_list_features_without_preload_content(
- self,
- _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:
- """List features
+ List all features of a platform. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- List all features of a platform.
+ >>> thread = api.frontier_service_list_features(async_req=True)
+ >>> result = thread.get()
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListFeaturesResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_features_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_features_with_http_info(**kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_features_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
+ """List features # noqa: E501
+
+ List all features of a platform. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_features_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListFeaturesResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _param = self._frontier_service_list_features_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ _params = locals()
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListFeaturesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
+ _all_params = [
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- return response_data.response
-
-
- def _frontier_service_list_features_serialize(
- self,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
- _host = None
-
- _collection_formats: Dict[str, str] = {
-
- }
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_features" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
+ _path_params = {}
+
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/billing/features',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ _response_types_map = {
+ '200': "V1beta1ListFeaturesResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
+
+ return self.api_client.call_api(
+ '/v1beta1/billing/features', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_update_feature(self, id : Annotated[StrictStr, Field(..., description="ID of the feature to update")], body : FrontierServiceUpdateFeatureRequest, **kwargs) -> V1beta1UpdateFeatureResponse: # noqa: E501
+ """Update feature # noqa: E501
+ Update a feature by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_update_feature(
- self,
- id: Annotated[StrictStr, Field(description="ID of the feature to update")],
- body: FrontierServiceUpdateFeatureRequest,
- _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,
- ) -> V1beta1UpdateFeatureResponse:
- """Update feature
-
- Update a feature by ID.
+ >>> thread = api.frontier_service_update_feature(id, body, async_req=True)
+ >>> result = thread.get()
:param id: ID of the feature to update (required)
:type id: str
:param body: (required)
:type body: FrontierServiceUpdateFeatureRequest
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_update_feature_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateFeatureResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_update_feature_with_http_info(
- self,
- id: Annotated[StrictStr, Field(description="ID of the feature to update")],
- body: FrontierServiceUpdateFeatureRequest,
- _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[V1beta1UpdateFeatureResponse]:
- """Update feature
-
- Update a feature by ID.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1UpdateFeatureResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_update_feature_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_update_feature_with_http_info(id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_update_feature_with_http_info(self, id : Annotated[StrictStr, Field(..., description="ID of the feature to update")], body : FrontierServiceUpdateFeatureRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Update feature # noqa: E501
+
+ Update a feature by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_update_feature_with_http_info(id, body, async_req=True)
+ >>> result = thread.get()
:param id: ID of the feature to update (required)
:type id: str
:param body: (required)
:type body: FrontierServiceUpdateFeatureRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_update_feature_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1UpdateFeatureResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateFeatureResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ _params = locals()
-
- @validate_call
- def frontier_service_update_feature_without_preload_content(
- self,
- id: Annotated[StrictStr, Field(description="ID of the feature to update")],
- body: FrontierServiceUpdateFeatureRequest,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Update feature
-
- Update a feature by ID.
-
- :param id: ID of the feature to update (required)
- :type id: str
- :param body: (required)
- :type body: FrontierServiceUpdateFeatureRequest
- :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._frontier_service_update_feature_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateFeatureResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
)
- return response_data.response
-
- def _frontier_service_update_feature_serialize(
- self,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_update_feature" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='PUT',
- resource_path='/v1beta1/billing/features/{id}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ _response_types_map = {
+ '200': "V1beta1UpdateFeatureResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
+
+ return self.api_client.call_api(
+ '/v1beta1/billing/features/{id}', 'PUT',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
diff --git a/frontier_api/api/group_api.py b/frontier_api/api/group_api.py
index 8206445..146755a 100644
--- a/frontier_api/api/group_api.py
+++ b/frontier_api/api/group_api.py
@@ -13,22 +13,16 @@
""" # noqa: E501
+import re # noqa: F401
import io
import warnings
-from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
-from typing import Dict, List, Optional, Tuple, Union, Any
+from pydantic import validate_arguments, ValidationError
-try:
- from typing import Annotated
-except ImportError:
- from typing_extensions import Annotated
-
-from pydantic import Field
from typing_extensions import Annotated
-from pydantic import StrictBool, StrictStr
+from pydantic import Field, StrictBool, StrictStr, conlist
-from typing import Any, Dict, List, Optional, Union
+from typing import Any, Dict, Optional
from frontier_api.models.frontier_service_add_group_users_request import FrontierServiceAddGroupUsersRequest
from frontier_api.models.v1beta1_create_group_response import V1beta1CreateGroupResponse
@@ -41,7 +35,10 @@
from frontier_api.api_client import ApiClient
from frontier_api.api_response import ApiResponse
-from frontier_api.rest import RESTResponseType
+from frontier_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class GroupApi:
@@ -56,1899 +53,985 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client
+ @validate_arguments
+ def admin_service_list_groups(self, org_id : Annotated[Optional[StrictStr], Field(description="The organization id to filter by.")] = None, state : Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None, **kwargs) -> V1beta1ListGroupsResponse: # noqa: E501
+ """List all groups # noqa: E501
- @validate_call
- def admin_service_list_groups(
- self,
- org_id: Annotated[Optional[StrictStr], Field(description="The organization id to filter by.")] = None,
- state: Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None,
- _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,
- ) -> V1beta1ListGroupsResponse:
- """List all groups
+ Lists all the groups from all the organizations in a Frontier instance. It can be filtered by organization and state. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Lists all the groups from all the organizations in a Frontier instance. It can be filtered by organization and state.
+ >>> thread = api.admin_service_list_groups(org_id, state, async_req=True)
+ >>> result = thread.get()
:param org_id: The organization id to filter by.
:type org_id: str
:param state: The state to filter by. It can be enabled or disabled.
:type state: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_list_groups_serialize(
- org_id=org_id,
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListGroupsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 admin_service_list_groups_with_http_info(
- self,
- org_id: Annotated[Optional[StrictStr], Field(description="The organization id to filter by.")] = None,
- state: Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None,
- _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[V1beta1ListGroupsResponse]:
- """List all groups
-
- Lists all the groups from all the organizations in a Frontier instance. It can be filtered by organization and state.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListGroupsResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the admin_service_list_groups_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.admin_service_list_groups_with_http_info(org_id, state, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def admin_service_list_groups_with_http_info(self, org_id : Annotated[Optional[StrictStr], Field(description="The organization id to filter by.")] = None, state : Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """List all groups # noqa: E501
+
+ Lists all the groups from all the organizations in a Frontier instance. It can be filtered by organization and state. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.admin_service_list_groups_with_http_info(org_id, state, async_req=True)
+ >>> result = thread.get()
:param org_id: The organization id to filter by.
:type org_id: str
:param state: The state to filter by. It can be enabled or disabled.
:type state: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_list_groups_serialize(
- org_id=org_id,
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListGroupsResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'org_id',
+ 'state'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method admin_service_list_groups" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+
+ # process the query parameters
+ _query_params = []
+ if _params.get('org_id') is not None: # noqa: E501
+ _query_params.append(('orgId', _params['org_id']))
+
+ if _params.get('state') is not None: # noqa: E501
+ _query_params.append(('state', _params['state']))
+
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
'200': "V1beta1ListGroupsResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/admin/groups', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_add_group_users(self, org_id : StrictStr, id : StrictStr, body : FrontierServiceAddGroupUsersRequest, **kwargs) -> object: # noqa: E501
+ """Add group user # noqa: E501
- @validate_call
- def admin_service_list_groups_without_preload_content(
- self,
- org_id: Annotated[Optional[StrictStr], Field(description="The organization id to filter by.")] = None,
- state: Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None,
- _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:
- """List all groups
+ Adds a principle(user and service-users) to a group, existing users in the group will be ignored. A group can't have nested groups as members. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Lists all the groups from all the organizations in a Frontier instance. It can be filtered by organization and state.
+ >>> thread = api.frontier_service_add_group_users(org_id, id, body, async_req=True)
+ >>> result = thread.get()
- :param org_id: The organization id to filter by.
+ :param org_id: (required)
:type org_id: str
- :param state: The state to filter by. It can be enabled or disabled.
- :type state: str
+ :param id: (required)
+ :type id: str
+ :param body: (required)
+ :type body: FrontierServiceAddGroupUsersRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_add_group_users_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_add_group_users_with_http_info(org_id, id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_add_group_users_with_http_info(self, org_id : StrictStr, id : StrictStr, body : FrontierServiceAddGroupUsersRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Add group user # noqa: E501
+
+ Adds a principle(user and service-users) to a group, existing users in the group will be ignored. A group can't have nested groups as members. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_add_group_users_with_http_info(org_id, id, body, async_req=True)
+ >>> result = thread.get()
+
+ :param org_id: (required)
+ :type org_id: str
+ :param id: (required)
+ :type id: str
+ :param body: (required)
+ :type body: FrontierServiceAddGroupUsersRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_list_groups_serialize(
- org_id=org_id,
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListGroupsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
+ _params = locals()
+
+ _all_params = [
+ 'org_id',
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_add_group_users" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _admin_service_list_groups_serialize(
- self,
- org_id,
- state,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _collection_formats = {}
- _host = None
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
# process the query parameters
- if org_id is not None:
-
- _query_params.append(('orgId', org_id))
-
- if state is not None:
-
- _query_params.append(('state', state))
-
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
+ # set the HTTP header `Content-Type`
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "object",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/admin/groups',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/groups/{id}/users', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_create_group(self, org_id : Annotated[StrictStr, Field(..., description="The organization ID to which the group belongs to.")], body : V1beta1GroupRequestBody, **kwargs) -> V1beta1CreateGroupResponse: # noqa: E501
+ """Create group # noqa: E501
+ Create a new group in an organization which serves as a container for users. The group can be assigned roles and permissions and can be used to manage access to resources. Also a group can also be assigned to other groups. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_add_group_users(
- self,
- org_id: StrictStr,
- id: StrictStr,
- body: FrontierServiceAddGroupUsersRequest,
- _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:
- """Add group user
+ >>> thread = api.frontier_service_create_group(org_id, body, async_req=True)
+ >>> result = thread.get()
- Adds a principle(user and service-users) to a group, existing users in the group will be ignored. A group can't have nested groups as members.
+ :param org_id: The organization ID to which the group belongs to. (required)
+ :type org_id: str
+ :param body: (required)
+ :type body: V1beta1GroupRequestBody
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CreateGroupResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_create_group_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_create_group_with_http_info(org_id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_create_group_with_http_info(self, org_id : Annotated[StrictStr, Field(..., description="The organization ID to which the group belongs to.")], body : V1beta1GroupRequestBody, **kwargs) -> ApiResponse: # noqa: E501
+ """Create group # noqa: E501
+
+ Create a new group in an organization which serves as a container for users. The group can be assigned roles and permissions and can be used to manage access to resources. Also a group can also be assigned to other groups. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_create_group_with_http_info(org_id, body, async_req=True)
+ >>> result = thread.get()
- :param org_id: (required)
+ :param org_id: The organization ID to which the group belongs to. (required)
:type org_id: str
- :param id: (required)
- :type id: str
:param body: (required)
- :type body: FrontierServiceAddGroupUsersRequest
+ :type body: V1beta1GroupRequestBody
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_add_group_users_serialize(
- org_id=org_id,
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CreateGroupResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'org_id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_create_group" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
+
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # set the HTTP header `Content-Type`
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1CreateGroupResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/groups', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- ).data
-
-
- @validate_call
- def frontier_service_add_group_users_with_http_info(
- self,
- org_id: StrictStr,
- id: StrictStr,
- body: FrontierServiceAddGroupUsersRequest,
- _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]:
- """Add group user
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+
+ @validate_arguments
+ def frontier_service_delete_group(self, org_id : StrictStr, id : StrictStr, **kwargs) -> object: # noqa: E501
+ """Delete group # noqa: E501
- Adds a principle(user and service-users) to a group, existing users in the group will be ignored. A group can't have nested groups as members.
+ Delete an organization group permanently and all of its relations # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_delete_group(org_id, id, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
:param id: (required)
:type id: str
- :param body: (required)
- :type body: FrontierServiceAddGroupUsersRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_delete_group_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_delete_group_with_http_info(org_id, id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_delete_group_with_http_info(self, org_id : StrictStr, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """Delete group # noqa: E501
+
+ Delete an organization group permanently and all of its relations # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_delete_group_with_http_info(org_id, id, async_req=True)
+ >>> result = thread.get()
+
+ :param org_id: (required)
+ :type org_id: str
+ :param id: (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_add_group_users_serialize(
- org_id=org_id,
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'org_id',
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_delete_group" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
+
+ if _params['id']:
+ _path_params['id'] = _params['id']
+
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
'200': "object",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/groups/{id}', 'DELETE',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_disable_group(self, org_id : StrictStr, id : StrictStr, body : Dict[str, Any], **kwargs) -> object: # noqa: E501
+ """Disable group # noqa: E501
- @validate_call
- def frontier_service_add_group_users_without_preload_content(
- self,
- org_id: StrictStr,
- id: StrictStr,
- body: FrontierServiceAddGroupUsersRequest,
- _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:
- """Add group user
+ Sets the state of the group as disabled. The group will not be available for access control and the existing users in the group will not be able to access any resources that are assigned to the group. No other users can be added to the group while it is disabled. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Adds a principle(user and service-users) to a group, existing users in the group will be ignored. A group can't have nested groups as members.
+ >>> thread = api.frontier_service_disable_group(org_id, id, body, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
:param id: (required)
:type id: str
:param body: (required)
- :type body: FrontierServiceAddGroupUsersRequest
+ :type body: object
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_disable_group_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_disable_group_with_http_info(org_id, id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_disable_group_with_http_info(self, org_id : StrictStr, id : StrictStr, body : Dict[str, Any], **kwargs) -> ApiResponse: # noqa: E501
+ """Disable group # noqa: E501
+
+ Sets the state of the group as disabled. The group will not be available for access control and the existing users in the group will not be able to access any resources that are assigned to the group. No other users can be added to the group while it is disabled. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_disable_group_with_http_info(org_id, id, body, async_req=True)
+ >>> result = thread.get()
+
+ :param org_id: (required)
+ :type org_id: str
+ :param id: (required)
+ :type id: str
+ :param body: (required)
+ :type body: object
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_add_group_users_serialize(
- org_id=org_id,
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
+ _params = locals()
+
+ _all_params = [
+ 'org_id',
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_disable_group" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_add_group_users_serialize(
- self,
- org_id,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _collection_formats = {}
- _host = None
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "object",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/organizations/{orgId}/groups/{id}/users',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/groups/{id}/disable', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_enable_group(self, org_id : StrictStr, id : StrictStr, body : Dict[str, Any], **kwargs) -> object: # noqa: E501
+ """Enable group # noqa: E501
+ Sets the state of the group as enabled. The `enabled` flag is used to determine if the group can be used for access control. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_create_group(
- self,
- org_id: Annotated[StrictStr, Field(description="The organization ID to which the group belongs to.")],
- body: V1beta1GroupRequestBody,
- _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,
- ) -> V1beta1CreateGroupResponse:
- """Create group
+ >>> thread = api.frontier_service_enable_group(org_id, id, body, async_req=True)
+ >>> result = thread.get()
- Create a new group in an organization which serves as a container for users. The group can be assigned roles and permissions and can be used to manage access to resources. Also a group can also be assigned to other groups.
+ :param org_id: (required)
+ :type org_id: str
+ :param id: (required)
+ :type id: str
+ :param body: (required)
+ :type body: object
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_enable_group_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_enable_group_with_http_info(org_id, id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_enable_group_with_http_info(self, org_id : StrictStr, id : StrictStr, body : Dict[str, Any], **kwargs) -> ApiResponse: # noqa: E501
+ """Enable group # noqa: E501
+
+ Sets the state of the group as enabled. The `enabled` flag is used to determine if the group can be used for access control. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_enable_group_with_http_info(org_id, id, body, async_req=True)
+ >>> result = thread.get()
- :param org_id: The organization ID to which the group belongs to. (required)
+ :param org_id: (required)
:type org_id: str
+ :param id: (required)
+ :type id: str
:param body: (required)
- :type body: V1beta1GroupRequestBody
+ :type body: object
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_group_serialize(
- org_id=org_id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateGroupResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_group_with_http_info(
- self,
- org_id: Annotated[StrictStr, Field(description="The organization ID to which the group belongs to.")],
- body: V1beta1GroupRequestBody,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _params = locals()
+
+ _all_params = [
+ 'org_id',
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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[V1beta1CreateGroupResponse]:
- """Create group
-
- Create a new group in an organization which serves as a container for users. The group can be assigned roles and permissions and can be used to manage access to resources. Also a group can also be assigned to other groups.
-
- :param org_id: The organization ID to which the group belongs to. (required)
- :type org_id: str
- :param body: (required)
- :type body: V1beta1GroupRequestBody
- :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._frontier_service_create_group_serialize(
- org_id=org_id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateGroupResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_group_without_preload_content(
- self,
- org_id: Annotated[StrictStr, Field(description="The organization ID to which the group belongs to.")],
- body: V1beta1GroupRequestBody,
- _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 group
-
- Create a new group in an organization which serves as a container for users. The group can be assigned roles and permissions and can be used to manage access to resources. Also a group can also be assigned to other groups.
-
- :param org_id: The organization ID to which the group belongs to. (required)
- :type org_id: str
- :param body: (required)
- :type body: V1beta1GroupRequestBody
- :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._frontier_service_create_group_serialize(
- org_id=org_id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateGroupResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_create_group_serialize(
- self,
- org_id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
- if body is not None:
- _body_params = body
-
-
- # 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] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/organizations/{orgId}/groups',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_delete_group(
- self,
- org_id: StrictStr,
- id: StrictStr,
- _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:
- """Delete group
-
- Delete an organization group permanently and all of its relations
-
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :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._frontier_service_delete_group_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_delete_group_with_http_info(
- self,
- org_id: StrictStr,
- id: StrictStr,
- _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]:
- """Delete group
-
- Delete an organization group permanently and all of its relations
-
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :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._frontier_service_delete_group_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_delete_group_without_preload_content(
- self,
- org_id: StrictStr,
- id: StrictStr,
- _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:
- """Delete group
-
- Delete an organization group permanently and all of its relations
-
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :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._frontier_service_delete_group_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_delete_group_serialize(
- self,
- org_id,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='DELETE',
- resource_path='/v1beta1/organizations/{orgId}/groups/{id}',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_disable_group(
- self,
- org_id: StrictStr,
- id: StrictStr,
- body: Dict[str, Any],
- _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:
- """Disable group
-
- Sets the state of the group as disabled. The group will not be available for access control and the existing users in the group will not be able to access any resources that are assigned to the group. No other users can be added to the group while it is disabled.
-
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: object
- :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._frontier_service_disable_group_serialize(
- org_id=org_id,
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_disable_group_with_http_info(
- self,
- org_id: StrictStr,
- id: StrictStr,
- body: Dict[str, Any],
- _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]:
- """Disable group
-
- Sets the state of the group as disabled. The group will not be available for access control and the existing users in the group will not be able to access any resources that are assigned to the group. No other users can be added to the group while it is disabled.
-
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: object
- :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._frontier_service_disable_group_serialize(
- org_id=org_id,
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_disable_group_without_preload_content(
- self,
- org_id: StrictStr,
- id: StrictStr,
- body: Dict[str, Any],
- _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:
- """Disable group
-
- Sets the state of the group as disabled. The group will not be available for access control and the existing users in the group will not be able to access any resources that are assigned to the group. No other users can be added to the group while it is disabled.
-
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: object
- :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._frontier_service_disable_group_serialize(
- org_id=org_id,
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_disable_group_serialize(
- self,
- org_id,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
- if body is not None:
- _body_params = body
-
-
- # 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] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/organizations/{orgId}/groups/{id}/disable',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_enable_group(
- self,
- org_id: StrictStr,
- id: StrictStr,
- body: Dict[str, Any],
- _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:
- """Enable group
-
- Sets the state of the group as enabled. The `enabled` flag is used to determine if the group can be used for access control.
-
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: object
- :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._frontier_service_enable_group_serialize(
- org_id=org_id,
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_enable_group_with_http_info(
- self,
- org_id: StrictStr,
- id: StrictStr,
- body: Dict[str, Any],
- _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]:
- """Enable group
-
- Sets the state of the group as enabled. The `enabled` flag is used to determine if the group can be used for access control.
-
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: object
- :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._frontier_service_enable_group_serialize(
- org_id=org_id,
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_enable_group_without_preload_content(
- self,
- org_id: StrictStr,
- id: StrictStr,
- body: Dict[str, Any],
- _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:
- """Enable group
-
- Sets the state of the group as enabled. The `enabled` flag is used to determine if the group can be used for access control.
-
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: object
- :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._frontier_service_enable_group_serialize(
- org_id=org_id,
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ )
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_enable_group" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_enable_group_serialize(
- self,
- org_id,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _collection_formats = {}
- _host = None
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "object",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/organizations/{orgId}/groups/{id}/enable',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/groups/{id}/enable', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_get_group(self, org_id : StrictStr, id : StrictStr, with_members : Optional[StrictBool] = None, **kwargs) -> V1beta1GetGroupResponse: # noqa: E501
+ """Get group # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
-
- @validate_call
- def frontier_service_get_group(
- self,
- org_id: StrictStr,
- id: StrictStr,
- with_members: Optional[StrictBool] = None,
- _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,
- ) -> V1beta1GetGroupResponse:
- """Get group
-
+ >>> thread = api.frontier_service_get_group(org_id, id, with_members, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
@@ -1956,80 +1039,32 @@ def frontier_service_get_group(
:type id: str
:param with_members:
:type with_members: bool
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_get_group_serialize(
- org_id=org_id,
- id=id,
- with_members=with_members,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetGroupResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_group_with_http_info(
- self,
- org_id: StrictStr,
- id: StrictStr,
- with_members: Optional[StrictBool] = None,
- _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[V1beta1GetGroupResponse]:
- """Get group
-
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1GetGroupResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_get_group_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_get_group_with_http_info(org_id, id, with_members, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_get_group_with_http_info(self, org_id : StrictStr, id : StrictStr, with_members : Optional[StrictBool] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """Get group # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_get_group_with_http_info(org_id, id, with_members, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
@@ -2037,392 +1072,126 @@ def frontier_service_get_group_with_http_info(
:type id: str
:param with_members:
:type with_members: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_get_group_serialize(
- org_id=org_id,
- id=id,
- with_members=with_members,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetGroupResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1GetGroupResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_get_group_without_preload_content(
- self,
- org_id: StrictStr,
- id: StrictStr,
- with_members: Optional[StrictBool] = None,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'org_id',
+ 'id',
+ 'with_members'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Get group
-
-
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :param with_members:
- :type with_members: bool
- :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._frontier_service_get_group_serialize(
- org_id=org_id,
- id=id,
- with_members=with_members,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetGroupResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
)
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_get_group" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_get_group_serialize(
- self,
- org_id,
- id,
- with_members,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _collection_formats = {}
- _host = None
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if id is not None:
- _path_params['id'] = id
# process the query parameters
- if with_members is not None:
-
- _query_params.append(('withMembers', with_members))
-
+ _query_params = []
+ if _params.get('with_members') is not None: # noqa: E501
+ _query_params.append(('withMembers', _params['with_members']))
+
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/organizations/{orgId}/groups/{id}',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_list_group_users(
- self,
- org_id: StrictStr,
- id: StrictStr,
- with_roles: Optional[StrictBool] = None,
- _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,
- ) -> V1beta1ListGroupUsersResponse:
- """List group users
-
- Returns a list of users that belong to a group.
-
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :param with_roles:
- :type with_roles: bool
- :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._frontier_service_list_group_users_serialize(
- org_id=org_id,
- id=id,
- with_roles=with_roles,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ _auth_settings = ['Basic'] # noqa: E501
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListGroupUsersResponse",
+ _response_types_map = {
+ '200': "V1beta1GetGroupResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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 frontier_service_list_group_users_with_http_info(
- self,
- org_id: StrictStr,
- id: StrictStr,
- with_roles: Optional[StrictBool] = None,
- _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[V1beta1ListGroupUsersResponse]:
- """List group users
-
- Returns a list of users that belong to a group.
-
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :param with_roles:
- :type with_roles: bool
- :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._frontier_service_list_group_users_serialize(
- org_id=org_id,
- id=id,
- with_roles=with_roles,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListGroupUsersResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/groups/{id}', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_group_users(self, org_id : StrictStr, id : StrictStr, with_roles : Optional[StrictBool] = None, **kwargs) -> V1beta1ListGroupUsersResponse: # noqa: E501
+ """List group users # noqa: E501
- @validate_call
- def frontier_service_list_group_users_without_preload_content(
- self,
- org_id: StrictStr,
- id: StrictStr,
- with_roles: Optional[StrictBool] = None,
- _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:
- """List group users
+ Returns a list of users that belong to a group. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Returns a list of users that belong to a group.
+ >>> thread = api.frontier_service_list_group_users(org_id, id, with_roles, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
@@ -2430,234 +1199,160 @@ def frontier_service_list_group_users_without_preload_content(
:type id: str
:param with_roles:
:type with_roles: bool
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_group_users_serialize(
- org_id=org_id,
- id=id,
- with_roles=with_roles,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListGroupUsersResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_list_group_users_serialize(
- self,
- org_id,
- id,
- with_roles,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- if with_roles is not None:
-
- _query_params.append(('withRoles', with_roles))
-
- # process the header parameters
- # process the form parameters
- # process the body parameter
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/organizations/{orgId}/groups/{id}/users',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_list_organization_groups(
- self,
- org_id: StrictStr,
- state: Annotated[Optional[StrictStr], Field(description="The state of the group to filter by. It can be enabled or disabled.")] = None,
- group_ids: Optional[List[StrictStr]] = None,
- with_members: Optional[StrictBool] = None,
- _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,
- ) -> V1beta1ListOrganizationGroupsResponse:
- """List organization groups
-
- Get all groups that belong to an organization. The results can be filtered by state which can be either be enabled or disabled.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListGroupUsersResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_group_users_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_group_users_with_http_info(org_id, id, with_roles, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_group_users_with_http_info(self, org_id : StrictStr, id : StrictStr, with_roles : Optional[StrictBool] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """List group users # noqa: E501
+
+ Returns a list of users that belong to a group. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_group_users_with_http_info(org_id, id, with_roles, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
- :param state: The state of the group to filter by. It can be enabled or disabled.
- :type state: str
- :param group_ids:
- :type group_ids: List[str]
- :param with_members:
- :type with_members: bool
+ :param id: (required)
+ :type id: str
+ :param with_roles:
+ :type with_roles: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_organization_groups_serialize(
- org_id=org_id,
- state=state,
- group_ids=group_ids,
- with_members=with_members,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListGroupUsersResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'org_id',
+ 'id',
+ 'with_roles'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationGroupsResponse",
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_group_users" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
+
+ if _params['id']:
+ _path_params['id'] = _params['id']
+
+
+ # process the query parameters
+ _query_params = []
+ if _params.get('with_roles') is not None: # noqa: E501
+ _query_params.append(('withRoles', _params['with_roles']))
+
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListGroupUsersResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/groups/{id}/users', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- ).data
-
-
- @validate_call
- def frontier_service_list_organization_groups_with_http_info(
- self,
- org_id: StrictStr,
- state: Annotated[Optional[StrictStr], Field(description="The state of the group to filter by. It can be enabled or disabled.")] = None,
- group_ids: Optional[List[StrictStr]] = None,
- with_members: Optional[StrictBool] = None,
- _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[V1beta1ListOrganizationGroupsResponse]:
- """List organization groups
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+
+ @validate_arguments
+ def frontier_service_list_organization_groups(self, org_id : StrictStr, state : Annotated[Optional[StrictStr], Field(description="The state of the group to filter by. It can be enabled or disabled.")] = None, group_ids : Optional[conlist(StrictStr)] = None, with_members : Optional[StrictBool] = None, with_member_count : Optional[StrictBool] = None, **kwargs) -> V1beta1ListOrganizationGroupsResponse: # noqa: E501
+ """List organization groups # noqa: E501
+
+ Get all groups that belong to an organization. The results can be filtered by state which can be either be enabled or disabled. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Get all groups that belong to an organization. The results can be filtered by state which can be either be enabled or disabled.
+ >>> thread = api.frontier_service_list_organization_groups(org_id, state, group_ids, with_members, with_member_count, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
@@ -2667,83 +1362,35 @@ def frontier_service_list_organization_groups_with_http_info(
:type group_ids: List[str]
:param with_members:
:type with_members: bool
- :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
+ :param with_member_count:
+ :type with_member_count: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_organization_groups_serialize(
- org_id=org_id,
- state=state,
- group_ids=group_ids,
- with_members=with_members,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationGroupsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_organization_groups_without_preload_content(
- self,
- org_id: StrictStr,
- state: Annotated[Optional[StrictStr], Field(description="The state of the group to filter by. It can be enabled or disabled.")] = None,
- group_ids: Optional[List[StrictStr]] = None,
- with_members: Optional[StrictBool] = None,
- _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:
- """List organization groups
-
- Get all groups that belong to an organization. The results can be filtered by state which can be either be enabled or disabled.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListOrganizationGroupsResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_organization_groups_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_organization_groups_with_http_info(org_id, state, group_ids, with_members, with_member_count, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_organization_groups_with_http_info(self, org_id : StrictStr, state : Annotated[Optional[StrictStr], Field(description="The state of the group to filter by. It can be enabled or disabled.")] = None, group_ids : Optional[conlist(StrictStr)] = None, with_members : Optional[StrictBool] = None, with_member_count : Optional[StrictBool] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """List organization groups # noqa: E501
+
+ Get all groups that belong to an organization. The results can be filtered by state which can be either be enabled or disabled. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_organization_groups_with_http_info(org_id, state, group_ids, with_members, with_member_count, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
@@ -2753,156 +1400,137 @@ def frontier_service_list_organization_groups_without_preload_content(
:type group_ids: List[str]
:param with_members:
:type with_members: bool
+ :param with_member_count:
+ :type with_member_count: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_organization_groups_serialize(
- org_id=org_id,
- state=state,
- group_ids=group_ids,
- with_members=with_members,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListOrganizationGroupsResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'org_id',
+ 'state',
+ 'group_ids',
+ 'with_members',
+ 'with_member_count'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationGroupsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_list_organization_groups_serialize(
- self,
- org_id,
- state,
- group_ids,
- with_members,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _host = None
-
- _collection_formats: Dict[str, str] = {
-
- 'groupIds': 'multi',
- }
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_organization_groups" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
+
+
# process the query parameters
- if state is not None:
-
- _query_params.append(('state', state))
-
- if group_ids is not None:
-
- _query_params.append(('groupIds', group_ids))
-
- if with_members is not None:
-
- _query_params.append(('withMembers', with_members))
-
+ _query_params = []
+ if _params.get('state') is not None: # noqa: E501
+ _query_params.append(('state', _params['state']))
+
+ if _params.get('group_ids') is not None: # noqa: E501
+ _query_params.append(('groupIds', _params['group_ids']))
+ _collection_formats['groupIds'] = 'multi'
+
+ if _params.get('with_members') is not None: # noqa: E501
+ _query_params.append(('withMembers', _params['with_members']))
+
+ if _params.get('with_member_count') is not None: # noqa: E501
+ _query_params.append(('withMemberCount', _params['with_member_count']))
+
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListOrganizationGroupsResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/organizations/{orgId}/groups',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/groups', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_remove_group_user(self, org_id : StrictStr, id : StrictStr, user_id : StrictStr, **kwargs) -> object: # noqa: E501
+ """Remove group user # noqa: E501
- @validate_call
- def frontier_service_remove_group_user(
- self,
- org_id: StrictStr,
- id: StrictStr,
- user_id: StrictStr,
- _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:
- """Remove group user
+ Removes a principle(user and service-users) from a group. If the user is not in the group, the request will succeed but no changes will be made. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Removes a principle(user and service-users) from a group. If the user is not in the group, the request will succeed but no changes will be made.
+ >>> thread = api.frontier_service_remove_group_user(org_id, id, user_id, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
@@ -2910,81 +1538,33 @@ def frontier_service_remove_group_user(
:type id: str
:param user_id: (required)
:type user_id: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_remove_group_user_serialize(
- org_id=org_id,
- id=id,
- user_id=user_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_remove_group_user_with_http_info(
- self,
- org_id: StrictStr,
- id: StrictStr,
- user_id: StrictStr,
- _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]:
- """Remove group user
-
- Removes a principle(user and service-users) from a group. If the user is not in the group, the request will succeed but no changes will be made.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_remove_group_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_remove_group_user_with_http_info(org_id, id, user_id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_remove_group_user_with_http_info(self, org_id : StrictStr, id : StrictStr, user_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """Remove group user # noqa: E501
+
+ Removes a principle(user and service-users) from a group. If the user is not in the group, the request will succeed but no changes will be made. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_remove_group_user_with_http_info(org_id, id, user_id, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
@@ -2992,226 +1572,125 @@ def frontier_service_remove_group_user_with_http_info(
:type id: str
:param user_id: (required)
:type user_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_remove_group_user_serialize(
- org_id=org_id,
- id=id,
- user_id=user_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_remove_group_user_without_preload_content(
- self,
- org_id: StrictStr,
- id: StrictStr,
- user_id: StrictStr,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'org_id',
+ 'id',
+ 'user_id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Remove group user
-
- Removes a principle(user and service-users) from a group. If the user is not in the group, the request will succeed but no changes will be made.
-
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :param user_id: (required)
- :type user_id: str
- :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._frontier_service_remove_group_user_serialize(
- org_id=org_id,
- id=id,
- user_id=user_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_remove_group_user" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+ _collection_formats = {}
- def _frontier_service_remove_group_user_serialize(
- self,
- org_id,
- id,
- user_id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _host = None
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['user_id']:
+ _path_params['userId'] = _params['user_id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if id is not None:
- _path_params['id'] = id
- if user_id is not None:
- _path_params['userId'] = user_id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "object",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='DELETE',
- resource_path='/v1beta1/organizations/{orgId}/groups/{id}/users/{userId}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/groups/{id}/users/{userId}', 'DELETE',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_update_group(self, org_id : Annotated[StrictStr, Field(..., description="The organization ID to which the group belongs to.")], id : StrictStr, body : V1beta1GroupRequestBody, **kwargs) -> V1beta1UpdateGroupResponse: # noqa: E501
+ """Update group # noqa: E501
- @validate_call
- def frontier_service_update_group(
- self,
- org_id: Annotated[StrictStr, Field(description="The organization ID to which the group belongs to.")],
- id: StrictStr,
- body: V1beta1GroupRequestBody,
- _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,
- ) -> V1beta1UpdateGroupResponse:
- """Update group
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.frontier_service_update_group(org_id, id, body, async_req=True)
+ >>> result = thread.get()
:param org_id: The organization ID to which the group belongs to. (required)
:type org_id: str
@@ -3219,80 +1698,32 @@ def frontier_service_update_group(
:type id: str
:param body: (required)
:type body: V1beta1GroupRequestBody
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_update_group_serialize(
- org_id=org_id,
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateGroupResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_update_group_with_http_info(
- self,
- org_id: Annotated[StrictStr, Field(description="The organization ID to which the group belongs to.")],
- id: StrictStr,
- body: V1beta1GroupRequestBody,
- _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[V1beta1UpdateGroupResponse]:
- """Update group
-
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1UpdateGroupResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_update_group_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_update_group_with_http_info(org_id, id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_update_group_with_http_info(self, org_id : Annotated[StrictStr, Field(..., description="The organization ID to which the group belongs to.")], id : StrictStr, body : V1beta1GroupRequestBody, **kwargs) -> ApiResponse: # noqa: E501
+ """Update group # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_update_group_with_http_info(org_id, id, body, async_req=True)
+ >>> result = thread.get()
:param org_id: The organization ID to which the group belongs to. (required)
:type org_id: str
@@ -3300,212 +1731,119 @@ def frontier_service_update_group_with_http_info(
:type id: str
:param body: (required)
:type body: V1beta1GroupRequestBody
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_update_group_serialize(
- org_id=org_id,
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateGroupResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1UpdateGroupResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_update_group_without_preload_content(
- self,
- org_id: Annotated[StrictStr, Field(description="The organization ID to which the group belongs to.")],
- id: StrictStr,
- body: V1beta1GroupRequestBody,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'org_id',
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Update group
-
-
- :param org_id: The organization ID to which the group belongs to. (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: V1beta1GroupRequestBody
- :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._frontier_service_update_group_serialize(
- org_id=org_id,
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateGroupResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
)
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_update_group" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_update_group_serialize(
- self,
- org_id,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _collection_formats = {}
- _host = None
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1UpdateGroupResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='PUT',
- resource_path='/v1beta1/organizations/{orgId}/groups/{id}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/groups/{id}', 'PUT',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
diff --git a/frontier_api/api/meta_schema_api.py b/frontier_api/api/meta_schema_api.py
index cac63e4..54d533f 100644
--- a/frontier_api/api/meta_schema_api.py
+++ b/frontier_api/api/meta_schema_api.py
@@ -13,20 +13,15 @@
""" # noqa: E501
+import re # noqa: F401
import io
import warnings
-from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
-from typing import Dict, List, Optional, Tuple, Union, Any
-
-try:
- from typing import Annotated
-except ImportError:
- from typing_extensions import Annotated
+from pydantic import validate_arguments, ValidationError
from pydantic import StrictStr
-from typing import Any, Dict, Union
+from typing import Any, Dict
from frontier_api.models.v1beta1_create_meta_schema_response import V1beta1CreateMetaSchemaResponse
from frontier_api.models.v1beta1_get_meta_schema_response import V1beta1GetMetaSchemaResponse
@@ -36,7 +31,10 @@
from frontier_api.api_client import ApiClient
from frontier_api.api_response import ApiResponse
-from frontier_api.rest import RESTResponseType
+from frontier_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class MetaSchemaApi:
@@ -51,1428 +49,741 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client
+ @validate_arguments
+ def frontier_service_create_meta_schema(self, body : V1beta1MetaSchemaRequestBody, **kwargs) -> V1beta1CreateMetaSchemaResponse: # noqa: E501
+ """Create metaschema # noqa: E501
- @validate_call
- def frontier_service_create_meta_schema(
- self,
- body: V1beta1MetaSchemaRequestBody,
- _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,
- ) -> V1beta1CreateMetaSchemaResponse:
- """Create metaschema
+ Create a new metadata schema. The metaschema **name** must be unique within the entire Frontier instance and can contain only alphanumeric characters, dashes and underscores. The metaschema **schema** must be a valid JSON schema.Please refer to https://json-schema.org/ to know more about json schema.
*Example:* `{name:\"user\",schema:{\"type\":\"object\",\"properties\":{\"label\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"string\"}},\"description\":{\"type\":\"string\"}}}}` # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Create a new metadata schema. The metaschema **name** must be unique within the entire Frontier instance and can contain only alphanumeric characters, dashes and underscores. The metaschema **schema** must be a valid JSON schema.Please refer to https://json-schema.org/ to know more about json schema.
*Example:* `{name:\"user\",schema:{\"type\":\"object\",\"properties\":{\"label\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"string\"}},\"description\":{\"type\":\"string\"}}}}`
+ >>> thread = api.frontier_service_create_meta_schema(body, async_req=True)
+ >>> result = thread.get()
:param body: (required)
:type body: V1beta1MetaSchemaRequestBody
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_meta_schema_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateMetaSchemaResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_meta_schema_with_http_info(
- self,
- body: V1beta1MetaSchemaRequestBody,
- _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[V1beta1CreateMetaSchemaResponse]:
- """Create metaschema
-
- Create a new metadata schema. The metaschema **name** must be unique within the entire Frontier instance and can contain only alphanumeric characters, dashes and underscores. The metaschema **schema** must be a valid JSON schema.Please refer to https://json-schema.org/ to know more about json schema.
*Example:* `{name:\"user\",schema:{\"type\":\"object\",\"properties\":{\"label\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"string\"}},\"description\":{\"type\":\"string\"}}}}`
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CreateMetaSchemaResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_create_meta_schema_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_create_meta_schema_with_http_info(body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_create_meta_schema_with_http_info(self, body : V1beta1MetaSchemaRequestBody, **kwargs) -> ApiResponse: # noqa: E501
+ """Create metaschema # noqa: E501
+
+ Create a new metadata schema. The metaschema **name** must be unique within the entire Frontier instance and can contain only alphanumeric characters, dashes and underscores. The metaschema **schema** must be a valid JSON schema.Please refer to https://json-schema.org/ to know more about json schema.
*Example:* `{name:\"user\",schema:{\"type\":\"object\",\"properties\":{\"label\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"string\"}},\"description\":{\"type\":\"string\"}}}}` # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_create_meta_schema_with_http_info(body, async_req=True)
+ >>> result = thread.get()
:param body: (required)
:type body: V1beta1MetaSchemaRequestBody
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_meta_schema_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateMetaSchemaResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CreateMetaSchemaResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_create_meta_schema_without_preload_content(
- self,
- body: V1beta1MetaSchemaRequestBody,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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 metaschema
-
- Create a new metadata schema. The metaschema **name** must be unique within the entire Frontier instance and can contain only alphanumeric characters, dashes and underscores. The metaschema **schema** must be a valid JSON schema.Please refer to https://json-schema.org/ to know more about json schema.
*Example:* `{name:\"user\",schema:{\"type\":\"object\",\"properties\":{\"label\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"string\"}},\"description\":{\"type\":\"string\"}}}}`
-
- :param body: (required)
- :type body: V1beta1MetaSchemaRequestBody
- :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._frontier_service_create_meta_schema_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateMetaSchemaResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_create_meta_schema_serialize(
- self,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _host = None
-
- _collection_formats: Dict[str, str] = {
-
- }
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_create_meta_schema" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
+ _path_params = {}
+
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1CreateMetaSchemaResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/meta/schemas',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/meta/schemas', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_delete_meta_schema(self, id : StrictStr, **kwargs) -> object: # noqa: E501
+ """Delete metaschema # noqa: E501
+ Delete a metadata schema permanently. Once deleted the metaschema won't be used to validate the metadata. For example, if a metaschema(with `label` and `description` fields) is used to validate the metadata of a user, then deleting the metaschema will not validate the metadata of the user and metadata field can contain any key-value pair(and say another field called `foo` can be inserted in a user's metadata). # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_delete_meta_schema(
- self,
- id: StrictStr,
- _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:
- """Delete metaschema
-
- Delete a metadata schema permanently. Once deleted the metaschema won't be used to validate the metadata. For example, if a metaschema(with `label` and `description` fields) is used to validate the metadata of a user, then deleting the metaschema will not validate the metadata of the user and metadata field can contain any key-value pair(and say another field called `foo` can be inserted in a user's metadata).
+ >>> thread = api.frontier_service_delete_meta_schema(id, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_delete_meta_schema_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_delete_meta_schema_with_http_info(
- self,
- id: StrictStr,
- _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]:
- """Delete metaschema
-
- Delete a metadata schema permanently. Once deleted the metaschema won't be used to validate the metadata. For example, if a metaschema(with `label` and `description` fields) is used to validate the metadata of a user, then deleting the metaschema will not validate the metadata of the user and metadata field can contain any key-value pair(and say another field called `foo` can be inserted in a user's metadata).
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_delete_meta_schema_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_delete_meta_schema_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_delete_meta_schema_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """Delete metaschema # noqa: E501
+
+ Delete a metadata schema permanently. Once deleted the metaschema won't be used to validate the metadata. For example, if a metaschema(with `label` and `description` fields) is used to validate the metadata of a user, then deleting the metaschema will not validate the metadata of the user and metadata field can contain any key-value pair(and say another field called `foo` can be inserted in a user's metadata). # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_delete_meta_schema_with_http_info(id, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_delete_meta_schema_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_delete_meta_schema_without_preload_content(
- self,
- id: StrictStr,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Delete metaschema
-
- Delete a metadata schema permanently. Once deleted the metaschema won't be used to validate the metadata. For example, if a metaschema(with `label` and `description` fields) is used to validate the metadata of a user, then deleting the metaschema will not validate the metadata of the user and metadata field can contain any key-value pair(and say another field called `foo` can be inserted in a user's metadata).
-
- :param id: (required)
- :type id: str
- :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._frontier_service_delete_meta_schema_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_delete_meta_schema_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_delete_meta_schema" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "object",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='DELETE',
- resource_path='/v1beta1/meta/schemas/{id}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/meta/schemas/{id}', 'DELETE',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_get_meta_schema(self, id : StrictStr, **kwargs) -> V1beta1GetMetaSchemaResponse: # noqa: E501
+ """Get metaschema # noqa: E501
+ Get a metadata schema by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
-
- @validate_call
- def frontier_service_get_meta_schema(
- self,
- id: StrictStr,
- _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,
- ) -> V1beta1GetMetaSchemaResponse:
- """Get metaschema
-
- Get a metadata schema by ID.
+ >>> thread = api.frontier_service_get_meta_schema(id, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_get_meta_schema_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetMetaSchemaResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_meta_schema_with_http_info(
- self,
- id: StrictStr,
- _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[V1beta1GetMetaSchemaResponse]:
- """Get metaschema
-
- Get a metadata schema by ID.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1GetMetaSchemaResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_get_meta_schema_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_get_meta_schema_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_get_meta_schema_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """Get metaschema # noqa: E501
+
+ Get a metadata schema by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_get_meta_schema_with_http_info(id, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_get_meta_schema_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetMetaSchemaResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1GetMetaSchemaResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_get_meta_schema_without_preload_content(
- self,
- id: StrictStr,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Get metaschema
-
- Get a metadata schema by ID.
-
- :param id: (required)
- :type id: str
- :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._frontier_service_get_meta_schema_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetMetaSchemaResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_get_meta_schema_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_get_meta_schema" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/meta/schemas/{id}',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_list_meta_schemas(
- self,
- _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,
- ) -> V1beta1ListMetaSchemasResponse:
- """List metaschemas
-
- Returns a list of all metaschemas configured on an instance level in Frontier. e.g user, project, organization etc
-
- :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._frontier_service_list_meta_schemas_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ _auth_settings = ['Basic'] # noqa: E501
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListMetaSchemasResponse",
+ _response_types_map = {
+ '200': "V1beta1GetMetaSchemaResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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 frontier_service_list_meta_schemas_with_http_info(
- self,
- _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[V1beta1ListMetaSchemasResponse]:
- """List metaschemas
-
- Returns a list of all metaschemas configured on an instance level in Frontier. e.g user, project, organization etc
- :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._frontier_service_list_meta_schemas_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListMetaSchemasResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
+ return self.api_client.call_api(
+ '/v1beta1/meta/schemas/{id}', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_meta_schemas(self, **kwargs) -> V1beta1ListMetaSchemasResponse: # noqa: E501
+ """List metaschemas # noqa: E501
- @validate_call
- def frontier_service_list_meta_schemas_without_preload_content(
- self,
- _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:
- """List metaschemas
+ Returns a list of all metaschemas configured on an instance level in Frontier. e.g user, project, organization etc # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Returns a list of all metaschemas configured on an instance level in Frontier. e.g user, project, organization etc
+ >>> thread = api.frontier_service_list_meta_schemas(async_req=True)
+ >>> result = thread.get()
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListMetaSchemasResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_meta_schemas_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_meta_schemas_with_http_info(**kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_meta_schemas_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
+ """List metaschemas # noqa: E501
+
+ Returns a list of all metaschemas configured on an instance level in Frontier. e.g user, project, organization etc # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_meta_schemas_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListMetaSchemasResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _param = self._frontier_service_list_meta_schemas_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ _params = locals()
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListMetaSchemasResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
+ _all_params = [
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_meta_schemas" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_list_meta_schemas_serialize(
- self,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
+ _path_params = {}
+
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/meta/schemas',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ _response_types_map = {
+ '200': "V1beta1ListMetaSchemasResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
+
+ return self.api_client.call_api(
+ '/v1beta1/meta/schemas', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_update_meta_schema(self, id : StrictStr, body : V1beta1MetaSchemaRequestBody, **kwargs) -> V1beta1UpdateMetaSchemaResponse: # noqa: E501
+ """Update metaschema # noqa: E501
- @validate_call
- def frontier_service_update_meta_schema(
- self,
- id: StrictStr,
- body: V1beta1MetaSchemaRequestBody,
- _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,
- ) -> V1beta1UpdateMetaSchemaResponse:
- """Update metaschema
+ Update a metadata schema. Only `schema` field of a metaschema can be updated. The metaschema `schema` must be a valid JSON schema.Please refer to https://json-schema.org/ to know more about json schema.
*Example:* `{name:\"user\",schema:{\"type\":\"object\",\"properties\":{\"label\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"string\"}},\"description\":{\"type\":\"string\"}}}}` # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Update a metadata schema. Only `schema` field of a metaschema can be updated. The metaschema `schema` must be a valid JSON schema.Please refer to https://json-schema.org/ to know more about json schema.
*Example:* `{name:\"user\",schema:{\"type\":\"object\",\"properties\":{\"label\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"string\"}},\"description\":{\"type\":\"string\"}}}}`
+ >>> thread = api.frontier_service_update_meta_schema(id, body, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
:param body: (required)
:type body: V1beta1MetaSchemaRequestBody
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_update_meta_schema_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateMetaSchemaResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_update_meta_schema_with_http_info(
- self,
- id: StrictStr,
- body: V1beta1MetaSchemaRequestBody,
- _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[V1beta1UpdateMetaSchemaResponse]:
- """Update metaschema
-
- Update a metadata schema. Only `schema` field of a metaschema can be updated. The metaschema `schema` must be a valid JSON schema.Please refer to https://json-schema.org/ to know more about json schema.
*Example:* `{name:\"user\",schema:{\"type\":\"object\",\"properties\":{\"label\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"string\"}},\"description\":{\"type\":\"string\"}}}}`
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1UpdateMetaSchemaResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_update_meta_schema_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_update_meta_schema_with_http_info(id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_update_meta_schema_with_http_info(self, id : StrictStr, body : V1beta1MetaSchemaRequestBody, **kwargs) -> ApiResponse: # noqa: E501
+ """Update metaschema # noqa: E501
+
+ Update a metadata schema. Only `schema` field of a metaschema can be updated. The metaschema `schema` must be a valid JSON schema.Please refer to https://json-schema.org/ to know more about json schema.
*Example:* `{name:\"user\",schema:{\"type\":\"object\",\"properties\":{\"label\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"string\"}},\"description\":{\"type\":\"string\"}}}}` # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_update_meta_schema_with_http_info(id, body, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
:param body: (required)
:type body: V1beta1MetaSchemaRequestBody
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_update_meta_schema_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateMetaSchemaResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1UpdateMetaSchemaResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_update_meta_schema_without_preload_content(
- self,
- id: StrictStr,
- body: V1beta1MetaSchemaRequestBody,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Update metaschema
-
- Update a metadata schema. Only `schema` field of a metaschema can be updated. The metaschema `schema` must be a valid JSON schema.Please refer to https://json-schema.org/ to know more about json schema.
*Example:* `{name:\"user\",schema:{\"type\":\"object\",\"properties\":{\"label\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"string\"}},\"description\":{\"type\":\"string\"}}}}`
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: V1beta1MetaSchemaRequestBody
- :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._frontier_service_update_meta_schema_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateMetaSchemaResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_update_meta_schema_serialize(
- self,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_update_meta_schema" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='PUT',
- resource_path='/v1beta1/meta/schemas/{id}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ _response_types_map = {
+ '200': "V1beta1UpdateMetaSchemaResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
+
+ return self.api_client.call_api(
+ '/v1beta1/meta/schemas/{id}', 'PUT',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
diff --git a/frontier_api/api/namespace_api.py b/frontier_api/api/namespace_api.py
index 9853422..e3b6d0a 100644
--- a/frontier_api/api/namespace_api.py
+++ b/frontier_api/api/namespace_api.py
@@ -13,16 +13,11 @@
""" # noqa: E501
+import re # noqa: F401
import io
import warnings
-from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
-from typing import Dict, List, Optional, Tuple, Union, Any
-
-try:
- from typing import Annotated
-except ImportError:
- from typing_extensions import Annotated
+from pydantic import validate_arguments, ValidationError
from pydantic import StrictStr
@@ -31,7 +26,10 @@
from frontier_api.api_client import ApiClient
from frontier_api.api_response import ApiResponse
-from frontier_api.rest import RESTResponseType
+from frontier_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class NamespaceApi:
@@ -46,547 +44,284 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client
+ @validate_arguments
+ def frontier_service_get_namespace(self, id : StrictStr, **kwargs) -> V1beta1GetNamespaceResponse: # noqa: E501
+ """Get namespace # noqa: E501
- @validate_call
- def frontier_service_get_namespace(
- self,
- id: StrictStr,
- _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,
- ) -> V1beta1GetNamespaceResponse:
- """Get namespace
+ Returns a namespace by ID # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Returns a namespace by ID
+ >>> thread = api.frontier_service_get_namespace(id, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_get_namespace_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetNamespaceResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_namespace_with_http_info(
- self,
- id: StrictStr,
- _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[V1beta1GetNamespaceResponse]:
- """Get namespace
-
- Returns a namespace by ID
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1GetNamespaceResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_get_namespace_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_get_namespace_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_get_namespace_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """Get namespace # noqa: E501
+
+ Returns a namespace by ID # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_get_namespace_with_http_info(id, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_get_namespace_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetNamespaceResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1GetNamespaceResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_get_namespace_without_preload_content(
- self,
- id: StrictStr,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Get namespace
-
- Returns a namespace by ID
-
- :param id: (required)
- :type id: str
- :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._frontier_service_get_namespace_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetNamespaceResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
)
- return response_data.response
-
- def _frontier_service_get_namespace_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_get_namespace" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/namespaces/{id}',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_list_namespaces(
- self,
- _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,
- ) -> V1beta1ListNamespacesResponse:
- """Get all namespaces
+ _auth_settings = ['Basic'] # noqa: E501
- Returns the list of all namespaces in a Frontier instance
-
- :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._frontier_service_list_namespaces_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListNamespacesResponse",
+ _response_types_map = {
+ '200': "V1beta1GetNamespaceResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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 frontier_service_list_namespaces_with_http_info(
- self,
- _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[V1beta1ListNamespacesResponse]:
- """Get all namespaces
-
- Returns the list of all namespaces in a Frontier instance
- :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._frontier_service_list_namespaces_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListNamespacesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
+ return self.api_client.call_api(
+ '/v1beta1/namespaces/{id}', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_namespaces(self, **kwargs) -> V1beta1ListNamespacesResponse: # noqa: E501
+ """Get all namespaces # noqa: E501
- @validate_call
- def frontier_service_list_namespaces_without_preload_content(
- self,
- _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:
- """Get all namespaces
+ Returns the list of all namespaces in a Frontier instance # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Returns the list of all namespaces in a Frontier instance
+ >>> thread = api.frontier_service_list_namespaces(async_req=True)
+ >>> result = thread.get()
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListNamespacesResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_namespaces_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_namespaces_with_http_info(**kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_namespaces_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
+ """Get all namespaces # noqa: E501
+
+ Returns the list of all namespaces in a Frontier instance # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_namespaces_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListNamespacesResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _param = self._frontier_service_list_namespaces_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ _params = locals()
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListNamespacesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
+ _all_params = [
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_namespaces" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_list_namespaces_serialize(
- self,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
+ _path_params = {}
+
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/namespaces',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ _response_types_map = {
+ '200': "V1beta1ListNamespacesResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
+
+ return self.api_client.call_api(
+ '/v1beta1/namespaces', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
diff --git a/frontier_api/api/organization_api.py b/frontier_api/api/organization_api.py
index 3765f3d..a22e2ed 100644
--- a/frontier_api/api/organization_api.py
+++ b/frontier_api/api/organization_api.py
@@ -13,22 +13,16 @@
""" # noqa: E501
+import re # noqa: F401
import io
import warnings
-from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
-from typing import Dict, List, Optional, Tuple, Union, Any
+from pydantic import validate_arguments, ValidationError
-try:
- from typing import Annotated
-except ImportError:
- from typing_extensions import Annotated
-
-from pydantic import Field
from typing_extensions import Annotated
-from pydantic import StrictBool, StrictStr
+from pydantic import Field, StrictBool, StrictStr
-from typing import Any, Dict, Optional, Union
+from typing import Any, Dict, Optional
from frontier_api.models.frontier_service_add_organization_users_request import FrontierServiceAddOrganizationUsersRequest
from frontier_api.models.frontier_service_create_organization_domain_request import FrontierServiceCreateOrganizationDomainRequest
@@ -53,7 +47,10 @@
from frontier_api.api_client import ApiClient
from frontier_api.api_response import ApiResponse
-from frontier_api.rest import RESTResponseType
+from frontier_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class OrganizationApi:
@@ -68,7216 +65,3699 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client
+ @validate_arguments
+ def admin_service_list_all_organizations(self, user_id : Annotated[Optional[StrictStr], Field(description="The user id to filter by.")] = None, state : Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None, **kwargs) -> V1beta1ListAllOrganizationsResponse: # noqa: E501
+ """List all organizations # noqa: E501
- @validate_call
- def admin_service_list_all_organizations(
- self,
- user_id: Annotated[Optional[StrictStr], Field(description="The user id to filter by.")] = None,
- state: Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None,
- _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,
- ) -> V1beta1ListAllOrganizationsResponse:
- """List all organizations
+ Lists all the organizations in a Frontier instance. It can be filtered by user and state. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Lists all the organizations in a Frontier instance. It can be filtered by user and state.
+ >>> thread = api.admin_service_list_all_organizations(user_id, state, async_req=True)
+ >>> result = thread.get()
:param user_id: The user id to filter by.
:type user_id: str
:param state: The state to filter by. It can be enabled or disabled.
:type state: str
- :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._admin_service_list_all_organizations_serialize(
- user_id=user_id,
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListAllOrganizationsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 admin_service_list_all_organizations_with_http_info(
- self,
- user_id: Annotated[Optional[StrictStr], Field(description="The user id to filter by.")] = None,
- state: Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None,
- _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[V1beta1ListAllOrganizationsResponse]:
- """List all organizations
-
- Lists all the organizations in a Frontier instance. It can be filtered by user and state.
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListAllOrganizationsResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the admin_service_list_all_organizations_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.admin_service_list_all_organizations_with_http_info(user_id, state, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def admin_service_list_all_organizations_with_http_info(self, user_id : Annotated[Optional[StrictStr], Field(description="The user id to filter by.")] = None, state : Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """List all organizations # noqa: E501
+
+ Lists all the organizations in a Frontier instance. It can be filtered by user and state. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.admin_service_list_all_organizations_with_http_info(user_id, state, async_req=True)
+ >>> result = thread.get()
:param user_id: The user id to filter by.
:type user_id: str
:param state: The state to filter by. It can be enabled or disabled.
:type state: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_list_all_organizations_serialize(
- user_id=user_id,
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListAllOrganizationsResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'user_id',
+ 'state'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method admin_service_list_all_organizations" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+
+ # process the query parameters
+ _query_params = []
+ if _params.get('user_id') is not None: # noqa: E501
+ _query_params.append(('userId', _params['user_id']))
+
+ if _params.get('state') is not None: # noqa: E501
+ _query_params.append(('state', _params['state']))
+
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
- _response_types_map: Dict[str, Optional[str]] = {
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
'200': "V1beta1ListAllOrganizationsResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/admin/organizations', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_accept_organization_invitation(self, org_id : StrictStr, id : StrictStr, **kwargs) -> object: # noqa: E501
+ """Accept pending invitation # noqa: E501
- @validate_call
- def admin_service_list_all_organizations_without_preload_content(
- self,
- user_id: Annotated[Optional[StrictStr], Field(description="The user id to filter by.")] = None,
- state: Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None,
- _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:
- """List all organizations
+ Accept pending invitation queued for an organization. The user will be added to the organization and groups defined in the invitation # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Lists all the organizations in a Frontier instance. It can be filtered by user and state.
+ >>> thread = api.frontier_service_accept_organization_invitation(org_id, id, async_req=True)
+ >>> result = thread.get()
- :param user_id: The user id to filter by.
- :type user_id: str
- :param state: The state to filter by. It can be enabled or disabled.
- :type state: str
+ :param org_id: (required)
+ :type org_id: str
+ :param id: (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_accept_organization_invitation_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_accept_organization_invitation_with_http_info(org_id, id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_accept_organization_invitation_with_http_info(self, org_id : StrictStr, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """Accept pending invitation # noqa: E501
+
+ Accept pending invitation queued for an organization. The user will be added to the organization and groups defined in the invitation # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_accept_organization_invitation_with_http_info(org_id, id, async_req=True)
+ >>> result = thread.get()
+
+ :param org_id: (required)
+ :type org_id: str
+ :param id: (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_list_all_organizations_serialize(
- user_id=user_id,
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListAllOrganizationsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ _params = locals()
+ _all_params = [
+ 'org_id',
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_accept_organization_invitation" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _admin_service_list_all_organizations_serialize(
- self,
- user_id,
- state,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _collection_formats = {}
- _host = None
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
# process the query parameters
- if user_id is not None:
-
- _query_params.append(('userId', user_id))
-
- if state is not None:
-
- _query_params.append(('state', state))
-
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "object",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/admin/organizations',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/invitations/{id}/accept', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_add_organization_users(self, id : StrictStr, body : FrontierServiceAddOrganizationUsersRequest, **kwargs) -> object: # noqa: E501
+ """Add organization user # noqa: E501
+ Add a user to an organization. A user must exists in Frontier before adding it to an org. This request will fail if the user doesn't exists # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.frontier_service_add_organization_users(id, body, async_req=True)
+ >>> result = thread.get()
- @validate_call
- def frontier_service_accept_organization_invitation(
- self,
- org_id: StrictStr,
- id: StrictStr,
- _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:
- """Accept pending invitation
-
- Accept pending invitation queued for an organization. The user will be added to the organization and groups defined in the invitation
+ :param id: (required)
+ :type id: str
+ :param body: (required)
+ :type body: FrontierServiceAddOrganizationUsersRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_add_organization_users_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_add_organization_users_with_http_info(id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_add_organization_users_with_http_info(self, id : StrictStr, body : FrontierServiceAddOrganizationUsersRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Add organization user # noqa: E501
+
+ Add a user to an organization. A user must exists in Frontier before adding it to an org. This request will fail if the user doesn't exists # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_add_organization_users_with_http_info(id, body, async_req=True)
+ >>> result = thread.get()
- :param org_id: (required)
- :type org_id: str
:param id: (required)
:type id: str
+ :param body: (required)
+ :type body: FrontierServiceAddOrganizationUsersRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_accept_organization_invitation_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_accept_organization_invitation_with_http_info(
- self,
- org_id: StrictStr,
- id: StrictStr,
- _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]:
- """Accept pending invitation
+ _params = locals()
- Accept pending invitation queued for an organization. The user will be added to the organization and groups defined in the invitation
+ _all_params = [
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_add_organization_users" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :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._frontier_service_accept_organization_invitation_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
+
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # set the HTTP header `Content-Type`
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
- _response_types_map: Dict[str, Optional[str]] = {
+ _response_types_map = {
'200': "object",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{id}/users', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_create_organization(self, body : V1beta1OrganizationRequestBody, **kwargs) -> V1beta1CreateOrganizationResponse: # noqa: E501
+ """Create organization # noqa: E501
- @validate_call
- def frontier_service_accept_organization_invitation_without_preload_content(
- self,
- org_id: StrictStr,
- id: StrictStr,
- _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:
- """Accept pending invitation
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Accept pending invitation queued for an organization. The user will be added to the organization and groups defined in the invitation
+ >>> thread = api.frontier_service_create_organization(body, async_req=True)
+ >>> result = thread.get()
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
+ :param body: (required)
+ :type body: V1beta1OrganizationRequestBody
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CreateOrganizationResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_create_organization_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_create_organization_with_http_info(body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_create_organization_with_http_info(self, body : V1beta1OrganizationRequestBody, **kwargs) -> ApiResponse: # noqa: E501
+ """Create organization # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_create_organization_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1beta1OrganizationRequestBody
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_accept_organization_invitation_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CreateOrganizationResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- def _frontier_service_accept_organization_invitation_serialize(
- self,
- org_id,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _params = locals()
- _host = None
-
- _collection_formats: Dict[str, str] = {
-
- }
+ _all_params = [
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_create_organization" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if id is not None:
- _path_params['id'] = id
+ _path_params = {}
+
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
+ # set the HTTP header `Content-Type`
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1CreateOrganizationResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/organizations/{orgId}/invitations/{id}/accept',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_create_organization_domain(self, org_id : Annotated[StrictStr, Field(..., description="unique id of the organization for which whitelisted domains are to be added")], body : FrontierServiceCreateOrganizationDomainRequest, **kwargs) -> V1beta1CreateOrganizationDomainResponse: # noqa: E501
+ """Create org domain # noqa: E501
+ Add a domain to an organization which if verified allows all users of the same domain to be signed up to the organization without invitation. This API generates a verification token for a domain which must be added to your domain's DNS provider as a TXT record should be verified with Frontier VerifyOrganizationDomain API before it can be used as an Organization's trusted domain to sign up users. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.frontier_service_create_organization_domain(org_id, body, async_req=True)
+ >>> result = thread.get()
- @validate_call
- def frontier_service_add_organization_users(
- self,
- id: StrictStr,
- body: FrontierServiceAddOrganizationUsersRequest,
- _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:
- """Add organization user
-
- Add a user to an organization. A user must exists in Frontier before adding it to an org. This request will fail if the user doesn't exists
+ :param org_id: unique id of the organization for which whitelisted domains are to be added (required)
+ :type org_id: str
+ :param body: (required)
+ :type body: FrontierServiceCreateOrganizationDomainRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CreateOrganizationDomainResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_create_organization_domain_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_create_organization_domain_with_http_info(org_id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_create_organization_domain_with_http_info(self, org_id : Annotated[StrictStr, Field(..., description="unique id of the organization for which whitelisted domains are to be added")], body : FrontierServiceCreateOrganizationDomainRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Create org domain # noqa: E501
+
+ Add a domain to an organization which if verified allows all users of the same domain to be signed up to the organization without invitation. This API generates a verification token for a domain which must be added to your domain's DNS provider as a TXT record should be verified with Frontier VerifyOrganizationDomain API before it can be used as an Organization's trusted domain to sign up users. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_create_organization_domain_with_http_info(org_id, body, async_req=True)
+ >>> result = thread.get()
- :param id: (required)
- :type id: str
+ :param org_id: unique id of the organization for which whitelisted domains are to be added (required)
+ :type org_id: str
:param body: (required)
- :type body: FrontierServiceAddOrganizationUsersRequest
+ :type body: FrontierServiceCreateOrganizationDomainRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_add_organization_users_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CreateOrganizationDomainResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
+ _params = locals()
+
+ _all_params = [
+ 'org_id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_create_organization_domain" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
+
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # set the HTTP header `Content-Type`
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1CreateOrganizationDomainResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/domains', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- ).data
-
-
- @validate_call
- def frontier_service_add_organization_users_with_http_info(
- self,
- id: StrictStr,
- body: FrontierServiceAddOrganizationUsersRequest,
- _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]:
- """Add organization user
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
- Add a user to an organization. A user must exists in Frontier before adding it to an org. This request will fail if the user doesn't exists
+ @validate_arguments
+ def frontier_service_create_organization_invitation(self, org_id : Annotated[StrictStr, Field(..., description="unique id of the organization to which user is invited")], body : FrontierServiceCreateOrganizationInvitationRequest, **kwargs) -> V1beta1CreateOrganizationInvitationResponse: # noqa: E501
+ """Invite user # noqa: E501
- :param id: (required)
- :type id: str
+ Invite users to an organization, if user is not registered on the platform, it will be notified. Invitations expire in 7 days # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_create_organization_invitation(org_id, body, async_req=True)
+ >>> result = thread.get()
+
+ :param org_id: unique id of the organization to which user is invited (required)
+ :type org_id: str
:param body: (required)
- :type body: FrontierServiceAddOrganizationUsersRequest
+ :type body: FrontierServiceCreateOrganizationInvitationRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CreateOrganizationInvitationResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_create_organization_invitation_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_create_organization_invitation_with_http_info(org_id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_create_organization_invitation_with_http_info(self, org_id : Annotated[StrictStr, Field(..., description="unique id of the organization to which user is invited")], body : FrontierServiceCreateOrganizationInvitationRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Invite user # noqa: E501
+
+ Invite users to an organization, if user is not registered on the platform, it will be notified. Invitations expire in 7 days # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_create_organization_invitation_with_http_info(org_id, body, async_req=True)
+ >>> result = thread.get()
+
+ :param org_id: unique id of the organization to which user is invited (required)
+ :type org_id: str
+ :param body: (required)
+ :type body: FrontierServiceCreateOrganizationInvitationRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_add_organization_users_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CreateOrganizationInvitationResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_add_organization_users_without_preload_content(
- self,
- id: StrictStr,
- body: FrontierServiceAddOrganizationUsersRequest,
- _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:
- """Add organization user
-
- Add a user to an organization. A user must exists in Frontier before adding it to an org. This request will fail if the user doesn't exists
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: FrontierServiceAddOrganizationUsersRequest
- :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._frontier_service_add_organization_users_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ _params = locals()
+ _all_params = [
+ 'org_id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_create_organization_invitation" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_add_organization_users_serialize(
- self,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/organizations/{id}/users',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_create_organization(
- self,
- body: V1beta1OrganizationRequestBody,
- _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,
- ) -> V1beta1CreateOrganizationResponse:
- """Create organization
-
-
- :param body: (required)
- :type body: V1beta1OrganizationRequestBody
- :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._frontier_service_create_organization_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ _auth_settings = ['Basic'] # noqa: E501
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateOrganizationResponse",
+ _response_types_map = {
+ '200': "V1beta1CreateOrganizationInvitationResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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 frontier_service_create_organization_with_http_info(
- self,
- body: V1beta1OrganizationRequestBody,
- _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[V1beta1CreateOrganizationResponse]:
- """Create organization
-
-
- :param body: (required)
- :type body: V1beta1OrganizationRequestBody
- :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._frontier_service_create_organization_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateOrganizationResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/invitations', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_delete_organization(self, id : StrictStr, **kwargs) -> object: # noqa: E501
+ """Delete organization # noqa: E501
- @validate_call
- def frontier_service_create_organization_without_preload_content(
- self,
- body: V1beta1OrganizationRequestBody,
- _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 organization
+ Delete an organization and all of its relations permanently. The organization users will not be deleted from Frontier. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.frontier_service_delete_organization(id, async_req=True)
+ >>> result = thread.get()
- :param body: (required)
- :type body: V1beta1OrganizationRequestBody
+ :param id: (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_delete_organization_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_delete_organization_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_delete_organization_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """Delete organization # noqa: E501
+
+ Delete an organization and all of its relations permanently. The organization users will not be deleted from Frontier. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_delete_organization_with_http_info(id, async_req=True)
+ >>> result = thread.get()
+
+ :param id: (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_organization_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateOrganizationResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- def _frontier_service_create_organization_serialize(
- self,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_delete_organization" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
-
+ _body_params = None
# 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
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/organizations',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_create_organization_domain(
- self,
- org_id: Annotated[StrictStr, Field(description="unique id of the organization for which whitelisted domains are to be added")],
- body: FrontierServiceCreateOrganizationDomainRequest,
- _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,
- ) -> V1beta1CreateOrganizationDomainResponse:
- """Create org domain
-
- Add a domain to an organization which if verified allows all users of the same domain to be signed up to the organization without invitation. This API generates a verification token for a domain which must be added to your domain's DNS provider as a TXT record should be verified with Frontier VerifyOrganizationDomain API before it can be used as an Organization's trusted domain to sign up users.
-
- :param org_id: unique id of the organization for which whitelisted domains are to be added (required)
- :type org_id: str
- :param body: (required)
- :type body: FrontierServiceCreateOrganizationDomainRequest
- :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._frontier_service_create_organization_domain_serialize(
- org_id=org_id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ _auth_settings = ['Basic'] # noqa: E501
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateOrganizationDomainResponse",
+ _response_types_map = {
+ '200': "object",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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 frontier_service_create_organization_domain_with_http_info(
- self,
- org_id: Annotated[StrictStr, Field(description="unique id of the organization for which whitelisted domains are to be added")],
- body: FrontierServiceCreateOrganizationDomainRequest,
- _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[V1beta1CreateOrganizationDomainResponse]:
- """Create org domain
-
- Add a domain to an organization which if verified allows all users of the same domain to be signed up to the organization without invitation. This API generates a verification token for a domain which must be added to your domain's DNS provider as a TXT record should be verified with Frontier VerifyOrganizationDomain API before it can be used as an Organization's trusted domain to sign up users.
-
- :param org_id: unique id of the organization for which whitelisted domains are to be added (required)
- :type org_id: str
- :param body: (required)
- :type body: FrontierServiceCreateOrganizationDomainRequest
- :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._frontier_service_create_organization_domain_serialize(
- org_id=org_id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateOrganizationDomainResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{id}', 'DELETE',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_delete_organization_domain(self, org_id : Annotated[StrictStr, Field(..., description="unique id of the organization for which whitelisted domains are to be deleted")], id : Annotated[StrictStr, Field(..., description="unique id of the domain to be deleted")], **kwargs) -> object: # noqa: E501
+ """Delete org domain # noqa: E501
- @validate_call
- def frontier_service_create_organization_domain_without_preload_content(
- self,
- org_id: Annotated[StrictStr, Field(description="unique id of the organization for which whitelisted domains are to be added")],
- body: FrontierServiceCreateOrganizationDomainRequest,
- _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 org domain
+ Remove a domain from the list of an organization's trusted domains list # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Add a domain to an organization which if verified allows all users of the same domain to be signed up to the organization without invitation. This API generates a verification token for a domain which must be added to your domain's DNS provider as a TXT record should be verified with Frontier VerifyOrganizationDomain API before it can be used as an Organization's trusted domain to sign up users.
+ >>> thread = api.frontier_service_delete_organization_domain(org_id, id, async_req=True)
+ >>> result = thread.get()
- :param org_id: unique id of the organization for which whitelisted domains are to be added (required)
+ :param org_id: unique id of the organization for which whitelisted domains are to be deleted (required)
:type org_id: str
- :param body: (required)
- :type body: FrontierServiceCreateOrganizationDomainRequest
+ :param id: unique id of the domain to be deleted (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_delete_organization_domain_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_delete_organization_domain_with_http_info(org_id, id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_delete_organization_domain_with_http_info(self, org_id : Annotated[StrictStr, Field(..., description="unique id of the organization for which whitelisted domains are to be deleted")], id : Annotated[StrictStr, Field(..., description="unique id of the domain to be deleted")], **kwargs) -> ApiResponse: # noqa: E501
+ """Delete org domain # noqa: E501
+
+ Remove a domain from the list of an organization's trusted domains list # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_delete_organization_domain_with_http_info(org_id, id, async_req=True)
+ >>> result = thread.get()
+
+ :param org_id: unique id of the organization for which whitelisted domains are to be deleted (required)
+ :type org_id: str
+ :param id: unique id of the domain to be deleted (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_organization_domain_serialize(
- org_id=org_id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateOrganizationDomainResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ _params = locals()
+ _all_params = [
+ 'org_id',
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_delete_organization_domain" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_create_organization_domain_serialize(
- self,
- org_id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _collection_formats = {}
- _host = None
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
-
+ _body_params = None
# 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
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/organizations/{orgId}/domains',
- 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
- )
-
+ _auth_settings = ['Basic'] # noqa: E501
-
-
- @validate_call
- def frontier_service_create_organization_invitation(
- self,
- org_id: Annotated[StrictStr, Field(description="unique id of the organization to which user is invited")],
- body: FrontierServiceCreateOrganizationInvitationRequest,
- _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,
- ) -> V1beta1CreateOrganizationInvitationResponse:
- """Invite user
-
- Invite users to an organization, if user is not registered on the platform, it will be notified. Invitations expire in 7 days
-
- :param org_id: unique id of the organization to which user is invited (required)
- :type org_id: str
- :param body: (required)
- :type body: FrontierServiceCreateOrganizationInvitationRequest
- :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._frontier_service_create_organization_invitation_serialize(
- org_id=org_id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateOrganizationInvitationResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_organization_invitation_with_http_info(
- self,
- org_id: Annotated[StrictStr, Field(description="unique id of the organization to which user is invited")],
- body: FrontierServiceCreateOrganizationInvitationRequest,
- _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[V1beta1CreateOrganizationInvitationResponse]:
- """Invite user
-
- Invite users to an organization, if user is not registered on the platform, it will be notified. Invitations expire in 7 days
-
- :param org_id: unique id of the organization to which user is invited (required)
- :type org_id: str
- :param body: (required)
- :type body: FrontierServiceCreateOrganizationInvitationRequest
- :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._frontier_service_create_organization_invitation_serialize(
- org_id=org_id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateOrganizationInvitationResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_organization_invitation_without_preload_content(
- self,
- org_id: Annotated[StrictStr, Field(description="unique id of the organization to which user is invited")],
- body: FrontierServiceCreateOrganizationInvitationRequest,
- _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:
- """Invite user
-
- Invite users to an organization, if user is not registered on the platform, it will be notified. Invitations expire in 7 days
-
- :param org_id: unique id of the organization to which user is invited (required)
- :type org_id: str
- :param body: (required)
- :type body: FrontierServiceCreateOrganizationInvitationRequest
- :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._frontier_service_create_organization_invitation_serialize(
- org_id=org_id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateOrganizationInvitationResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_create_organization_invitation_serialize(
- self,
- org_id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
- if body is not None:
- _body_params = body
-
-
- # 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] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/organizations/{orgId}/invitations',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_delete_organization(
- self,
- id: StrictStr,
- _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:
- """Delete organization
-
- Delete an organization and all of its relations permanently. The organization users will not be deleted from Frontier.
-
- :param id: (required)
- :type id: str
- :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._frontier_service_delete_organization_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_delete_organization_with_http_info(
- self,
- id: StrictStr,
- _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]:
- """Delete organization
-
- Delete an organization and all of its relations permanently. The organization users will not be deleted from Frontier.
-
- :param id: (required)
- :type id: str
- :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._frontier_service_delete_organization_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_delete_organization_without_preload_content(
- self,
- id: StrictStr,
- _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:
- """Delete organization
-
- Delete an organization and all of its relations permanently. The organization users will not be deleted from Frontier.
-
- :param id: (required)
- :type id: str
- :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._frontier_service_delete_organization_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_delete_organization_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='DELETE',
- resource_path='/v1beta1/organizations/{id}',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_delete_organization_domain(
- self,
- org_id: Annotated[StrictStr, Field(description="unique id of the organization for which whitelisted domains are to be deleted")],
- id: Annotated[StrictStr, Field(description="unique id of the domain to be deleted")],
- _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:
- """Delete org domain
-
- Remove a domain from the list of an organization's trusted domains list
-
- :param org_id: unique id of the organization for which whitelisted domains are to be deleted (required)
- :type org_id: str
- :param id: unique id of the domain to be deleted (required)
- :type id: str
- :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._frontier_service_delete_organization_domain_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_delete_organization_domain_with_http_info(
- self,
- org_id: Annotated[StrictStr, Field(description="unique id of the organization for which whitelisted domains are to be deleted")],
- id: Annotated[StrictStr, Field(description="unique id of the domain to be deleted")],
- _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]:
- """Delete org domain
-
- Remove a domain from the list of an organization's trusted domains list
-
- :param org_id: unique id of the organization for which whitelisted domains are to be deleted (required)
- :type org_id: str
- :param id: unique id of the domain to be deleted (required)
- :type id: str
- :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._frontier_service_delete_organization_domain_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_delete_organization_domain_without_preload_content(
- self,
- org_id: Annotated[StrictStr, Field(description="unique id of the organization for which whitelisted domains are to be deleted")],
- id: Annotated[StrictStr, Field(description="unique id of the domain to be deleted")],
- _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:
- """Delete org domain
-
- Remove a domain from the list of an organization's trusted domains list
-
- :param org_id: unique id of the organization for which whitelisted domains are to be deleted (required)
- :type org_id: str
- :param id: unique id of the domain to be deleted (required)
- :type id: str
- :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._frontier_service_delete_organization_domain_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_delete_organization_domain_serialize(
- self,
- org_id,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='DELETE',
- resource_path='/v1beta1/organizations/{orgId}/domains/{id}',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_delete_organization_invitation(
- self,
- org_id: StrictStr,
- id: StrictStr,
- _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:
- """Delete pending invitation
-
- Delete a pending invitation queued for an organization
-
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :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._frontier_service_delete_organization_invitation_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_delete_organization_invitation_with_http_info(
- self,
- org_id: StrictStr,
- id: StrictStr,
- _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]:
- """Delete pending invitation
-
- Delete a pending invitation queued for an organization
-
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :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._frontier_service_delete_organization_invitation_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_delete_organization_invitation_without_preload_content(
- self,
- org_id: StrictStr,
- id: StrictStr,
- _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:
- """Delete pending invitation
-
- Delete a pending invitation queued for an organization
-
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :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._frontier_service_delete_organization_invitation_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_delete_organization_invitation_serialize(
- self,
- org_id,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='DELETE',
- resource_path='/v1beta1/organizations/{orgId}/invitations/{id}',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_disable_organization(
- self,
- id: StrictStr,
- body: Dict[str, Any],
- _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:
- """Disable organization
-
- Sets the state of the organization as disabled. The existing users in the org will not be able to access any organization resources.
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: object
- :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._frontier_service_disable_organization_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_disable_organization_with_http_info(
- self,
- id: StrictStr,
- body: Dict[str, Any],
- _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]:
- """Disable organization
-
- Sets the state of the organization as disabled. The existing users in the org will not be able to access any organization resources.
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: object
- :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._frontier_service_disable_organization_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_disable_organization_without_preload_content(
- self,
- id: StrictStr,
- body: Dict[str, Any],
- _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:
- """Disable organization
-
- Sets the state of the organization as disabled. The existing users in the org will not be able to access any organization resources.
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: object
- :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._frontier_service_disable_organization_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_disable_organization_serialize(
- self,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
- if body is not None:
- _body_params = body
-
-
- # 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] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/organizations/{id}/disable',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_enable_organization(
- self,
- id: StrictStr,
- body: Dict[str, Any],
- _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:
- """Enable organization
-
- Sets the state of the organization as enabled. The existing users in the org will be able to access any organization resources.
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: object
- :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._frontier_service_enable_organization_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_enable_organization_with_http_info(
- self,
- id: StrictStr,
- body: Dict[str, Any],
- _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]:
- """Enable organization
-
- Sets the state of the organization as enabled. The existing users in the org will be able to access any organization resources.
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: object
- :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._frontier_service_enable_organization_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_enable_organization_without_preload_content(
- self,
- id: StrictStr,
- body: Dict[str, Any],
- _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:
- """Enable organization
-
- Sets the state of the organization as enabled. The existing users in the org will be able to access any organization resources.
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: object
- :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._frontier_service_enable_organization_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_enable_organization_serialize(
- self,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
- if body is not None:
- _body_params = body
-
-
- # 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] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/organizations/{id}/enable',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_get_organization(
- self,
- id: StrictStr,
- _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,
- ) -> V1beta1GetOrganizationResponse:
- """Get organization
-
- Get organization by ID or name
-
- :param id: (required)
- :type id: str
- :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._frontier_service_get_organization_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetOrganizationResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_organization_with_http_info(
- self,
- id: StrictStr,
- _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[V1beta1GetOrganizationResponse]:
- """Get organization
-
- Get organization by ID or name
-
- :param id: (required)
- :type id: str
- :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._frontier_service_get_organization_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetOrganizationResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_organization_without_preload_content(
- self,
- id: StrictStr,
- _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:
- """Get organization
-
- Get organization by ID or name
-
- :param id: (required)
- :type id: str
- :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._frontier_service_get_organization_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetOrganizationResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_get_organization_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/organizations/{id}',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_get_organization_domain(
- self,
- org_id: Annotated[StrictStr, Field(description="unique id of the organization for which whitelisted domain is to be retrieved")],
- id: Annotated[StrictStr, Field(description="unique id of the domain to be retrieved")],
- _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,
- ) -> V1beta1GetOrganizationDomainResponse:
- """Get org domain
-
- Get a domain from the list of an organization's whitelisted domains. Returns both verified and unverified domains by their ID
-
- :param org_id: unique id of the organization for which whitelisted domain is to be retrieved (required)
- :type org_id: str
- :param id: unique id of the domain to be retrieved (required)
- :type id: str
- :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._frontier_service_get_organization_domain_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetOrganizationDomainResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_organization_domain_with_http_info(
- self,
- org_id: Annotated[StrictStr, Field(description="unique id of the organization for which whitelisted domain is to be retrieved")],
- id: Annotated[StrictStr, Field(description="unique id of the domain to be retrieved")],
- _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[V1beta1GetOrganizationDomainResponse]:
- """Get org domain
-
- Get a domain from the list of an organization's whitelisted domains. Returns both verified and unverified domains by their ID
-
- :param org_id: unique id of the organization for which whitelisted domain is to be retrieved (required)
- :type org_id: str
- :param id: unique id of the domain to be retrieved (required)
- :type id: str
- :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._frontier_service_get_organization_domain_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetOrganizationDomainResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_organization_domain_without_preload_content(
- self,
- org_id: Annotated[StrictStr, Field(description="unique id of the organization for which whitelisted domain is to be retrieved")],
- id: Annotated[StrictStr, Field(description="unique id of the domain to be retrieved")],
- _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:
- """Get org domain
-
- Get a domain from the list of an organization's whitelisted domains. Returns both verified and unverified domains by their ID
-
- :param org_id: unique id of the organization for which whitelisted domain is to be retrieved (required)
- :type org_id: str
- :param id: unique id of the domain to be retrieved (required)
- :type id: str
- :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._frontier_service_get_organization_domain_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetOrganizationDomainResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_get_organization_domain_serialize(
- self,
- org_id,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/organizations/{orgId}/domains/{id}',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_get_organization_invitation(
- self,
- org_id: StrictStr,
- id: StrictStr,
- _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,
- ) -> V1beta1GetOrganizationInvitationResponse:
- """Get pending invitation
-
- Returns a pending invitation queued for an organization
-
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :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._frontier_service_get_organization_invitation_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetOrganizationInvitationResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_organization_invitation_with_http_info(
- self,
- org_id: StrictStr,
- id: StrictStr,
- _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[V1beta1GetOrganizationInvitationResponse]:
- """Get pending invitation
-
- Returns a pending invitation queued for an organization
-
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :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._frontier_service_get_organization_invitation_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetOrganizationInvitationResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_organization_invitation_without_preload_content(
- self,
- org_id: StrictStr,
- id: StrictStr,
- _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:
- """Get pending invitation
-
- Returns a pending invitation queued for an organization
-
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :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._frontier_service_get_organization_invitation_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetOrganizationInvitationResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_get_organization_invitation_serialize(
- self,
- org_id,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/organizations/{orgId}/invitations/{id}',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_join_organization(
- self,
- org_id: StrictStr,
- _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:
- """Join organization
-
- Allows the current logged in user to join the Org if one is not a part of it. The user will only be able to join when the user email's domain matches the organization's whitelisted domains.
-
- :param org_id: (required)
- :type org_id: str
- :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._frontier_service_join_organization_serialize(
- org_id=org_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_join_organization_with_http_info(
- self,
- org_id: StrictStr,
- _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]:
- """Join organization
-
- Allows the current logged in user to join the Org if one is not a part of it. The user will only be able to join when the user email's domain matches the organization's whitelisted domains.
-
- :param org_id: (required)
- :type org_id: str
- :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._frontier_service_join_organization_serialize(
- org_id=org_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_join_organization_without_preload_content(
- self,
- org_id: StrictStr,
- _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:
- """Join organization
-
- Allows the current logged in user to join the Org if one is not a part of it. The user will only be able to join when the user email's domain matches the organization's whitelisted domains.
-
- :param org_id: (required)
- :type org_id: str
- :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._frontier_service_join_organization_serialize(
- org_id=org_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_join_organization_serialize(
- self,
- org_id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/organizations/{orgId}/join',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_list_organization_admins(
- self,
- id: StrictStr,
- _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,
- ) -> V1beta1ListOrganizationAdminsResponse:
- """List organization admins
-
- Returns a list admins of an organization
-
- :param id: (required)
- :type id: str
- :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._frontier_service_list_organization_admins_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationAdminsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_organization_admins_with_http_info(
- self,
- id: StrictStr,
- _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[V1beta1ListOrganizationAdminsResponse]:
- """List organization admins
-
- Returns a list admins of an organization
-
- :param id: (required)
- :type id: str
- :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._frontier_service_list_organization_admins_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationAdminsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_organization_admins_without_preload_content(
- self,
- id: StrictStr,
- _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:
- """List organization admins
-
- Returns a list admins of an organization
-
- :param id: (required)
- :type id: str
- :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._frontier_service_list_organization_admins_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationAdminsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_list_organization_admins_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/organizations/{id}/admins',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_list_organization_domains(
- self,
- org_id: Annotated[StrictStr, Field(description="unique id of the organization for which whitelisted domains are to be listed")],
- state: Annotated[Optional[StrictStr], Field(description="filter to list domains by their state (pending/verified). If not provided, all domains for an org will be listed")] = None,
- _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,
- ) -> V1beta1ListOrganizationDomainsResponse:
- """List org domains
-
- Returns all domains whitelisted for an organization (both pending and verified if no filters are provided for the state). The verified domains allow users email with the org's whitelisted domain to join the organization without invitation.
-
- :param org_id: unique id of the organization for which whitelisted domains are to be listed (required)
- :type org_id: str
- :param state: filter to list domains by their state (pending/verified). If not provided, all domains for an org will be listed
- :type state: str
- :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._frontier_service_list_organization_domains_serialize(
- org_id=org_id,
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationDomainsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_organization_domains_with_http_info(
- self,
- org_id: Annotated[StrictStr, Field(description="unique id of the organization for which whitelisted domains are to be listed")],
- state: Annotated[Optional[StrictStr], Field(description="filter to list domains by their state (pending/verified). If not provided, all domains for an org will be listed")] = None,
- _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[V1beta1ListOrganizationDomainsResponse]:
- """List org domains
-
- Returns all domains whitelisted for an organization (both pending and verified if no filters are provided for the state). The verified domains allow users email with the org's whitelisted domain to join the organization without invitation.
-
- :param org_id: unique id of the organization for which whitelisted domains are to be listed (required)
- :type org_id: str
- :param state: filter to list domains by their state (pending/verified). If not provided, all domains for an org will be listed
- :type state: str
- :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._frontier_service_list_organization_domains_serialize(
- org_id=org_id,
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationDomainsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_organization_domains_without_preload_content(
- self,
- org_id: Annotated[StrictStr, Field(description="unique id of the organization for which whitelisted domains are to be listed")],
- state: Annotated[Optional[StrictStr], Field(description="filter to list domains by their state (pending/verified). If not provided, all domains for an org will be listed")] = None,
- _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:
- """List org domains
-
- Returns all domains whitelisted for an organization (both pending and verified if no filters are provided for the state). The verified domains allow users email with the org's whitelisted domain to join the organization without invitation.
-
- :param org_id: unique id of the organization for which whitelisted domains are to be listed (required)
- :type org_id: str
- :param state: filter to list domains by their state (pending/verified). If not provided, all domains for an org will be listed
- :type state: str
- :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._frontier_service_list_organization_domains_serialize(
- org_id=org_id,
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationDomainsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_list_organization_domains_serialize(
- self,
- org_id,
- state,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- # process the query parameters
- if state is not None:
-
- _query_params.append(('state', state))
-
- # process the header parameters
- # process the form parameters
- # process the body parameter
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/organizations/{orgId}/domains',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_list_organization_invitations(
- self,
- org_id: Annotated[StrictStr, Field(description="unique id of the organization to which user is invited")],
- user_id: Annotated[Optional[StrictStr], Field(description="user_id filter is the email id of user who are invited inside the organization.")] = None,
- _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,
- ) -> V1beta1ListOrganizationInvitationsResponse:
- """List pending invitations
-
- Returns all pending invitations queued for an organization
-
- :param org_id: unique id of the organization to which user is invited (required)
- :type org_id: str
- :param user_id: user_id filter is the email id of user who are invited inside the organization.
- :type user_id: str
- :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._frontier_service_list_organization_invitations_serialize(
- org_id=org_id,
- user_id=user_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationInvitationsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_organization_invitations_with_http_info(
- self,
- org_id: Annotated[StrictStr, Field(description="unique id of the organization to which user is invited")],
- user_id: Annotated[Optional[StrictStr], Field(description="user_id filter is the email id of user who are invited inside the organization.")] = None,
- _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[V1beta1ListOrganizationInvitationsResponse]:
- """List pending invitations
-
- Returns all pending invitations queued for an organization
-
- :param org_id: unique id of the organization to which user is invited (required)
- :type org_id: str
- :param user_id: user_id filter is the email id of user who are invited inside the organization.
- :type user_id: str
- :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._frontier_service_list_organization_invitations_serialize(
- org_id=org_id,
- user_id=user_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationInvitationsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_organization_invitations_without_preload_content(
- self,
- org_id: Annotated[StrictStr, Field(description="unique id of the organization to which user is invited")],
- user_id: Annotated[Optional[StrictStr], Field(description="user_id filter is the email id of user who are invited inside the organization.")] = None,
- _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:
- """List pending invitations
-
- Returns all pending invitations queued for an organization
-
- :param org_id: unique id of the organization to which user is invited (required)
- :type org_id: str
- :param user_id: user_id filter is the email id of user who are invited inside the organization.
- :type user_id: str
- :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._frontier_service_list_organization_invitations_serialize(
- org_id=org_id,
- user_id=user_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationInvitationsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_list_organization_invitations_serialize(
- self,
- org_id,
- user_id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- # process the query parameters
- if user_id is not None:
-
- _query_params.append(('userId', user_id))
-
- # process the header parameters
- # process the form parameters
- # process the body parameter
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/organizations/{orgId}/invitations',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_list_organization_projects(
- self,
- id: StrictStr,
- state: Annotated[Optional[StrictStr], Field(description="Filter projects by state. If not specified, all projects are returned.
*Possible values:* `enabled` or `disabled`")] = None,
- _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,
- ) -> V1beta1ListOrganizationProjectsResponse:
- """Get organization projects
-
- Get all projects that belong to an organization
-
- :param id: (required)
- :type id: str
- :param state: Filter projects by state. If not specified, all projects are returned.
*Possible values:* `enabled` or `disabled`
- :type state: str
- :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._frontier_service_list_organization_projects_serialize(
- id=id,
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationProjectsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_organization_projects_with_http_info(
- self,
- id: StrictStr,
- state: Annotated[Optional[StrictStr], Field(description="Filter projects by state. If not specified, all projects are returned.
*Possible values:* `enabled` or `disabled`")] = None,
- _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[V1beta1ListOrganizationProjectsResponse]:
- """Get organization projects
-
- Get all projects that belong to an organization
-
- :param id: (required)
- :type id: str
- :param state: Filter projects by state. If not specified, all projects are returned.
*Possible values:* `enabled` or `disabled`
- :type state: str
- :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._frontier_service_list_organization_projects_serialize(
- id=id,
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationProjectsResponse",
+ _response_types_map = {
+ '200': "object",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/domains/{id}', 'DELETE',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_delete_organization_invitation(self, org_id : StrictStr, id : StrictStr, **kwargs) -> object: # noqa: E501
+ """Delete pending invitation # noqa: E501
- @validate_call
- def frontier_service_list_organization_projects_without_preload_content(
- self,
- id: StrictStr,
- state: Annotated[Optional[StrictStr], Field(description="Filter projects by state. If not specified, all projects are returned.
*Possible values:* `enabled` or `disabled`")] = None,
- _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:
- """Get organization projects
+ Delete a pending invitation queued for an organization # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Get all projects that belong to an organization
+ >>> thread = api.frontier_service_delete_organization_invitation(org_id, id, async_req=True)
+ >>> result = thread.get()
+ :param org_id: (required)
+ :type org_id: str
:param id: (required)
:type id: str
- :param state: Filter projects by state. If not specified, all projects are returned.
*Possible values:* `enabled` or `disabled`
- :type state: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_delete_organization_invitation_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_delete_organization_invitation_with_http_info(org_id, id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_delete_organization_invitation_with_http_info(self, org_id : StrictStr, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """Delete pending invitation # noqa: E501
+
+ Delete a pending invitation queued for an organization # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_delete_organization_invitation_with_http_info(org_id, id, async_req=True)
+ >>> result = thread.get()
+
+ :param org_id: (required)
+ :type org_id: str
+ :param id: (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_organization_projects_serialize(
- id=id,
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationProjectsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ _params = locals()
+ _all_params = [
+ 'org_id',
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_delete_organization_invitation" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_list_organization_projects_serialize(
- self,
- id,
- state,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _collection_formats = {}
- _host = None
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
- if state is not None:
-
- _query_params.append(('state', state))
-
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "object",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/organizations/{id}/projects',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/invitations/{id}', 'DELETE',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_disable_organization(self, id : StrictStr, body : Dict[str, Any], **kwargs) -> object: # noqa: E501
+ """Disable organization # noqa: E501
+ Sets the state of the organization as disabled. The existing users in the org will not be able to access any organization resources. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_list_organization_service_users(
- self,
- id: StrictStr,
- _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,
- ) -> V1beta1ListOrganizationServiceUsersResponse:
- """List organization service users
+ >>> thread = api.frontier_service_disable_organization(id, body, async_req=True)
+ >>> result = thread.get()
+ :param id: (required)
+ :type id: str
+ :param body: (required)
+ :type body: object
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_disable_organization_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_disable_organization_with_http_info(id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_disable_organization_with_http_info(self, id : StrictStr, body : Dict[str, Any], **kwargs) -> ApiResponse: # noqa: E501
+ """Disable organization # noqa: E501
+
+ Sets the state of the organization as disabled. The existing users in the org will not be able to access any organization resources. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_disable_organization_with_http_info(id, body, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
+ :param body: (required)
+ :type body: object
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_organization_service_users_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationServiceUsersResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_organization_service_users_with_http_info(
- self,
- id: StrictStr,
- _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[V1beta1ListOrganizationServiceUsersResponse]:
- """List organization service users
+ _params = locals()
+ _all_params = [
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_disable_organization" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- :param id: (required)
- :type id: str
- :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._frontier_service_list_organization_service_users_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ _collection_formats = {}
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationServiceUsersResponse",
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
+
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # set the HTTP header `Content-Type`
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "object",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{id}/disable', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_enable_organization(self, id : StrictStr, body : Dict[str, Any], **kwargs) -> object: # noqa: E501
+ """Enable organization # noqa: E501
- @validate_call
- def frontier_service_list_organization_service_users_without_preload_content(
- self,
- id: StrictStr,
- _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:
- """List organization service users
+ Sets the state of the organization as enabled. The existing users in the org will be able to access any organization resources. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_enable_organization(id, body, async_req=True)
+ >>> result = thread.get()
+ :param id: (required)
+ :type id: str
+ :param body: (required)
+ :type body: object
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_enable_organization_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_enable_organization_with_http_info(id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_enable_organization_with_http_info(self, id : StrictStr, body : Dict[str, Any], **kwargs) -> ApiResponse: # noqa: E501
+ """Enable organization # noqa: E501
+
+ Sets the state of the organization as enabled. The existing users in the org will be able to access any organization resources. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_enable_organization_with_http_info(id, body, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
+ :param body: (required)
+ :type body: object
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_organization_service_users_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationServiceUsersResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- def _frontier_service_list_organization_service_users_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _all_params = [
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_enable_organization" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
+ # set the HTTP header `Content-Type`
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "object",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/organizations/{id}/serviceusers',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{id}/enable', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_get_organization(self, id : StrictStr, **kwargs) -> V1beta1GetOrganizationResponse: # noqa: E501
+ """Get organization # noqa: E501
+ Get organization by ID or name # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.frontier_service_get_organization(id, async_req=True)
+ >>> result = thread.get()
- @validate_call
- def frontier_service_list_organization_users(
- self,
- id: StrictStr,
- permission_filter: Optional[StrictStr] = None,
- with_roles: Optional[StrictBool] = None,
- _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,
- ) -> V1beta1ListOrganizationUsersResponse:
- """List organization users
-
+ :param id: (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1GetOrganizationResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_get_organization_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_get_organization_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_get_organization_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """Get organization # noqa: E501
+
+ Get organization by ID or name # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_get_organization_with_http_info(id, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
- :param permission_filter:
- :type permission_filter: str
- :param with_roles:
- :type with_roles: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_organization_users_serialize(
- id=id,
- permission_filter=permission_filter,
- with_roles=with_roles,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1GetOrganizationResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationUsersResponse",
+ _params = locals()
+
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_get_organization" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
+
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1GetOrganizationResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{id}', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- ).data
-
-
- @validate_call
- def frontier_service_list_organization_users_with_http_info(
- self,
- id: StrictStr,
- permission_filter: Optional[StrictStr] = None,
- with_roles: Optional[StrictBool] = None,
- _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[V1beta1ListOrganizationUsersResponse]:
- """List organization users
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_get_organization_domain(self, org_id : Annotated[StrictStr, Field(..., description="unique id of the organization for which whitelisted domain is to be retrieved")], id : Annotated[StrictStr, Field(..., description="unique id of the domain to be retrieved")], **kwargs) -> V1beta1GetOrganizationDomainResponse: # noqa: E501
+ """Get org domain # noqa: E501
- :param id: (required)
+ Get a domain from the list of an organization's whitelisted domains. Returns both verified and unverified domains by their ID # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_get_organization_domain(org_id, id, async_req=True)
+ >>> result = thread.get()
+
+ :param org_id: unique id of the organization for which whitelisted domain is to be retrieved (required)
+ :type org_id: str
+ :param id: unique id of the domain to be retrieved (required)
:type id: str
- :param permission_filter:
- :type permission_filter: str
- :param with_roles:
- :type with_roles: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1GetOrganizationDomainResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_get_organization_domain_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_get_organization_domain_with_http_info(org_id, id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_get_organization_domain_with_http_info(self, org_id : Annotated[StrictStr, Field(..., description="unique id of the organization for which whitelisted domain is to be retrieved")], id : Annotated[StrictStr, Field(..., description="unique id of the domain to be retrieved")], **kwargs) -> ApiResponse: # noqa: E501
+ """Get org domain # noqa: E501
+
+ Get a domain from the list of an organization's whitelisted domains. Returns both verified and unverified domains by their ID # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_get_organization_domain_with_http_info(org_id, id, async_req=True)
+ >>> result = thread.get()
+
+ :param org_id: unique id of the organization for which whitelisted domain is to be retrieved (required)
+ :type org_id: str
+ :param id: unique id of the domain to be retrieved (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_organization_users_serialize(
- id=id,
- permission_filter=permission_filter,
- with_roles=with_roles,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1GetOrganizationDomainResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationUsersResponse",
+ _params = locals()
+
+ _all_params = [
+ 'org_id',
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_get_organization_domain" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
+
+ if _params['id']:
+ _path_params['id'] = _params['id']
+
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1GetOrganizationDomainResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/domains/{id}', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_get_organization_invitation(self, org_id : StrictStr, id : StrictStr, **kwargs) -> V1beta1GetOrganizationInvitationResponse: # noqa: E501
+ """Get pending invitation # noqa: E501
- @validate_call
- def frontier_service_list_organization_users_without_preload_content(
- self,
- id: StrictStr,
- permission_filter: Optional[StrictStr] = None,
- with_roles: Optional[StrictBool] = None,
- _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:
- """List organization users
+ Returns a pending invitation queued for an organization # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.frontier_service_get_organization_invitation(org_id, id, async_req=True)
+ >>> result = thread.get()
+ :param org_id: (required)
+ :type org_id: str
:param id: (required)
:type id: str
- :param permission_filter:
- :type permission_filter: str
- :param with_roles:
- :type with_roles: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1GetOrganizationInvitationResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_get_organization_invitation_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_get_organization_invitation_with_http_info(org_id, id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_get_organization_invitation_with_http_info(self, org_id : StrictStr, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """Get pending invitation # noqa: E501
+
+ Returns a pending invitation queued for an organization # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_get_organization_invitation_with_http_info(org_id, id, async_req=True)
+ >>> result = thread.get()
+
+ :param org_id: (required)
+ :type org_id: str
+ :param id: (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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._frontier_service_list_organization_users_serialize(
- id=id,
- permission_filter=permission_filter,
- with_roles=with_roles,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationUsersResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ (connection, read) timeouts.
+ :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
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1GetOrganizationInvitationResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- def _frontier_service_list_organization_users_serialize(
- self,
- id,
- permission_filter,
- with_roles,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _all_params = [
+ 'org_id',
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_get_organization_invitation" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
+
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
- if permission_filter is not None:
-
- _query_params.append(('permissionFilter', permission_filter))
-
- if with_roles is not None:
-
- _query_params.append(('withRoles', with_roles))
-
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1GetOrganizationInvitationResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/organizations/{id}/users',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/invitations/{id}', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_join_organization(self, org_id : StrictStr, **kwargs) -> object: # noqa: E501
+ """Join organization # noqa: E501
+ Allows the current logged in user to join the Org if one is not a part of it. The user will only be able to join when the user email's domain matches the organization's whitelisted domains. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.frontier_service_join_organization(org_id, async_req=True)
+ >>> result = thread.get()
- @validate_call
- def frontier_service_list_organizations(
- self,
- user_id: Annotated[Optional[StrictStr], Field(description="The user ID to filter by. It can be used to list all the organizations that the user is a member of. Otherwise, all the organizations in the Frontier instance will be listed.")] = None,
- state: Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be `enabled` or `disabled`.")] = None,
- _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,
- ) -> V1beta1ListOrganizationsResponse:
- """List organizations
-
- Returns a list of organizations. It can be filtered by userID or organization state.
+ :param org_id: (required)
+ :type org_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_join_organization_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_join_organization_with_http_info(org_id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_join_organization_with_http_info(self, org_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """Join organization # noqa: E501
+
+ Allows the current logged in user to join the Org if one is not a part of it. The user will only be able to join when the user email's domain matches the organization's whitelisted domains. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_join_organization_with_http_info(org_id, async_req=True)
+ >>> result = thread.get()
- :param user_id: The user ID to filter by. It can be used to list all the organizations that the user is a member of. Otherwise, all the organizations in the Frontier instance will be listed.
- :type user_id: str
- :param state: The state to filter by. It can be `enabled` or `disabled`.
- :type state: str
+ :param org_id: (required)
+ :type org_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_organizations_serialize(
- user_id=user_id,
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationsResponse",
+ _params = locals()
+
+ _all_params = [
+ 'org_id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_join_organization" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
+
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "object",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/join', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- ).data
-
-
- @validate_call
- def frontier_service_list_organizations_with_http_info(
- self,
- user_id: Annotated[Optional[StrictStr], Field(description="The user ID to filter by. It can be used to list all the organizations that the user is a member of. Otherwise, all the organizations in the Frontier instance will be listed.")] = None,
- state: Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be `enabled` or `disabled`.")] = None,
- _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[V1beta1ListOrganizationsResponse]:
- """List organizations
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
- Returns a list of organizations. It can be filtered by userID or organization state.
+ @validate_arguments
+ def frontier_service_list_organization_admins(self, id : StrictStr, **kwargs) -> V1beta1ListOrganizationAdminsResponse: # noqa: E501
+ """List organization admins # noqa: E501
- :param user_id: The user ID to filter by. It can be used to list all the organizations that the user is a member of. Otherwise, all the organizations in the Frontier instance will be listed.
- :type user_id: str
- :param state: The state to filter by. It can be `enabled` or `disabled`.
- :type state: str
+ Returns a list admins of an organization # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_organization_admins(id, async_req=True)
+ >>> result = thread.get()
+
+ :param id: (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListOrganizationAdminsResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_organization_admins_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_organization_admins_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_organization_admins_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """List organization admins # noqa: E501
+
+ Returns a list admins of an organization # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_organization_admins_with_http_info(id, async_req=True)
+ >>> result = thread.get()
+
+ :param id: (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_organizations_serialize(
- user_id=user_id,
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListOrganizationAdminsResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationsResponse",
+ _params = locals()
+
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_organization_admins" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
+
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListOrganizationAdminsResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{id}/admins', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_organization_domains(self, org_id : Annotated[StrictStr, Field(..., description="unique id of the organization for which whitelisted domains are to be listed")], state : Annotated[Optional[StrictStr], Field(description="filter to list domains by their state (pending/verified). If not provided, all domains for an org will be listed")] = None, **kwargs) -> V1beta1ListOrganizationDomainsResponse: # noqa: E501
+ """List org domains # noqa: E501
- @validate_call
- def frontier_service_list_organizations_without_preload_content(
- self,
- user_id: Annotated[Optional[StrictStr], Field(description="The user ID to filter by. It can be used to list all the organizations that the user is a member of. Otherwise, all the organizations in the Frontier instance will be listed.")] = None,
- state: Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be `enabled` or `disabled`.")] = None,
- _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:
- """List organizations
+ Returns all domains whitelisted for an organization (both pending and verified if no filters are provided for the state). The verified domains allow users email with the org's whitelisted domain to join the organization without invitation. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Returns a list of organizations. It can be filtered by userID or organization state.
+ >>> thread = api.frontier_service_list_organization_domains(org_id, state, async_req=True)
+ >>> result = thread.get()
- :param user_id: The user ID to filter by. It can be used to list all the organizations that the user is a member of. Otherwise, all the organizations in the Frontier instance will be listed.
- :type user_id: str
- :param state: The state to filter by. It can be `enabled` or `disabled`.
+ :param org_id: unique id of the organization for which whitelisted domains are to be listed (required)
+ :type org_id: str
+ :param state: filter to list domains by their state (pending/verified). If not provided, all domains for an org will be listed
+ :type state: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListOrganizationDomainsResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_organization_domains_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_organization_domains_with_http_info(org_id, state, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_organization_domains_with_http_info(self, org_id : Annotated[StrictStr, Field(..., description="unique id of the organization for which whitelisted domains are to be listed")], state : Annotated[Optional[StrictStr], Field(description="filter to list domains by their state (pending/verified). If not provided, all domains for an org will be listed")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """List org domains # noqa: E501
+
+ Returns all domains whitelisted for an organization (both pending and verified if no filters are provided for the state). The verified domains allow users email with the org's whitelisted domain to join the organization without invitation. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_organization_domains_with_http_info(org_id, state, async_req=True)
+ >>> result = thread.get()
+
+ :param org_id: unique id of the organization for which whitelisted domains are to be listed (required)
+ :type org_id: str
+ :param state: filter to list domains by their state (pending/verified). If not provided, all domains for an org will be listed
:type state: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_organizations_serialize(
- user_id=user_id,
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListOrganizationDomainsResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- def _frontier_service_list_organizations_serialize(
- self,
- user_id,
- state,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _all_params = [
+ 'org_id',
+ 'state'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_organization_domains" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
# process the query parameters
- if user_id is not None:
-
- _query_params.append(('userId', user_id))
-
- if state is not None:
-
- _query_params.append(('state', state))
-
+ _query_params = []
+ if _params.get('state') is not None: # noqa: E501
+ _query_params.append(('state', _params['state']))
+
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListOrganizationDomainsResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/organizations',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/domains', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_organization_invitations(self, org_id : Annotated[StrictStr, Field(..., description="unique id of the organization to which user is invited")], user_id : Annotated[Optional[StrictStr], Field(description="user_id filter is the email id of user who are invited inside the organization.")] = None, **kwargs) -> V1beta1ListOrganizationInvitationsResponse: # noqa: E501
+ """List pending invitations # noqa: E501
+ Returns all pending invitations queued for an organization # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_remove_organization_user(
- self,
- id: StrictStr,
- user_id: StrictStr,
- _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:
- """Remove organization user
+ >>> thread = api.frontier_service_list_organization_invitations(org_id, user_id, async_req=True)
+ >>> result = thread.get()
- Remove a user from an organization
+ :param org_id: unique id of the organization to which user is invited (required)
+ :type org_id: str
+ :param user_id: user_id filter is the email id of user who are invited inside the organization.
+ :type user_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListOrganizationInvitationsResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_organization_invitations_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_organization_invitations_with_http_info(org_id, user_id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_organization_invitations_with_http_info(self, org_id : Annotated[StrictStr, Field(..., description="unique id of the organization to which user is invited")], user_id : Annotated[Optional[StrictStr], Field(description="user_id filter is the email id of user who are invited inside the organization.")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """List pending invitations # noqa: E501
+
+ Returns all pending invitations queued for an organization # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_organization_invitations_with_http_info(org_id, user_id, async_req=True)
+ >>> result = thread.get()
- :param id: (required)
- :type id: str
- :param user_id: (required)
+ :param org_id: unique id of the organization to which user is invited (required)
+ :type org_id: str
+ :param user_id: user_id filter is the email id of user who are invited inside the organization.
:type user_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_remove_organization_user_serialize(
- id=id,
- user_id=user_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListOrganizationInvitationsResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
+ _params = locals()
+
+ _all_params = [
+ 'org_id',
+ 'user_id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_organization_invitations" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
+
+
+ # process the query parameters
+ _query_params = []
+ if _params.get('user_id') is not None: # noqa: E501
+ _query_params.append(('userId', _params['user_id']))
+
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListOrganizationInvitationsResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/invitations', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- ).data
-
-
- @validate_call
- def frontier_service_remove_organization_user_with_http_info(
- self,
- id: StrictStr,
- user_id: StrictStr,
- _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]:
- """Remove organization user
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+
+ @validate_arguments
+ def frontier_service_list_organization_projects(self, id : StrictStr, state : Annotated[Optional[StrictStr], Field(description="Filter projects by state. If not specified, all projects are returned.
*Possible values:* `enabled` or `disabled`")] = None, with_member_count : Optional[StrictBool] = None, **kwargs) -> V1beta1ListOrganizationProjectsResponse: # noqa: E501
+ """Get organization projects # noqa: E501
- Remove a user from an organization
+ Get all projects that belong to an organization # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_organization_projects(id, state, with_member_count, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
- :param user_id: (required)
- :type user_id: str
+ :param state: Filter projects by state. If not specified, all projects are returned.
*Possible values:* `enabled` or `disabled`
+ :type state: str
+ :param with_member_count:
+ :type with_member_count: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListOrganizationProjectsResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_organization_projects_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_organization_projects_with_http_info(id, state, with_member_count, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_organization_projects_with_http_info(self, id : StrictStr, state : Annotated[Optional[StrictStr], Field(description="Filter projects by state. If not specified, all projects are returned.
*Possible values:* `enabled` or `disabled`")] = None, with_member_count : Optional[StrictBool] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """Get organization projects # noqa: E501
+
+ Get all projects that belong to an organization # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_organization_projects_with_http_info(id, state, with_member_count, async_req=True)
+ >>> result = thread.get()
+
+ :param id: (required)
+ :type id: str
+ :param state: Filter projects by state. If not specified, all projects are returned.
*Possible values:* `enabled` or `disabled`
+ :type state: str
+ :param with_member_count:
+ :type with_member_count: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_remove_organization_user_serialize(
- id=id,
- user_id=user_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListOrganizationProjectsResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
+ _params = locals()
+
+ _all_params = [
+ 'id',
+ 'state',
+ 'with_member_count'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_organization_projects" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
+
+
+ # process the query parameters
+ _query_params = []
+ if _params.get('state') is not None: # noqa: E501
+ _query_params.append(('state', _params['state']))
+
+ if _params.get('with_member_count') is not None: # noqa: E501
+ _query_params.append(('withMemberCount', _params['with_member_count']))
+
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListOrganizationProjectsResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{id}/projects', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_organization_service_users(self, id : StrictStr, **kwargs) -> V1beta1ListOrganizationServiceUsersResponse: # noqa: E501
+ """List organization service users # noqa: E501
- @validate_call
- def frontier_service_remove_organization_user_without_preload_content(
- self,
- id: StrictStr,
- user_id: StrictStr,
- _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:
- """Remove organization user
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Remove a user from an organization
+ >>> thread = api.frontier_service_list_organization_service_users(id, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
- :param user_id: (required)
- :type user_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListOrganizationServiceUsersResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_organization_service_users_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_organization_service_users_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_organization_service_users_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """List organization service users # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_organization_service_users_with_http_info(id, async_req=True)
+ >>> result = thread.get()
+
+ :param id: (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_remove_organization_user_serialize(
- id=id,
- user_id=user_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListOrganizationServiceUsersResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- def _frontier_service_remove_organization_user_serialize(
- self,
- id,
- user_id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_organization_service_users" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
- if user_id is not None:
- _path_params['userId'] = user_id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListOrganizationServiceUsersResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='DELETE',
- resource_path='/v1beta1/organizations/{id}/users/{userId}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{id}/serviceusers', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_organization_users(self, id : StrictStr, permission_filter : Optional[StrictStr] = None, with_roles : Optional[StrictBool] = None, **kwargs) -> V1beta1ListOrganizationUsersResponse: # noqa: E501
+ """List organization users # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.frontier_service_list_organization_users(id, permission_filter, with_roles, async_req=True)
+ >>> result = thread.get()
- @validate_call
- def frontier_service_update_organization(
- self,
- id: StrictStr,
- body: V1beta1OrganizationRequestBody,
- _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,
- ) -> V1beta1UpdateOrganizationResponse:
- """Update organization
-
- Update organization by ID
+ :param id: (required)
+ :type id: str
+ :param permission_filter:
+ :type permission_filter: str
+ :param with_roles:
+ :type with_roles: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListOrganizationUsersResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_organization_users_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_organization_users_with_http_info(id, permission_filter, with_roles, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_organization_users_with_http_info(self, id : StrictStr, permission_filter : Optional[StrictStr] = None, with_roles : Optional[StrictBool] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """List organization users # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_organization_users_with_http_info(id, permission_filter, with_roles, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
- :param body: (required)
- :type body: V1beta1OrganizationRequestBody
+ :param permission_filter:
+ :type permission_filter: str
+ :param with_roles:
+ :type with_roles: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_update_organization_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListOrganizationUsersResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateOrganizationResponse",
+ _params = locals()
+
+ _all_params = [
+ 'id',
+ 'permission_filter',
+ 'with_roles'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_organization_users" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
+
+
+ # process the query parameters
+ _query_params = []
+ if _params.get('permission_filter') is not None: # noqa: E501
+ _query_params.append(('permissionFilter', _params['permission_filter']))
+
+ if _params.get('with_roles') is not None: # noqa: E501
+ _query_params.append(('withRoles', _params['with_roles']))
+
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListOrganizationUsersResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{id}/users', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- ).data
-
-
- @validate_call
- def frontier_service_update_organization_with_http_info(
- self,
- id: StrictStr,
- body: V1beta1OrganizationRequestBody,
- _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[V1beta1UpdateOrganizationResponse]:
- """Update organization
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
- Update organization by ID
+ @validate_arguments
+ def frontier_service_list_organizations(self, user_id : Annotated[Optional[StrictStr], Field(description="The user ID to filter by. It can be used to list all the organizations that the user is a member of. Otherwise, all the organizations in the Frontier instance will be listed.")] = None, state : Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be `enabled` or `disabled`.")] = None, **kwargs) -> V1beta1ListOrganizationsResponse: # noqa: E501
+ """List organizations # noqa: E501
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: V1beta1OrganizationRequestBody
+ Returns a list of organizations. It can be filtered by userID or organization state. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_organizations(user_id, state, async_req=True)
+ >>> result = thread.get()
+
+ :param user_id: The user ID to filter by. It can be used to list all the organizations that the user is a member of. Otherwise, all the organizations in the Frontier instance will be listed.
+ :type user_id: str
+ :param state: The state to filter by. It can be `enabled` or `disabled`.
+ :type state: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListOrganizationsResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_organizations_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_organizations_with_http_info(user_id, state, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_organizations_with_http_info(self, user_id : Annotated[Optional[StrictStr], Field(description="The user ID to filter by. It can be used to list all the organizations that the user is a member of. Otherwise, all the organizations in the Frontier instance will be listed.")] = None, state : Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be `enabled` or `disabled`.")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """List organizations # noqa: E501
+
+ Returns a list of organizations. It can be filtered by userID or organization state. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_organizations_with_http_info(user_id, state, async_req=True)
+ >>> result = thread.get()
+
+ :param user_id: The user ID to filter by. It can be used to list all the organizations that the user is a member of. Otherwise, all the organizations in the Frontier instance will be listed.
+ :type user_id: str
+ :param state: The state to filter by. It can be `enabled` or `disabled`.
+ :type state: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_update_organization_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListOrganizationsResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateOrganizationResponse",
+ _params = locals()
+
+ _all_params = [
+ 'user_id',
+ 'state'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_organizations" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+
+ # process the query parameters
+ _query_params = []
+ if _params.get('user_id') is not None: # noqa: E501
+ _query_params.append(('userId', _params['user_id']))
+
+ if _params.get('state') is not None: # noqa: E501
+ _query_params.append(('state', _params['state']))
+
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListOrganizationsResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/organizations', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_remove_organization_user(self, id : StrictStr, user_id : StrictStr, **kwargs) -> object: # noqa: E501
+ """Remove organization user # noqa: E501
- @validate_call
- def frontier_service_update_organization_without_preload_content(
- self,
- id: StrictStr,
- body: V1beta1OrganizationRequestBody,
- _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:
- """Update organization
+ Remove a user from an organization # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Update organization by ID
+ >>> thread = api.frontier_service_remove_organization_user(id, user_id, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
- :param body: (required)
- :type body: V1beta1OrganizationRequestBody
+ :param user_id: (required)
+ :type user_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_remove_organization_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_remove_organization_user_with_http_info(id, user_id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_remove_organization_user_with_http_info(self, id : StrictStr, user_id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """Remove organization user # noqa: E501
+
+ Remove a user from an organization # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_remove_organization_user_with_http_info(id, user_id, async_req=True)
+ >>> result = thread.get()
+
+ :param id: (required)
+ :type id: str
+ :param user_id: (required)
+ :type user_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_update_organization_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateOrganizationResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ _params = locals()
+ _all_params = [
+ 'id',
+ 'user_id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_remove_organization_user" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_update_organization_serialize(
- self,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _collection_formats = {}
- _host = None
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['user_id']:
+ _path_params['userId'] = _params['user_id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
-
+ _body_params = None
# 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
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='PUT',
- resource_path='/v1beta1/organizations/{id}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ _response_types_map = {
+ '200': "object",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
+
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{id}/users/{userId}', 'DELETE',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_update_organization(self, id : StrictStr, body : V1beta1OrganizationRequestBody, **kwargs) -> V1beta1UpdateOrganizationResponse: # noqa: E501
+ """Update organization # noqa: E501
+ Update organization by ID # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.frontier_service_update_organization(id, body, async_req=True)
+ >>> result = thread.get()
- @validate_call
- def frontier_service_verify_organization_domain(
- self,
- org_id: Annotated[StrictStr, Field(description="unique id of the organization for which whitelisted domains are to be verified")],
- id: Annotated[StrictStr, Field(description="unique id of the domain to be verified")],
- body: Dict[str, Any],
- _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,
- ) -> V1beta1VerifyOrganizationDomainResponse:
- """Verify org domain
-
- Verify a domain for an organization with a verification token generated by Frontier GenerateDomainVerificationToken API. The token must be added to your domain's DNS provider as a TXT record before it can be verified. This API returns the state of the domain (pending/verified) after verification.
+ :param id: (required)
+ :type id: str
+ :param body: (required)
+ :type body: V1beta1OrganizationRequestBody
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1UpdateOrganizationResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_update_organization_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_update_organization_with_http_info(id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_update_organization_with_http_info(self, id : StrictStr, body : V1beta1OrganizationRequestBody, **kwargs) -> ApiResponse: # noqa: E501
+ """Update organization # noqa: E501
+
+ Update organization by ID # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_update_organization_with_http_info(id, body, async_req=True)
+ >>> result = thread.get()
- :param org_id: unique id of the organization for which whitelisted domains are to be verified (required)
- :type org_id: str
- :param id: unique id of the domain to be verified (required)
+ :param id: (required)
:type id: str
:param body: (required)
- :type body: object
+ :type body: V1beta1OrganizationRequestBody
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_verify_organization_domain_serialize(
- org_id=org_id,
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1UpdateOrganizationResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1VerifyOrganizationDomainResponse",
+ _params = locals()
+
+ _all_params = [
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_update_organization" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
+
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # set the HTTP header `Content-Type`
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1UpdateOrganizationResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{id}', 'PUT',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- ).data
-
-
- @validate_call
- def frontier_service_verify_organization_domain_with_http_info(
- self,
- org_id: Annotated[StrictStr, Field(description="unique id of the organization for which whitelisted domains are to be verified")],
- id: Annotated[StrictStr, Field(description="unique id of the domain to be verified")],
- body: Dict[str, Any],
- _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[V1beta1VerifyOrganizationDomainResponse]:
- """Verify org domain
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+
+ @validate_arguments
+ def frontier_service_verify_organization_domain(self, org_id : Annotated[StrictStr, Field(..., description="unique id of the organization for which whitelisted domains are to be verified")], id : Annotated[StrictStr, Field(..., description="unique id of the domain to be verified")], body : Dict[str, Any], **kwargs) -> V1beta1VerifyOrganizationDomainResponse: # noqa: E501
+ """Verify org domain # noqa: E501
+
+ Verify a domain for an organization with a verification token generated by Frontier GenerateDomainVerificationToken API. The token must be added to your domain's DNS provider as a TXT record before it can be verified. This API returns the state of the domain (pending/verified) after verification. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Verify a domain for an organization with a verification token generated by Frontier GenerateDomainVerificationToken API. The token must be added to your domain's DNS provider as a TXT record before it can be verified. This API returns the state of the domain (pending/verified) after verification.
+ >>> thread = api.frontier_service_verify_organization_domain(org_id, id, body, async_req=True)
+ >>> result = thread.get()
:param org_id: unique id of the organization for which whitelisted domains are to be verified (required)
:type org_id: str
@@ -7285,81 +3765,33 @@ def frontier_service_verify_organization_domain_with_http_info(
:type id: str
:param body: (required)
:type body: object
- :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._frontier_service_verify_organization_domain_serialize(
- org_id=org_id,
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1VerifyOrganizationDomainResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_verify_organization_domain_without_preload_content(
- self,
- org_id: Annotated[StrictStr, Field(description="unique id of the organization for which whitelisted domains are to be verified")],
- id: Annotated[StrictStr, Field(description="unique id of the domain to be verified")],
- body: Dict[str, Any],
- _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:
- """Verify org domain
-
- Verify a domain for an organization with a verification token generated by Frontier GenerateDomainVerificationToken API. The token must be added to your domain's DNS provider as a TXT record before it can be verified. This API returns the state of the domain (pending/verified) after verification.
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1VerifyOrganizationDomainResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_verify_organization_domain_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_verify_organization_domain_with_http_info(org_id, id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_verify_organization_domain_with_http_info(self, org_id : Annotated[StrictStr, Field(..., description="unique id of the organization for which whitelisted domains are to be verified")], id : Annotated[StrictStr, Field(..., description="unique id of the domain to be verified")], body : Dict[str, Any], **kwargs) -> ApiResponse: # noqa: E501
+ """Verify org domain # noqa: E501
+
+ Verify a domain for an organization with a verification token generated by Frontier GenerateDomainVerificationToken API. The token must be added to your domain's DNS provider as a TXT record before it can be verified. This API returns the state of the domain (pending/verified) after verification. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_verify_organization_domain_with_http_info(org_id, id, body, async_req=True)
+ >>> result = thread.get()
:param org_id: unique id of the organization for which whitelisted domains are to be verified (required)
:type org_id: str
@@ -7367,131 +3799,119 @@ def frontier_service_verify_organization_domain_without_preload_content(
:type id: str
:param body: (required)
:type body: object
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_verify_organization_domain_serialize(
- org_id=org_id,
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1VerifyOrganizationDomainResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1VerifyOrganizationDomainResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ _params = locals()
+ _all_params = [
+ 'org_id',
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_verify_organization_domain" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_verify_organization_domain_serialize(
- self,
- org_id,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _collection_formats = {}
- _host = None
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1VerifyOrganizationDomainResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/organizations/{orgId}/domains/{id}/verify',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/domains/{id}/verify', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
diff --git a/frontier_api/api/permission_api.py b/frontier_api/api/permission_api.py
index b35bb30..a8b73e5 100644
--- a/frontier_api/api/permission_api.py
+++ b/frontier_api/api/permission_api.py
@@ -13,20 +13,15 @@
""" # noqa: E501
+import re # noqa: F401
import io
import warnings
-from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
-from typing import Dict, List, Optional, Tuple, Union, Any
-
-try:
- from typing import Annotated
-except ImportError:
- from typing_extensions import Annotated
+from pydantic import validate_arguments, ValidationError
from pydantic import StrictStr
-from typing import Any, Dict, Union
+from typing import Any, Dict
from frontier_api.models.v1beta1_create_permission_request import V1beta1CreatePermissionRequest
from frontier_api.models.v1beta1_create_permission_response import V1beta1CreatePermissionResponse
@@ -37,7 +32,10 @@
from frontier_api.api_client import ApiClient
from frontier_api.api_response import ApiResponse
-from frontier_api.rest import RESTResponseType
+from frontier_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class PermissionApi:
@@ -52,1422 +50,737 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client
+ @validate_arguments
+ def admin_service_create_permission(self, body : V1beta1CreatePermissionRequest, **kwargs) -> V1beta1CreatePermissionResponse: # noqa: E501
+ """Create platform permission # noqa: E501
- @validate_call
- def admin_service_create_permission(
- self,
- body: V1beta1CreatePermissionRequest,
- _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,
- ) -> V1beta1CreatePermissionResponse:
- """Create platform permission
+ Creates a permission. It can be used to grant permissions to all the resources in a Frontier instance. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Creates a permission. It can be used to grant permissions to all the resources in a Frontier instance.
+ >>> thread = api.admin_service_create_permission(body, async_req=True)
+ >>> result = thread.get()
:param body: (required)
:type body: V1beta1CreatePermissionRequest
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_create_permission_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreatePermissionResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 admin_service_create_permission_with_http_info(
- self,
- body: V1beta1CreatePermissionRequest,
- _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[V1beta1CreatePermissionResponse]:
- """Create platform permission
-
- Creates a permission. It can be used to grant permissions to all the resources in a Frontier instance.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CreatePermissionResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the admin_service_create_permission_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.admin_service_create_permission_with_http_info(body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def admin_service_create_permission_with_http_info(self, body : V1beta1CreatePermissionRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Create platform permission # noqa: E501
+
+ Creates a permission. It can be used to grant permissions to all the resources in a Frontier instance. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.admin_service_create_permission_with_http_info(body, async_req=True)
+ >>> result = thread.get()
:param body: (required)
:type body: V1beta1CreatePermissionRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_create_permission_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreatePermissionResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CreatePermissionResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def admin_service_create_permission_without_preload_content(
- self,
- body: V1beta1CreatePermissionRequest,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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 platform permission
-
- Creates a permission. It can be used to grant permissions to all the resources in a Frontier instance.
-
- :param body: (required)
- :type body: V1beta1CreatePermissionRequest
- :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._admin_service_create_permission_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreatePermissionResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _admin_service_create_permission_serialize(
- self,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _host = None
-
- _collection_formats: Dict[str, str] = {
-
- }
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method admin_service_create_permission" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
+ _path_params = {}
+
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1CreatePermissionResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/permissions',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/permissions', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def admin_service_delete_permission(self, id : StrictStr, **kwargs) -> object: # noqa: E501
+ """Delete platform permission # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def admin_service_delete_permission(
- self,
- id: StrictStr,
- _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:
- """Delete platform permission
-
+ >>> thread = api.admin_service_delete_permission(id, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_delete_permission_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 admin_service_delete_permission_with_http_info(
- self,
- id: StrictStr,
- _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]:
- """Delete platform permission
-
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the admin_service_delete_permission_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.admin_service_delete_permission_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def admin_service_delete_permission_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """Delete platform permission # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.admin_service_delete_permission_with_http_info(id, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_delete_permission_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def admin_service_delete_permission_without_preload_content(
- self,
- id: StrictStr,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Delete platform permission
-
-
- :param id: (required)
- :type id: str
- :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._admin_service_delete_permission_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _admin_service_delete_permission_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method admin_service_delete_permission" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "object",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='DELETE',
- resource_path='/v1beta1/permissions/{id}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/permissions/{id}', 'DELETE',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def admin_service_update_permission(self, id : StrictStr, body : V1beta1PermissionRequestBody, **kwargs) -> V1beta1UpdatePermissionResponse: # noqa: E501
+ """Update platform permission # noqa: E501
+ Updates a permission by ID. It can be used to grant permissions to all the resources in a Frontier instance. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
-
- @validate_call
- def admin_service_update_permission(
- self,
- id: StrictStr,
- body: V1beta1PermissionRequestBody,
- _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,
- ) -> V1beta1UpdatePermissionResponse:
- """Update platform permission
-
- Updates a permission by ID. It can be used to grant permissions to all the resources in a Frontier instance.
+ >>> thread = api.admin_service_update_permission(id, body, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
:param body: (required)
:type body: V1beta1PermissionRequestBody
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_update_permission_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdatePermissionResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 admin_service_update_permission_with_http_info(
- self,
- id: StrictStr,
- body: V1beta1PermissionRequestBody,
- _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[V1beta1UpdatePermissionResponse]:
- """Update platform permission
-
- Updates a permission by ID. It can be used to grant permissions to all the resources in a Frontier instance.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1UpdatePermissionResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the admin_service_update_permission_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.admin_service_update_permission_with_http_info(id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def admin_service_update_permission_with_http_info(self, id : StrictStr, body : V1beta1PermissionRequestBody, **kwargs) -> ApiResponse: # noqa: E501
+ """Update platform permission # noqa: E501
+
+ Updates a permission by ID. It can be used to grant permissions to all the resources in a Frontier instance. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.admin_service_update_permission_with_http_info(id, body, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
:param body: (required)
:type body: V1beta1PermissionRequestBody
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_update_permission_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdatePermissionResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1UpdatePermissionResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def admin_service_update_permission_without_preload_content(
- self,
- id: StrictStr,
- body: V1beta1PermissionRequestBody,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Update platform permission
-
- Updates a permission by ID. It can be used to grant permissions to all the resources in a Frontier instance.
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: V1beta1PermissionRequestBody
- :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._admin_service_update_permission_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdatePermissionResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _admin_service_update_permission_serialize(
- self,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method admin_service_update_permission" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1UpdatePermissionResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='PUT',
- resource_path='/v1beta1/permissions/{id}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/permissions/{id}', 'PUT',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_get_permission(self, id : StrictStr, **kwargs) -> V1beta1GetPermissionResponse: # noqa: E501
+ """Get permission # noqa: E501
+ Returns a permission by ID # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
-
- @validate_call
- def frontier_service_get_permission(
- self,
- id: StrictStr,
- _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,
- ) -> V1beta1GetPermissionResponse:
- """Get permission
-
- Returns a permission by ID
+ >>> thread = api.frontier_service_get_permission(id, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_get_permission_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetPermissionResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_permission_with_http_info(
- self,
- id: StrictStr,
- _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[V1beta1GetPermissionResponse]:
- """Get permission
-
- Returns a permission by ID
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1GetPermissionResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_get_permission_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_get_permission_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_get_permission_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """Get permission # noqa: E501
+
+ Returns a permission by ID # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_get_permission_with_http_info(id, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_get_permission_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetPermissionResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1GetPermissionResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_get_permission_without_preload_content(
- self,
- id: StrictStr,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Get permission
-
- Returns a permission by ID
-
- :param id: (required)
- :type id: str
- :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._frontier_service_get_permission_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetPermissionResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
)
- return response_data.response
-
- def _frontier_service_get_permission_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_get_permission" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/permissions/{id}',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_list_permissions(
- self,
- _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,
- ) -> V1beta1ListPermissionsResponse:
- """Get all permissions
-
-
- :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._frontier_service_list_permissions_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListPermissionsResponse",
+ _response_types_map = {
+ '200': "V1beta1GetPermissionResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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 frontier_service_list_permissions_with_http_info(
- self,
- _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[V1beta1ListPermissionsResponse]:
- """Get all permissions
-
-
- :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._frontier_service_list_permissions_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListPermissionsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
+ return self.api_client.call_api(
+ '/v1beta1/permissions/{id}', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_permissions(self, **kwargs) -> V1beta1ListPermissionsResponse: # noqa: E501
+ """Get all permissions # noqa: E501
- @validate_call
- def frontier_service_list_permissions_without_preload_content(
- self,
- _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:
- """Get all permissions
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.frontier_service_list_permissions(async_req=True)
+ >>> result = thread.get()
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListPermissionsResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_permissions_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_permissions_with_http_info(**kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_permissions_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
+ """Get all permissions # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_permissions_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListPermissionsResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _param = self._frontier_service_list_permissions_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ _params = locals()
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListPermissionsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
+ _all_params = [
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- return response_data.response
-
- def _frontier_service_list_permissions_serialize(
- self,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _host = None
-
- _collection_formats: Dict[str, str] = {
-
- }
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_permissions" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
+ _path_params = {}
+
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/permissions',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ _response_types_map = {
+ '200': "V1beta1ListPermissionsResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
+
+ return self.api_client.call_api(
+ '/v1beta1/permissions', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
diff --git a/frontier_api/api/plan_api.py b/frontier_api/api/plan_api.py
index 9704981..715516c 100644
--- a/frontier_api/api/plan_api.py
+++ b/frontier_api/api/plan_api.py
@@ -13,20 +13,14 @@
""" # noqa: E501
+import re # noqa: F401
import io
import warnings
-from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
-from typing import Dict, List, Optional, Tuple, Union, Any
+from pydantic import validate_arguments, ValidationError
-try:
- from typing import Annotated
-except ImportError:
- from typing_extensions import Annotated
-
-from pydantic import Field
from typing_extensions import Annotated
-from pydantic import StrictStr
+from pydantic import Field, StrictStr
from frontier_api.models.frontier_service_update_plan_request import FrontierServiceUpdatePlanRequest
from frontier_api.models.v1beta1_create_plan_request import V1beta1CreatePlanRequest
@@ -37,7 +31,10 @@
from frontier_api.api_client import ApiClient
from frontier_api.api_response import ApiResponse
-from frontier_api.rest import RESTResponseType
+from frontier_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class PlanApi:
@@ -52,1148 +49,596 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client
+ @validate_arguments
+ def frontier_service_create_plan(self, body : V1beta1CreatePlanRequest, **kwargs) -> V1beta1CreatePlanResponse: # noqa: E501
+ """Create plan # noqa: E501
- @validate_call
- def frontier_service_create_plan(
- self,
- body: V1beta1CreatePlanRequest,
- _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,
- ) -> V1beta1CreatePlanResponse:
- """Create plan
+ Create a new plan for platform. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Create a new plan for platform.
+ >>> thread = api.frontier_service_create_plan(body, async_req=True)
+ >>> result = thread.get()
:param body: (required)
:type body: V1beta1CreatePlanRequest
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_plan_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreatePlanResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_plan_with_http_info(
- self,
- body: V1beta1CreatePlanRequest,
- _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[V1beta1CreatePlanResponse]:
- """Create plan
-
- Create a new plan for platform.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CreatePlanResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_create_plan_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_create_plan_with_http_info(body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_create_plan_with_http_info(self, body : V1beta1CreatePlanRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Create plan # noqa: E501
+
+ Create a new plan for platform. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_create_plan_with_http_info(body, async_req=True)
+ >>> result = thread.get()
:param body: (required)
:type body: V1beta1CreatePlanRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_plan_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreatePlanResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CreatePlanResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_create_plan_without_preload_content(
- self,
- body: V1beta1CreatePlanRequest,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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 plan
-
- Create a new plan for platform.
-
- :param body: (required)
- :type body: V1beta1CreatePlanRequest
- :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._frontier_service_create_plan_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreatePlanResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
)
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_create_plan" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_create_plan_serialize(
- self,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
+ _path_params = {}
+
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/billing/plans',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ _response_types_map = {
+ '200': "V1beta1CreatePlanResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
+
+ return self.api_client.call_api(
+ '/v1beta1/billing/plans', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_get_plan(self, id : Annotated[StrictStr, Field(..., description="ID of the plan to get")], **kwargs) -> V1beta1GetPlanResponse: # noqa: E501
+ """Get plan # noqa: E501
- @validate_call
- def frontier_service_get_plan(
- self,
- id: Annotated[StrictStr, Field(description="ID of the plan to get")],
- _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,
- ) -> V1beta1GetPlanResponse:
- """Get plan
+ Get a plan by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Get a plan by ID.
+ >>> thread = api.frontier_service_get_plan(id, async_req=True)
+ >>> result = thread.get()
:param id: ID of the plan to get (required)
:type id: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_get_plan_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetPlanResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_plan_with_http_info(
- self,
- id: Annotated[StrictStr, Field(description="ID of the plan to get")],
- _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[V1beta1GetPlanResponse]:
- """Get plan
-
- Get a plan by ID.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1GetPlanResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_get_plan_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_get_plan_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_get_plan_with_http_info(self, id : Annotated[StrictStr, Field(..., description="ID of the plan to get")], **kwargs) -> ApiResponse: # noqa: E501
+ """Get plan # noqa: E501
+
+ Get a plan by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_get_plan_with_http_info(id, async_req=True)
+ >>> result = thread.get()
:param id: ID of the plan to get (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_get_plan_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetPlanResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1GetPlanResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_get_plan_without_preload_content(
- self,
- id: Annotated[StrictStr, Field(description="ID of the plan to get")],
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Get plan
-
- Get a plan by ID.
-
- :param id: ID of the plan to get (required)
- :type id: str
- :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._frontier_service_get_plan_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetPlanResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
)
- return response_data.response
-
- def _frontier_service_get_plan_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_get_plan" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/billing/plans/{id}',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_list_plans(
- self,
- _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,
- ) -> V1beta1ListPlansResponse:
- """List plans
-
- List all plans.
+ _auth_settings = ['Basic'] # noqa: E501
- :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._frontier_service_list_plans_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListPlansResponse",
+ _response_types_map = {
+ '200': "V1beta1GetPlanResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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 frontier_service_list_plans_with_http_info(
- self,
- _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[V1beta1ListPlansResponse]:
- """List plans
-
- List all plans.
-
- :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._frontier_service_list_plans_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListPlansResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
+ return self.api_client.call_api(
+ '/v1beta1/billing/plans/{id}', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_plans(self, **kwargs) -> V1beta1ListPlansResponse: # noqa: E501
+ """List plans # noqa: E501
- @validate_call
- def frontier_service_list_plans_without_preload_content(
- self,
- _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:
- """List plans
+ List all plans. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- List all plans.
+ >>> thread = api.frontier_service_list_plans(async_req=True)
+ >>> result = thread.get()
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListPlansResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_plans_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_plans_with_http_info(**kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_plans_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
+ """List plans # noqa: E501
+
+ List all plans. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_plans_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListPlansResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _param = self._frontier_service_list_plans_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ _params = locals()
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListPlansResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
+ _all_params = [
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- return response_data.response
-
-
- def _frontier_service_list_plans_serialize(
- self,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
- _host = None
-
- _collection_formats: Dict[str, str] = {
-
- }
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_plans" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
+ _path_params = {}
+
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/billing/plans',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ _response_types_map = {
+ '200': "V1beta1ListPlansResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
+
+ return self.api_client.call_api(
+ '/v1beta1/billing/plans', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_update_plan(self, id : Annotated[StrictStr, Field(..., description="ID of the plan to update")], body : FrontierServiceUpdatePlanRequest, **kwargs) -> V1beta1UpdatePlanResponse: # noqa: E501
+ """Update plan # noqa: E501
+ Update a plan by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_update_plan(
- self,
- id: Annotated[StrictStr, Field(description="ID of the plan to update")],
- body: FrontierServiceUpdatePlanRequest,
- _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,
- ) -> V1beta1UpdatePlanResponse:
- """Update plan
-
- Update a plan by ID.
+ >>> thread = api.frontier_service_update_plan(id, body, async_req=True)
+ >>> result = thread.get()
:param id: ID of the plan to update (required)
:type id: str
:param body: (required)
:type body: FrontierServiceUpdatePlanRequest
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_update_plan_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdatePlanResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_update_plan_with_http_info(
- self,
- id: Annotated[StrictStr, Field(description="ID of the plan to update")],
- body: FrontierServiceUpdatePlanRequest,
- _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[V1beta1UpdatePlanResponse]:
- """Update plan
-
- Update a plan by ID.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1UpdatePlanResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_update_plan_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_update_plan_with_http_info(id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_update_plan_with_http_info(self, id : Annotated[StrictStr, Field(..., description="ID of the plan to update")], body : FrontierServiceUpdatePlanRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Update plan # noqa: E501
+
+ Update a plan by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_update_plan_with_http_info(id, body, async_req=True)
+ >>> result = thread.get()
:param id: ID of the plan to update (required)
:type id: str
:param body: (required)
:type body: FrontierServiceUpdatePlanRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_update_plan_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1UpdatePlanResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdatePlanResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ _params = locals()
-
- @validate_call
- def frontier_service_update_plan_without_preload_content(
- self,
- id: Annotated[StrictStr, Field(description="ID of the plan to update")],
- body: FrontierServiceUpdatePlanRequest,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Update plan
-
- Update a plan by ID.
-
- :param id: ID of the plan to update (required)
- :type id: str
- :param body: (required)
- :type body: FrontierServiceUpdatePlanRequest
- :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._frontier_service_update_plan_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdatePlanResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
)
- return response_data.response
-
- def _frontier_service_update_plan_serialize(
- self,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_update_plan" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='PUT',
- resource_path='/v1beta1/billing/plans/{id}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ _response_types_map = {
+ '200': "V1beta1UpdatePlanResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
+
+ return self.api_client.call_api(
+ '/v1beta1/billing/plans/{id}', 'PUT',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
diff --git a/frontier_api/api/platform_api.py b/frontier_api/api/platform_api.py
index fba163b..016d7b8 100644
--- a/frontier_api/api/platform_api.py
+++ b/frontier_api/api/platform_api.py
@@ -13,24 +13,23 @@
""" # noqa: E501
+import re # noqa: F401
import io
import warnings
-from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
-from typing import Dict, List, Optional, Tuple, Union, Any
+from pydantic import validate_arguments, ValidationError
-try:
- from typing import Annotated
-except ImportError:
- from typing_extensions import Annotated
-
-from typing import Any, Dict, Union
+from typing import Any, Dict
from frontier_api.models.v1beta1_add_platform_user_request import V1beta1AddPlatformUserRequest
+from frontier_api.models.v1beta1_list_platform_users_response import V1beta1ListPlatformUsersResponse
from frontier_api.api_client import ApiClient
from frontier_api.api_response import ApiResponse
-from frontier_api.rest import RESTResponseType
+from frontier_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class PlatformApi:
@@ -45,295 +44,291 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client
+ @validate_arguments
+ def admin_service_add_platform_user(self, body : V1beta1AddPlatformUserRequest, **kwargs) -> object: # noqa: E501
+ """Add platform user # noqa: E501
- @validate_call
- def admin_service_add_platform_user(
- self,
- body: V1beta1AddPlatformUserRequest,
- _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:
- """Add platform user
+ Adds a user to the platform. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Adds a user to a platform.
+ >>> thread = api.admin_service_add_platform_user(body, async_req=True)
+ >>> result = thread.get()
:param body: (required)
:type body: V1beta1AddPlatformUserRequest
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_add_platform_user_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 admin_service_add_platform_user_with_http_info(
- self,
- body: V1beta1AddPlatformUserRequest,
- _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]:
- """Add platform user
-
- Adds a user to a platform.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the admin_service_add_platform_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.admin_service_add_platform_user_with_http_info(body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def admin_service_add_platform_user_with_http_info(self, body : V1beta1AddPlatformUserRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Add platform user # noqa: E501
+
+ Adds a user to the platform. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.admin_service_add_platform_user_with_http_info(body, async_req=True)
+ >>> result = thread.get()
:param body: (required)
:type body: V1beta1AddPlatformUserRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_add_platform_user_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method admin_service_add_platform_user" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # set the HTTP header `Content-Type`
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
'200': "object",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/admin/platform/users', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def admin_service_list_platform_users(self, **kwargs) -> V1beta1ListPlatformUsersResponse: # noqa: E501
+ """List platform users # noqa: E501
- @validate_call
- def admin_service_add_platform_user_without_preload_content(
- self,
- body: V1beta1AddPlatformUserRequest,
- _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:
- """Add platform user
+ Lists all the users added to the platform. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Adds a user to a platform.
+ >>> thread = api.admin_service_list_platform_users(async_req=True)
+ >>> result = thread.get()
- :param body: (required)
- :type body: V1beta1AddPlatformUserRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListPlatformUsersResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the admin_service_list_platform_users_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.admin_service_list_platform_users_with_http_info(**kwargs) # noqa: E501
+
+ @validate_arguments
+ def admin_service_list_platform_users_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
+ """List platform users # noqa: E501
+
+ Lists all the users added to the platform. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.admin_service_list_platform_users_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_add_platform_user_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListPlatformUsersResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- def _admin_service_add_platform_user_serialize(
- self,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _host = None
+ _all_params = [
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
- _collection_formats: Dict[str, str] = {
-
- }
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method admin_service_list_platform_users" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
+ _path_params = {}
+
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
-
+ _body_params = None
# 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
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/admin/platform/users',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ _response_types_map = {
+ '200': "V1beta1ListPlatformUsersResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
+
+ return self.api_client.call_api(
+ '/v1beta1/admin/platform/users', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
diff --git a/frontier_api/api/policy_api.py b/frontier_api/api/policy_api.py
index 2ea2b7a..f49746e 100644
--- a/frontier_api/api/policy_api.py
+++ b/frontier_api/api/policy_api.py
@@ -13,22 +13,16 @@
""" # noqa: E501
+import re # noqa: F401
import io
import warnings
-from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
-from typing import Dict, List, Optional, Tuple, Union, Any
+from pydantic import validate_arguments, ValidationError
-try:
- from typing import Annotated
-except ImportError:
- from typing_extensions import Annotated
-
-from pydantic import Field
from typing_extensions import Annotated
-from pydantic import StrictStr
+from pydantic import Field, StrictStr
-from typing import Any, Dict, Optional, Union
+from typing import Any, Dict, Optional
from frontier_api.models.v1beta1_create_policy_response import V1beta1CreatePolicyResponse
from frontier_api.models.v1beta1_get_policy_response import V1beta1GetPolicyResponse
@@ -38,7 +32,10 @@
from frontier_api.api_client import ApiClient
from frontier_api.api_response import ApiResponse
-from frontier_api.rest import RESTResponseType
+from frontier_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class PolicyApi:
@@ -53,884 +50,458 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client
+ @validate_arguments
+ def frontier_service_create_policy(self, body : V1beta1PolicyRequestBody, **kwargs) -> V1beta1CreatePolicyResponse: # noqa: E501
+ """Create policy # noqa: E501
- @validate_call
- def frontier_service_create_policy(
- self,
- body: V1beta1PolicyRequestBody,
- _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,
- ) -> V1beta1CreatePolicyResponse:
- """Create policy
+ Creates a policy # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Creates a policy
+ >>> thread = api.frontier_service_create_policy(body, async_req=True)
+ >>> result = thread.get()
:param body: (required)
:type body: V1beta1PolicyRequestBody
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_policy_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreatePolicyResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_policy_with_http_info(
- self,
- body: V1beta1PolicyRequestBody,
- _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[V1beta1CreatePolicyResponse]:
- """Create policy
-
- Creates a policy
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CreatePolicyResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_create_policy_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_create_policy_with_http_info(body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_create_policy_with_http_info(self, body : V1beta1PolicyRequestBody, **kwargs) -> ApiResponse: # noqa: E501
+ """Create policy # noqa: E501
+
+ Creates a policy # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_create_policy_with_http_info(body, async_req=True)
+ >>> result = thread.get()
:param body: (required)
:type body: V1beta1PolicyRequestBody
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_policy_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreatePolicyResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CreatePolicyResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_create_policy_without_preload_content(
- self,
- body: V1beta1PolicyRequestBody,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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 policy
-
- Creates a policy
-
- :param body: (required)
- :type body: V1beta1PolicyRequestBody
- :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._frontier_service_create_policy_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreatePolicyResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
)
- return response_data.response
-
-
- def _frontier_service_create_policy_serialize(
- self,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
- _host = None
-
- _collection_formats: Dict[str, str] = {
-
- }
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_create_policy" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
+ _path_params = {}
+
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1CreatePolicyResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/policies',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/policies', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_delete_policy(self, id : StrictStr, **kwargs) -> object: # noqa: E501
+ """Delete Policy # noqa: E501
+ Delete a policy all of its relations permanently. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
-
- @validate_call
- def frontier_service_delete_policy(
- self,
- id: StrictStr,
- _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:
- """Delete Policy
-
- Delete a policy all of its relations permanently.
+ >>> thread = api.frontier_service_delete_policy(id, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_delete_policy_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_delete_policy_with_http_info(
- self,
- id: StrictStr,
- _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]:
- """Delete Policy
-
- Delete a policy all of its relations permanently.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_delete_policy_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_delete_policy_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_delete_policy_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """Delete Policy # noqa: E501
+
+ Delete a policy all of its relations permanently. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_delete_policy_with_http_info(id, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_delete_policy_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ _params = locals()
-
- @validate_call
- def frontier_service_delete_policy_without_preload_content(
- self,
- id: StrictStr,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Delete Policy
-
- Delete a policy all of its relations permanently.
-
- :param id: (required)
- :type id: str
- :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._frontier_service_delete_policy_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
)
- return response_data.response
-
- def _frontier_service_delete_policy_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_delete_policy" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "object",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='DELETE',
- resource_path='/v1beta1/policies/{id}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/policies/{id}', 'DELETE',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_get_policy(self, id : StrictStr, **kwargs) -> V1beta1GetPolicyResponse: # noqa: E501
+ """Get policy # noqa: E501
+ Returns a policy by ID # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_get_policy(
- self,
- id: StrictStr,
- _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,
- ) -> V1beta1GetPolicyResponse:
- """Get policy
-
- Returns a policy by ID
+ >>> thread = api.frontier_service_get_policy(id, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_get_policy_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetPolicyResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_policy_with_http_info(
- self,
- id: StrictStr,
- _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[V1beta1GetPolicyResponse]:
- """Get policy
-
- Returns a policy by ID
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1GetPolicyResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_get_policy_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_get_policy_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_get_policy_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """Get policy # noqa: E501
+
+ Returns a policy by ID # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_get_policy_with_http_info(id, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_get_policy_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1GetPolicyResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetPolicyResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ _params = locals()
-
- @validate_call
- def frontier_service_get_policy_without_preload_content(
- self,
- id: StrictStr,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Get policy
-
- Returns a policy by ID
-
- :param id: (required)
- :type id: str
- :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._frontier_service_get_policy_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetPolicyResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_get_policy_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_get_policy" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1GetPolicyResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/policies/{id}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/policies/{id}', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_policies(self, org_id : Annotated[Optional[StrictStr], Field(description="The organization id to filter by.")] = None, project_id : Annotated[Optional[StrictStr], Field(description="The project id to filter by.")] = None, user_id : Annotated[Optional[StrictStr], Field(description="The user id to filter by.")] = None, role_id : Annotated[Optional[StrictStr], Field(description="The role id to filter by.")] = None, group_id : Annotated[Optional[StrictStr], Field(description="The group id to filter by.")] = None, **kwargs) -> V1beta1ListPoliciesResponse: # noqa: E501
+ """List all policies # noqa: E501
- @validate_call
- def frontier_service_list_policies(
- self,
- org_id: Annotated[Optional[StrictStr], Field(description="The organization id to filter by.")] = None,
- project_id: Annotated[Optional[StrictStr], Field(description="The project id to filter by.")] = None,
- user_id: Annotated[Optional[StrictStr], Field(description="The user id to filter by.")] = None,
- role_id: Annotated[Optional[StrictStr], Field(description="The role id to filter by.")] = None,
- group_id: Annotated[Optional[StrictStr], Field(description="The group id to filter by.")] = None,
- _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,
- ) -> V1beta1ListPoliciesResponse:
- """List all policies
+ Lists all the policies from all the organizations in a Frontier instance. It can be filtered by organization, project, user, role and group. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Lists all the policies from all the organizations in a Frontier instance. It can be filtered by organization, project, user, role and group.
+ >>> thread = api.frontier_service_list_policies(org_id, project_id, user_id, role_id, group_id, async_req=True)
+ >>> result = thread.get()
:param org_id: The organization id to filter by.
:type org_id: str
@@ -942,85 +513,33 @@ def frontier_service_list_policies(
:type role_id: str
:param group_id: The group id to filter by.
:type group_id: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_policies_serialize(
- org_id=org_id,
- project_id=project_id,
- user_id=user_id,
- role_id=role_id,
- group_id=group_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListPoliciesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_policies_with_http_info(
- self,
- org_id: Annotated[Optional[StrictStr], Field(description="The organization id to filter by.")] = None,
- project_id: Annotated[Optional[StrictStr], Field(description="The project id to filter by.")] = None,
- user_id: Annotated[Optional[StrictStr], Field(description="The user id to filter by.")] = None,
- role_id: Annotated[Optional[StrictStr], Field(description="The role id to filter by.")] = None,
- group_id: Annotated[Optional[StrictStr], Field(description="The group id to filter by.")] = None,
- _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[V1beta1ListPoliciesResponse]:
- """List all policies
-
- Lists all the policies from all the organizations in a Frontier instance. It can be filtered by organization, project, user, role and group.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListPoliciesResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_policies_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_policies_with_http_info(org_id, project_id, user_id, role_id, group_id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_policies_with_http_info(self, org_id : Annotated[Optional[StrictStr], Field(description="The organization id to filter by.")] = None, project_id : Annotated[Optional[StrictStr], Field(description="The project id to filter by.")] = None, user_id : Annotated[Optional[StrictStr], Field(description="The user id to filter by.")] = None, role_id : Annotated[Optional[StrictStr], Field(description="The role id to filter by.")] = None, group_id : Annotated[Optional[StrictStr], Field(description="The group id to filter by.")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """List all policies # noqa: E501
+
+ Lists all the policies from all the organizations in a Frontier instance. It can be filtered by organization, project, user, role and group. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_policies_with_http_info(org_id, project_id, user_id, role_id, group_id, async_req=True)
+ >>> result = thread.get()
:param org_id: The organization id to filter by.
:type org_id: str
@@ -1032,534 +551,280 @@ def frontier_service_list_policies_with_http_info(
:type role_id: str
:param group_id: The group id to filter by.
:type group_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_policies_serialize(
- org_id=org_id,
- project_id=project_id,
- user_id=user_id,
- role_id=role_id,
- group_id=group_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListPoliciesResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'org_id',
+ 'project_id',
+ 'user_id',
+ 'role_id',
+ 'group_id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListPoliciesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_policies" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+ _collection_formats = {}
- @validate_call
- def frontier_service_list_policies_without_preload_content(
- self,
- org_id: Annotated[Optional[StrictStr], Field(description="The organization id to filter by.")] = None,
- project_id: Annotated[Optional[StrictStr], Field(description="The project id to filter by.")] = None,
- user_id: Annotated[Optional[StrictStr], Field(description="The user id to filter by.")] = None,
- role_id: Annotated[Optional[StrictStr], Field(description="The role id to filter by.")] = None,
- group_id: Annotated[Optional[StrictStr], Field(description="The group id to filter by.")] = None,
- _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:
- """List all policies
+ # process the path parameters
+ _path_params = {}
- Lists all the policies from all the organizations in a Frontier instance. It can be filtered by organization, project, user, role and group.
+ # process the query parameters
+ _query_params = []
+ if _params.get('org_id') is not None: # noqa: E501
+ _query_params.append(('orgId', _params['org_id']))
- :param org_id: The organization id to filter by.
- :type org_id: str
- :param project_id: The project id to filter by.
- :type project_id: str
- :param user_id: The user id to filter by.
- :type user_id: str
- :param role_id: The role id to filter by.
- :type role_id: str
- :param group_id: The group id to filter by.
- :type group_id: str
- :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._frontier_service_list_policies_serialize(
- org_id=org_id,
- project_id=project_id,
- user_id=user_id,
- role_id=role_id,
- group_id=group_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ if _params.get('project_id') is not None: # noqa: E501
+ _query_params.append(('projectId', _params['project_id']))
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListPoliciesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_list_policies_serialize(
- self,
- org_id,
- project_id,
- user_id,
- role_id,
- group_id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _host = None
-
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params.get('user_id') is not None: # noqa: E501
+ _query_params.append(('userId', _params['user_id']))
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ if _params.get('role_id') is not None: # noqa: E501
+ _query_params.append(('roleId', _params['role_id']))
+
+ if _params.get('group_id') is not None: # noqa: E501
+ _query_params.append(('groupId', _params['group_id']))
- # process the path parameters
- # process the query parameters
- if org_id is not None:
-
- _query_params.append(('orgId', org_id))
-
- if project_id is not None:
-
- _query_params.append(('projectId', project_id))
-
- if user_id is not None:
-
- _query_params.append(('userId', user_id))
-
- if role_id is not None:
-
- _query_params.append(('roleId', role_id))
-
- if group_id is not None:
-
- _query_params.append(('groupId', group_id))
-
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/policies',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ _response_types_map = {
+ '200': "V1beta1ListPoliciesResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
+
+ return self.api_client.call_api(
+ '/v1beta1/policies', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_update_policy(self, id : StrictStr, body : V1beta1PolicyRequestBody, **kwargs) -> V1beta1UpdatePolicyResponse: # noqa: E501
+ """Update policy # noqa: E501
+ Updates a policy by ID # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
-
- @validate_call
- def frontier_service_update_policy(
- self,
- id: StrictStr,
- body: V1beta1PolicyRequestBody,
- _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,
- ) -> V1beta1UpdatePolicyResponse:
- """Update policy
-
- Updates a policy by ID
+ >>> thread = api.frontier_service_update_policy(id, body, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
:param body: (required)
:type body: V1beta1PolicyRequestBody
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_update_policy_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdatePolicyResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_update_policy_with_http_info(
- self,
- id: StrictStr,
- body: V1beta1PolicyRequestBody,
- _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[V1beta1UpdatePolicyResponse]:
- """Update policy
-
- Updates a policy by ID
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1UpdatePolicyResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_update_policy_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_update_policy_with_http_info(id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_update_policy_with_http_info(self, id : StrictStr, body : V1beta1PolicyRequestBody, **kwargs) -> ApiResponse: # noqa: E501
+ """Update policy # noqa: E501
+
+ Updates a policy by ID # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_update_policy_with_http_info(id, body, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
:param body: (required)
:type body: V1beta1PolicyRequestBody
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_update_policy_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdatePolicyResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1UpdatePolicyResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_update_policy_without_preload_content(
- self,
- id: StrictStr,
- body: V1beta1PolicyRequestBody,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Update policy
-
- Updates a policy by ID
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: V1beta1PolicyRequestBody
- :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._frontier_service_update_policy_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdatePolicyResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
)
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_update_policy" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_update_policy_serialize(
- self,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='PUT',
- resource_path='/v1beta1/policies/{id}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ _response_types_map = {
+ '200': "V1beta1UpdatePolicyResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
+
+ return self.api_client.call_api(
+ '/v1beta1/policies/{id}', 'PUT',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
diff --git a/frontier_api/api/preference_api.py b/frontier_api/api/preference_api.py
index 0b5cf37..3586dd1 100644
--- a/frontier_api/api/preference_api.py
+++ b/frontier_api/api/preference_api.py
@@ -13,16 +13,11 @@
""" # noqa: E501
+import re # noqa: F401
import io
import warnings
-from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
-from typing import Dict, List, Optional, Tuple, Union, Any
-
-try:
- from typing import Annotated
-except ImportError:
- from typing_extensions import Annotated
+from pydantic import validate_arguments, ValidationError
from pydantic import StrictStr
@@ -45,7 +40,10 @@
from frontier_api.api_client import ApiClient
from frontier_api.api_response import ApiResponse
-from frontier_api.rest import RESTResponseType
+from frontier_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class PreferenceApi:
@@ -60,3735 +58,1937 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client
+ @validate_arguments
+ def admin_service_create_preferences(self, body : V1beta1CreatePreferencesRequest, **kwargs) -> V1beta1CreatePreferencesResponse: # noqa: E501
+ """Create platform preferences # noqa: E501
- @validate_call
- def admin_service_create_preferences(
- self,
- body: V1beta1CreatePreferencesRequest,
- _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,
- ) -> V1beta1CreatePreferencesResponse:
- """Create platform preferences
+ Create new platform preferences. The platform preferences **name** must be unique within the platform and can contain only alphanumeric characters, dashes and underscores. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Create new platform preferences. The platform preferences **name** must be unique within the platform and can contain only alphanumeric characters, dashes and underscores.
+ >>> thread = api.admin_service_create_preferences(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1beta1CreatePreferencesRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CreatePreferencesResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the admin_service_create_preferences_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.admin_service_create_preferences_with_http_info(body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def admin_service_create_preferences_with_http_info(self, body : V1beta1CreatePreferencesRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Create platform preferences # noqa: E501
+
+ Create new platform preferences. The platform preferences **name** must be unique within the platform and can contain only alphanumeric characters, dashes and underscores. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.admin_service_create_preferences_with_http_info(body, async_req=True)
+ >>> result = thread.get()
:param body: (required)
:type body: V1beta1CreatePreferencesRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_create_preferences_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CreatePreferencesResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method admin_service_create_preferences" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # set the HTTP header `Content-Type`
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
'200': "V1beta1CreatePreferencesResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/preferences', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- ).data
-
-
- @validate_call
- def admin_service_create_preferences_with_http_info(
- self,
- body: V1beta1CreatePreferencesRequest,
- _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[V1beta1CreatePreferencesResponse]:
- """Create platform preferences
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
- Create new platform preferences. The platform preferences **name** must be unique within the platform and can contain only alphanumeric characters, dashes and underscores.
+ @validate_arguments
+ def admin_service_list_preferences(self, **kwargs) -> V1beta1ListPreferencesResponse: # noqa: E501
+ """List platform preferences # noqa: E501
- :param body: (required)
- :type body: V1beta1CreatePreferencesRequest
+ Returns a list of all preferences configured on an instance in Frontier. e.g user, project, organization etc # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.admin_service_list_preferences(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListPreferencesResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the admin_service_list_preferences_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.admin_service_list_preferences_with_http_info(**kwargs) # noqa: E501
+
+ @validate_arguments
+ def admin_service_list_preferences_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
+ """List platform preferences # noqa: E501
+
+ Returns a list of all preferences configured on an instance in Frontier. e.g user, project, organization etc # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.admin_service_list_preferences_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_create_preferences_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListPreferencesResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreatePreferencesResponse",
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method admin_service_list_preferences" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListPreferencesResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/preferences', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_create_current_user_preferences(self, body : V1beta1CreateCurrentUserPreferencesRequest, **kwargs) -> V1beta1CreateCurrentUserPreferencesResponse: # noqa: E501
+ """Create current user preferences # noqa: E501
- @validate_call
- def admin_service_create_preferences_without_preload_content(
- self,
- body: V1beta1CreatePreferencesRequest,
- _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 platform preferences
+ Create a new user preferences. The user preferences **name** must be unique within the user and can contain only alphanumeric characters, dashes and underscores. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Create new platform preferences. The platform preferences **name** must be unique within the platform and can contain only alphanumeric characters, dashes and underscores.
+ >>> thread = api.frontier_service_create_current_user_preferences(body, async_req=True)
+ >>> result = thread.get()
:param body: (required)
- :type body: V1beta1CreatePreferencesRequest
+ :type body: V1beta1CreateCurrentUserPreferencesRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CreateCurrentUserPreferencesResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_create_current_user_preferences_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_create_current_user_preferences_with_http_info(body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_create_current_user_preferences_with_http_info(self, body : V1beta1CreateCurrentUserPreferencesRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Create current user preferences # noqa: E501
+
+ Create a new user preferences. The user preferences **name** must be unique within the user and can contain only alphanumeric characters, dashes and underscores. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_create_current_user_preferences_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1beta1CreateCurrentUserPreferencesRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_create_preferences_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreatePreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CreateCurrentUserPreferencesResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- def _admin_service_create_preferences_serialize(
- self,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _params = locals()
- _host = None
+ _all_params = [
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
- _collection_formats: Dict[str, str] = {
-
- }
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_create_current_user_preferences" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
+ _path_params = {}
+
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1CreateCurrentUserPreferencesResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/preferences',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/users/self/preferences', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_create_group_preferences(self, id : StrictStr, body : FrontierServiceCreateGroupPreferencesRequest, **kwargs) -> V1beta1CreateGroupPreferencesResponse: # noqa: E501
+ """Create group preferences # noqa: E501
+ Create a new group preferences. The group preferences **name** must be unique within the group and can contain only alphanumeric characters, dashes and underscores. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def admin_service_list_preferences(
- self,
- _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,
- ) -> V1beta1ListPreferencesResponse:
- """List platform preferences
+ >>> thread = api.frontier_service_create_group_preferences(id, body, async_req=True)
+ >>> result = thread.get()
- Returns a list of all preferences configured on an instance in Frontier. e.g user, project, organization etc
+ :param id: (required)
+ :type id: str
+ :param body: (required)
+ :type body: FrontierServiceCreateGroupPreferencesRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CreateGroupPreferencesResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_create_group_preferences_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_create_group_preferences_with_http_info(id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_create_group_preferences_with_http_info(self, id : StrictStr, body : FrontierServiceCreateGroupPreferencesRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Create group preferences # noqa: E501
+
+ Create a new group preferences. The group preferences **name** must be unique within the group and can contain only alphanumeric characters, dashes and underscores. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_create_group_preferences_with_http_info(id, body, async_req=True)
+ >>> result = thread.get()
+ :param id: (required)
+ :type id: str
+ :param body: (required)
+ :type body: FrontierServiceCreateGroupPreferencesRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CreateGroupPreferencesResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _param = self._admin_service_list_preferences_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ _params = locals()
+
+ _all_params = [
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListPreferencesResponse",
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_create_group_preferences" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
+
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # set the HTTP header `Content-Type`
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1CreateGroupPreferencesResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/groups/{id}/preferences', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- ).data
-
-
- @validate_call
- def admin_service_list_preferences_with_http_info(
- self,
- _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[V1beta1ListPreferencesResponse]:
- """List platform preferences
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+
+ @validate_arguments
+ def frontier_service_create_organization_preferences(self, id : StrictStr, body : FrontierServiceCreateGroupPreferencesRequest, **kwargs) -> V1beta1CreateOrganizationPreferencesResponse: # noqa: E501
+ """Create organization preferences # noqa: E501
+
+ Create a new organization preferences. The organization preferences **name** must be unique within the organization and can contain only alphanumeric characters, dashes and underscores. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Returns a list of all preferences configured on an instance in Frontier. e.g user, project, organization etc
+ >>> thread = api.frontier_service_create_organization_preferences(id, body, async_req=True)
+ >>> result = thread.get()
+
+ :param id: (required)
+ :type id: str
+ :param body: (required)
+ :type body: FrontierServiceCreateGroupPreferencesRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CreateOrganizationPreferencesResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_create_organization_preferences_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_create_organization_preferences_with_http_info(id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_create_organization_preferences_with_http_info(self, id : StrictStr, body : FrontierServiceCreateGroupPreferencesRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Create organization preferences # noqa: E501
+
+ Create a new organization preferences. The organization preferences **name** must be unique within the organization and can contain only alphanumeric characters, dashes and underscores. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_create_organization_preferences_with_http_info(id, body, async_req=True)
+ >>> result = thread.get()
+ :param id: (required)
+ :type id: str
+ :param body: (required)
+ :type body: FrontierServiceCreateGroupPreferencesRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CreateOrganizationPreferencesResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _param = self._admin_service_list_preferences_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ _params = locals()
+
+ _all_params = [
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListPreferencesResponse",
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_create_organization_preferences" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
+
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # set the HTTP header `Content-Type`
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1CreateOrganizationPreferencesResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{id}/preferences', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_create_project_preferences(self, id : StrictStr, body : FrontierServiceCreateGroupPreferencesRequest, **kwargs) -> V1beta1CreateProjectPreferencesResponse: # noqa: E501
+ """Create project preferences # noqa: E501
- @validate_call
- def admin_service_list_preferences_without_preload_content(
- self,
- _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:
- """List platform preferences
+ Create a new project preferences. The project preferences **name** must be unique within the project and can contain only alphanumeric characters, dashes and underscores. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_create_project_preferences(id, body, async_req=True)
+ >>> result = thread.get()
- Returns a list of all preferences configured on an instance in Frontier. e.g user, project, organization etc
+ :param id: (required)
+ :type id: str
+ :param body: (required)
+ :type body: FrontierServiceCreateGroupPreferencesRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CreateProjectPreferencesResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_create_project_preferences_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_create_project_preferences_with_http_info(id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_create_project_preferences_with_http_info(self, id : StrictStr, body : FrontierServiceCreateGroupPreferencesRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Create project preferences # noqa: E501
+
+ Create a new project preferences. The project preferences **name** must be unique within the project and can contain only alphanumeric characters, dashes and underscores. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_create_project_preferences_with_http_info(id, body, async_req=True)
+ >>> result = thread.get()
+ :param id: (required)
+ :type id: str
+ :param body: (required)
+ :type body: FrontierServiceCreateGroupPreferencesRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CreateProjectPreferencesResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _param = self._admin_service_list_preferences_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ _params = locals()
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListPreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
+ _all_params = [
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_create_project_preferences" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _admin_service_list_preferences_serialize(
- self,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
+ # set the HTTP header `Content-Type`
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1CreateProjectPreferencesResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/preferences',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/projects/{id}/preferences', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_create_user_preferences(self, id : StrictStr, body : FrontierServiceCreateGroupPreferencesRequest, **kwargs) -> V1beta1CreateUserPreferencesResponse: # noqa: E501
+ """Create user preferences # noqa: E501
+ Create a new user preferences. The user preferences **name** must be unique within the user and can contain only alphanumeric characters, dashes and underscores. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_create_current_user_preferences(
- self,
- body: V1beta1CreateCurrentUserPreferencesRequest,
- _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,
- ) -> V1beta1CreateCurrentUserPreferencesResponse:
- """Create current user preferences
+ >>> thread = api.frontier_service_create_user_preferences(id, body, async_req=True)
+ >>> result = thread.get()
- Create a new user preferences. The user preferences **name** must be unique within the user and can contain only alphanumeric characters, dashes and underscores.
+ :param id: (required)
+ :type id: str
+ :param body: (required)
+ :type body: FrontierServiceCreateGroupPreferencesRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CreateUserPreferencesResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_create_user_preferences_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_create_user_preferences_with_http_info(id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_create_user_preferences_with_http_info(self, id : StrictStr, body : FrontierServiceCreateGroupPreferencesRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Create user preferences # noqa: E501
+
+ Create a new user preferences. The user preferences **name** must be unique within the user and can contain only alphanumeric characters, dashes and underscores. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_create_user_preferences_with_http_info(id, body, async_req=True)
+ >>> result = thread.get()
+ :param id: (required)
+ :type id: str
:param body: (required)
- :type body: V1beta1CreateCurrentUserPreferencesRequest
+ :type body: FrontierServiceCreateGroupPreferencesRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_current_user_preferences_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CreateUserPreferencesResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateCurrentUserPreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_current_user_preferences_with_http_info(
- self,
- body: V1beta1CreateCurrentUserPreferencesRequest,
- _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[V1beta1CreateCurrentUserPreferencesResponse]:
- """Create current user preferences
-
- Create a new user preferences. The user preferences **name** must be unique within the user and can contain only alphanumeric characters, dashes and underscores.
-
- :param body: (required)
- :type body: V1beta1CreateCurrentUserPreferencesRequest
- :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._frontier_service_create_current_user_preferences_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateCurrentUserPreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_current_user_preferences_without_preload_content(
- self,
- body: V1beta1CreateCurrentUserPreferencesRequest,
- _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 current user preferences
-
- Create a new user preferences. The user preferences **name** must be unique within the user and can contain only alphanumeric characters, dashes and underscores.
-
- :param body: (required)
- :type body: V1beta1CreateCurrentUserPreferencesRequest
- :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._frontier_service_create_current_user_preferences_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateCurrentUserPreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_create_current_user_preferences_serialize(
- self,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _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 body is not None:
- _body_params = body
-
-
- # 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] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/users/self/preferences',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_create_group_preferences(
- self,
- id: StrictStr,
- body: FrontierServiceCreateGroupPreferencesRequest,
- _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,
- ) -> V1beta1CreateGroupPreferencesResponse:
- """Create group preferences
-
- Create a new group preferences. The group preferences **name** must be unique within the group and can contain only alphanumeric characters, dashes and underscores.
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: FrontierServiceCreateGroupPreferencesRequest
- :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._frontier_service_create_group_preferences_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateGroupPreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_group_preferences_with_http_info(
- self,
- id: StrictStr,
- body: FrontierServiceCreateGroupPreferencesRequest,
- _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[V1beta1CreateGroupPreferencesResponse]:
- """Create group preferences
-
- Create a new group preferences. The group preferences **name** must be unique within the group and can contain only alphanumeric characters, dashes and underscores.
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: FrontierServiceCreateGroupPreferencesRequest
- :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._frontier_service_create_group_preferences_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateGroupPreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_group_preferences_without_preload_content(
- self,
- id: StrictStr,
- body: FrontierServiceCreateGroupPreferencesRequest,
- _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 group preferences
-
- Create a new group preferences. The group preferences **name** must be unique within the group and can contain only alphanumeric characters, dashes and underscores.
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: FrontierServiceCreateGroupPreferencesRequest
- :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._frontier_service_create_group_preferences_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateGroupPreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_create_group_preferences_serialize(
- self,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
- if body is not None:
- _body_params = body
-
-
- # 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] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/groups/{id}/preferences',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_create_organization_preferences(
- self,
- id: StrictStr,
- body: FrontierServiceCreateGroupPreferencesRequest,
- _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,
- ) -> V1beta1CreateOrganizationPreferencesResponse:
- """Create organization preferences
-
- Create a new organization preferences. The organization preferences **name** must be unique within the organization and can contain only alphanumeric characters, dashes and underscores.
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: FrontierServiceCreateGroupPreferencesRequest
- :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._frontier_service_create_organization_preferences_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateOrganizationPreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_organization_preferences_with_http_info(
- self,
- id: StrictStr,
- body: FrontierServiceCreateGroupPreferencesRequest,
- _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[V1beta1CreateOrganizationPreferencesResponse]:
- """Create organization preferences
-
- Create a new organization preferences. The organization preferences **name** must be unique within the organization and can contain only alphanumeric characters, dashes and underscores.
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: FrontierServiceCreateGroupPreferencesRequest
- :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._frontier_service_create_organization_preferences_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateOrganizationPreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_organization_preferences_without_preload_content(
- self,
- id: StrictStr,
- body: FrontierServiceCreateGroupPreferencesRequest,
- _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 organization preferences
-
- Create a new organization preferences. The organization preferences **name** must be unique within the organization and can contain only alphanumeric characters, dashes and underscores.
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: FrontierServiceCreateGroupPreferencesRequest
- :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._frontier_service_create_organization_preferences_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateOrganizationPreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_create_organization_preferences_serialize(
- self,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
- if body is not None:
- _body_params = body
-
-
- # 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] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/organizations/{id}/preferences',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_create_project_preferences(
- self,
- id: StrictStr,
- body: FrontierServiceCreateGroupPreferencesRequest,
- _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,
- ) -> V1beta1CreateProjectPreferencesResponse:
- """Create project preferences
-
- Create a new project preferences. The project preferences **name** must be unique within the project and can contain only alphanumeric characters, dashes and underscores.
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: FrontierServiceCreateGroupPreferencesRequest
- :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._frontier_service_create_project_preferences_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateProjectPreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_project_preferences_with_http_info(
- self,
- id: StrictStr,
- body: FrontierServiceCreateGroupPreferencesRequest,
- _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[V1beta1CreateProjectPreferencesResponse]:
- """Create project preferences
-
- Create a new project preferences. The project preferences **name** must be unique within the project and can contain only alphanumeric characters, dashes and underscores.
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: FrontierServiceCreateGroupPreferencesRequest
- :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._frontier_service_create_project_preferences_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateProjectPreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_project_preferences_without_preload_content(
- self,
- id: StrictStr,
- body: FrontierServiceCreateGroupPreferencesRequest,
- _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 project preferences
-
- Create a new project preferences. The project preferences **name** must be unique within the project and can contain only alphanumeric characters, dashes and underscores.
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: FrontierServiceCreateGroupPreferencesRequest
- :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._frontier_service_create_project_preferences_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateProjectPreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_create_project_preferences_serialize(
- self,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
- if body is not None:
- _body_params = body
-
-
- # 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] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/projects/{id}/preferences',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_create_user_preferences(
- self,
- id: StrictStr,
- body: FrontierServiceCreateGroupPreferencesRequest,
- _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,
- ) -> V1beta1CreateUserPreferencesResponse:
- """Create user preferences
-
- Create a new user preferences. The user preferences **name** must be unique within the user and can contain only alphanumeric characters, dashes and underscores.
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: FrontierServiceCreateGroupPreferencesRequest
- :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._frontier_service_create_user_preferences_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateUserPreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_user_preferences_with_http_info(
- self,
- id: StrictStr,
- body: FrontierServiceCreateGroupPreferencesRequest,
- _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[V1beta1CreateUserPreferencesResponse]:
- """Create user preferences
-
- Create a new user preferences. The user preferences **name** must be unique within the user and can contain only alphanumeric characters, dashes and underscores.
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: FrontierServiceCreateGroupPreferencesRequest
- :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._frontier_service_create_user_preferences_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateUserPreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_user_preferences_without_preload_content(
- self,
- id: StrictStr,
- body: FrontierServiceCreateGroupPreferencesRequest,
- _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 user preferences
-
- Create a new user preferences. The user preferences **name** must be unique within the user and can contain only alphanumeric characters, dashes and underscores.
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: FrontierServiceCreateGroupPreferencesRequest
- :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._frontier_service_create_user_preferences_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateUserPreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_create_user_preferences_serialize(
- self,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
- if body is not None:
- _body_params = body
-
-
- # 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] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/users/{id}/preferences',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_describe_preferences(
- self,
- _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,
- ) -> V1beta1DescribePreferencesResponse:
- """Describe preferences
-
- Returns a list of all preferences supported by Frontier.
-
- :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._frontier_service_describe_preferences_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1DescribePreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_describe_preferences_with_http_info(
- self,
- _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[V1beta1DescribePreferencesResponse]:
- """Describe preferences
-
- Returns a list of all preferences supported by Frontier.
-
- :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._frontier_service_describe_preferences_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1DescribePreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_describe_preferences_without_preload_content(
- self,
- _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:
- """Describe preferences
-
- Returns a list of all preferences supported by Frontier.
-
- :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._frontier_service_describe_preferences_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1DescribePreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_describe_preferences_serialize(
- self,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _params = locals()
- # process the path parameters
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
+ _all_params = [
+ 'id',
+ 'body'
]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/preferences/traits',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_list_current_user_preferences(
- self,
- _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,
- ) -> V1beta1ListCurrentUserPreferencesResponse:
- """List current user preferences
-
- List a user preferences by ID.
-
- :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._frontier_service_list_current_user_preferences_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListCurrentUserPreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_current_user_preferences_with_http_info(
- self,
- _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[V1beta1ListCurrentUserPreferencesResponse]:
- """List current user preferences
-
- List a user preferences by ID.
-
- :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._frontier_service_list_current_user_preferences_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListCurrentUserPreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_current_user_preferences_without_preload_content(
- self,
- _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:
- """List current user preferences
-
- List a user preferences by ID.
-
- :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._frontier_service_list_current_user_preferences_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListCurrentUserPreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_list_current_user_preferences_serialize(
- self,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _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
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
+ _all_params.extend(
[
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/users/self/preferences',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_list_group_preferences(
- self,
- id: StrictStr,
- _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,
- ) -> V1beta1ListGroupPreferencesResponse:
- """List group preferences
-
- List a group preferences by ID.
-
- :param id: (required)
- :type id: str
- :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._frontier_service_list_group_preferences_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListGroupPreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_group_preferences_with_http_info(
- self,
- id: StrictStr,
- _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[V1beta1ListGroupPreferencesResponse]:
- """List group preferences
-
- List a group preferences by ID.
-
- :param id: (required)
- :type id: str
- :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._frontier_service_list_group_preferences_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListGroupPreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_group_preferences_without_preload_content(
- self,
- id: StrictStr,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """List group preferences
-
- List a group preferences by ID.
-
- :param id: (required)
- :type id: str
- :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._frontier_service_list_group_preferences_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListGroupPreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
)
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_create_user_preferences" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_list_group_preferences_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/groups/{id}/preferences',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_list_organization_preferences(
- self,
- id: StrictStr,
- _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,
- ) -> V1beta1ListOrganizationPreferencesResponse:
- """List organization preferences
-
- List an organization preferences by ID.
-
- :param id: (required)
- :type id: str
- :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._frontier_service_list_organization_preferences_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationPreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_organization_preferences_with_http_info(
- self,
- id: StrictStr,
- _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[V1beta1ListOrganizationPreferencesResponse]:
- """List organization preferences
-
- List an organization preferences by ID.
-
- :param id: (required)
- :type id: str
- :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._frontier_service_list_organization_preferences_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ ['application/json']) # noqa: E501
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationPreferencesResponse",
+ # set the HTTP header `Content-Type`
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1CreateUserPreferencesResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/users/{id}/preferences', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_describe_preferences(self, **kwargs) -> V1beta1DescribePreferencesResponse: # noqa: E501
+ """Describe preferences # noqa: E501
- @validate_call
- def frontier_service_list_organization_preferences_without_preload_content(
- self,
- id: StrictStr,
- _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:
- """List organization preferences
+ Returns a list of all preferences supported by Frontier. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- List an organization preferences by ID.
+ >>> thread = api.frontier_service_describe_preferences(async_req=True)
+ >>> result = thread.get()
- :param id: (required)
- :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1DescribePreferencesResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_describe_preferences_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_describe_preferences_with_http_info(**kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_describe_preferences_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
+ """Describe preferences # noqa: E501
+
+ Returns a list of all preferences supported by Frontier. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_describe_preferences_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_organization_preferences_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationPreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1DescribePreferencesResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- def _frontier_service_list_organization_preferences_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _host = None
+ _all_params = [
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
- _collection_formats: Dict[str, str] = {
-
- }
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_describe_preferences" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
- if id is not None:
- _path_params['id'] = id
+ _path_params = {}
+
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1DescribePreferencesResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/organizations/{id}/preferences',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/preferences/traits', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_current_user_preferences(self, **kwargs) -> V1beta1ListCurrentUserPreferencesResponse: # noqa: E501
+ """List current user preferences # noqa: E501
+ List a user preferences by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_list_project_preferences(
- self,
- id: StrictStr,
- _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,
- ) -> V1beta1ListProjectPreferencesResponse:
- """List project preferences
-
- List a project preferences by ID.
+ >>> thread = api.frontier_service_list_current_user_preferences(async_req=True)
+ >>> result = thread.get()
- :param id: (required)
- :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListCurrentUserPreferencesResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_current_user_preferences_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_current_user_preferences_with_http_info(**kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_current_user_preferences_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
+ """List current user preferences # noqa: E501
+
+ List a user preferences by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_current_user_preferences_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_project_preferences_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListCurrentUserPreferencesResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListProjectPreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_project_preferences_with_http_info(
- self,
- id: StrictStr,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _params = locals()
+
+ _all_params = [
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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[V1beta1ListProjectPreferencesResponse]:
- """List project preferences
+ )
- List a project preferences by ID.
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_current_user_preferences" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- :param id: (required)
- :type id: str
- :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._frontier_service_list_project_preferences_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ _collection_formats = {}
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListProjectPreferencesResponse",
+ # process the path parameters
+ _path_params = {}
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListCurrentUserPreferencesResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/users/self/preferences', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_group_preferences(self, id : StrictStr, **kwargs) -> V1beta1ListGroupPreferencesResponse: # noqa: E501
+ """List group preferences # noqa: E501
- @validate_call
- def frontier_service_list_project_preferences_without_preload_content(
- self,
- id: StrictStr,
- _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:
- """List project preferences
+ List a group preferences by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- List a project preferences by ID.
+ >>> thread = api.frontier_service_list_group_preferences(id, async_req=True)
+ >>> result = thread.get()
+
+ :param id: (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListGroupPreferencesResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_group_preferences_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_group_preferences_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_group_preferences_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """List group preferences # noqa: E501
+
+ List a group preferences by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_group_preferences_with_http_info(id, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_project_preferences_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListGroupPreferencesResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListProjectPreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ _params = locals()
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
- def _frontier_service_list_project_preferences_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_group_preferences" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListGroupPreferencesResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/projects/{id}/preferences',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/groups/{id}/preferences', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_organization_preferences(self, id : StrictStr, **kwargs) -> V1beta1ListOrganizationPreferencesResponse: # noqa: E501
+ """List organization preferences # noqa: E501
+ List an organization preferences by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.frontier_service_list_organization_preferences(id, async_req=True)
+ >>> result = thread.get()
- @validate_call
- def frontier_service_list_user_preferences(
- self,
- id: StrictStr,
- _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,
- ) -> V1beta1ListUserPreferencesResponse:
- """List user preferences
-
- List a user preferences by ID.
+ :param id: (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListOrganizationPreferencesResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_organization_preferences_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_organization_preferences_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_organization_preferences_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """List organization preferences # noqa: E501
+
+ List an organization preferences by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_organization_preferences_with_http_info(id, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_user_preferences_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListOrganizationPreferencesResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListUserPreferencesResponse",
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_organization_preferences" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
+
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListOrganizationPreferencesResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{id}/preferences', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- ).data
-
-
- @validate_call
- def frontier_service_list_user_preferences_with_http_info(
- self,
- id: StrictStr,
- _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[V1beta1ListUserPreferencesResponse]:
- """List user preferences
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+
+ @validate_arguments
+ def frontier_service_list_project_preferences(self, id : StrictStr, **kwargs) -> V1beta1ListProjectPreferencesResponse: # noqa: E501
+ """List project preferences # noqa: E501
- List a user preferences by ID.
+ List a project preferences by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_project_preferences(id, async_req=True)
+ >>> result = thread.get()
+
+ :param id: (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListProjectPreferencesResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_project_preferences_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_project_preferences_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_project_preferences_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """List project preferences # noqa: E501
+
+ List a project preferences by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_project_preferences_with_http_info(id, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_user_preferences_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListProjectPreferencesResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListUserPreferencesResponse",
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_project_preferences" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
+
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListProjectPreferencesResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/projects/{id}/preferences', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_user_preferences(self, id : StrictStr, **kwargs) -> V1beta1ListUserPreferencesResponse: # noqa: E501
+ """List user preferences # noqa: E501
- @validate_call
- def frontier_service_list_user_preferences_without_preload_content(
- self,
- id: StrictStr,
- _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:
- """List user preferences
+ List a user preferences by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- List a user preferences by ID.
+ >>> thread = api.frontier_service_list_user_preferences(id, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListUserPreferencesResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_user_preferences_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_user_preferences_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_user_preferences_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """List user preferences # noqa: E501
+
+ List a user preferences by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_user_preferences_with_http_info(id, async_req=True)
+ >>> result = thread.get()
+
+ :param id: (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_user_preferences_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListUserPreferencesResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListUserPreferencesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ _params = locals()
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
- def _frontier_service_list_user_preferences_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_user_preferences" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListUserPreferencesResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/users/{id}/preferences',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/users/{id}/preferences', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
diff --git a/frontier_api/api/project_api.py b/frontier_api/api/project_api.py
index ff87c1e..60279ac 100644
--- a/frontier_api/api/project_api.py
+++ b/frontier_api/api/project_api.py
@@ -13,22 +13,16 @@
""" # noqa: E501
+import re # noqa: F401
import io
import warnings
-from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
-from typing import Dict, List, Optional, Tuple, Union, Any
+from pydantic import validate_arguments, ValidationError
-try:
- from typing import Annotated
-except ImportError:
- from typing_extensions import Annotated
-
-from pydantic import Field
from typing_extensions import Annotated
-from pydantic import StrictBool, StrictStr
+from pydantic import Field, StrictBool, StrictStr
-from typing import Any, Dict, Optional, Union
+from typing import Any, Dict, Optional
from frontier_api.models.v1beta1_create_project_response import V1beta1CreateProjectResponse
from frontier_api.models.v1beta1_get_project_response import V1beta1GetProjectResponse
@@ -42,7 +36,10 @@
from frontier_api.api_client import ApiClient
from frontier_api.api_response import ApiResponse
-from frontier_api.rest import RESTResponseType
+from frontier_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class ProjectApi:
@@ -57,3257 +54,1683 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client
+ @validate_arguments
+ def admin_service_list_projects(self, org_id : Annotated[Optional[StrictStr], Field(description="The organization id to filter by.")] = None, state : Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None, **kwargs) -> V1beta1ListProjectsResponse: # noqa: E501
+ """List all projects # noqa: E501
- @validate_call
- def admin_service_list_projects(
- self,
- org_id: Annotated[Optional[StrictStr], Field(description="The organization id to filter by.")] = None,
- state: Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None,
- _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,
- ) -> V1beta1ListProjectsResponse:
- """List all projects
+ Lists all the projects from all the organizations in a Frontier instance. It can be filtered by organization and state. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Lists all the projects from all the organizations in a Frontier instance. It can be filtered by organization and state.
+ >>> thread = api.admin_service_list_projects(org_id, state, async_req=True)
+ >>> result = thread.get()
:param org_id: The organization id to filter by.
:type org_id: str
:param state: The state to filter by. It can be enabled or disabled.
:type state: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_list_projects_serialize(
- org_id=org_id,
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListProjectsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 admin_service_list_projects_with_http_info(
- self,
- org_id: Annotated[Optional[StrictStr], Field(description="The organization id to filter by.")] = None,
- state: Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None,
- _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[V1beta1ListProjectsResponse]:
- """List all projects
-
- Lists all the projects from all the organizations in a Frontier instance. It can be filtered by organization and state.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListProjectsResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the admin_service_list_projects_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.admin_service_list_projects_with_http_info(org_id, state, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def admin_service_list_projects_with_http_info(self, org_id : Annotated[Optional[StrictStr], Field(description="The organization id to filter by.")] = None, state : Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """List all projects # noqa: E501
+
+ Lists all the projects from all the organizations in a Frontier instance. It can be filtered by organization and state. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.admin_service_list_projects_with_http_info(org_id, state, async_req=True)
+ >>> result = thread.get()
:param org_id: The organization id to filter by.
:type org_id: str
:param state: The state to filter by. It can be enabled or disabled.
:type state: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_list_projects_serialize(
- org_id=org_id,
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListProjectsResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'org_id',
+ 'state'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method admin_service_list_projects" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+
+ # process the query parameters
+ _query_params = []
+ if _params.get('org_id') is not None: # noqa: E501
+ _query_params.append(('orgId', _params['org_id']))
+
+ if _params.get('state') is not None: # noqa: E501
+ _query_params.append(('state', _params['state']))
+
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
'200': "V1beta1ListProjectsResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/admin/projects', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_create_project(self, body : V1beta1ProjectRequestBody, **kwargs) -> V1beta1CreateProjectResponse: # noqa: E501
+ """Create project # noqa: E501
- @validate_call
- def admin_service_list_projects_without_preload_content(
- self,
- org_id: Annotated[Optional[StrictStr], Field(description="The organization id to filter by.")] = None,
- state: Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None,
- _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:
- """List all projects
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Lists all the projects from all the organizations in a Frontier instance. It can be filtered by organization and state.
+ >>> thread = api.frontier_service_create_project(body, async_req=True)
+ >>> result = thread.get()
- :param org_id: The organization id to filter by.
- :type org_id: str
- :param state: The state to filter by. It can be enabled or disabled.
- :type state: str
+ :param body: (required)
+ :type body: V1beta1ProjectRequestBody
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CreateProjectResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_create_project_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_create_project_with_http_info(body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_create_project_with_http_info(self, body : V1beta1ProjectRequestBody, **kwargs) -> ApiResponse: # noqa: E501
+ """Create project # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_create_project_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1beta1ProjectRequestBody
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_list_projects_serialize(
- org_id=org_id,
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListProjectsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CreateProjectResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- def _admin_service_list_projects_serialize(
- self,
- org_id,
- state,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _params = locals()
- _host = None
+ _all_params = [
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
- _collection_formats: Dict[str, str] = {
-
- }
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_create_project" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
+ _path_params = {}
+
# process the query parameters
- if org_id is not None:
-
- _query_params.append(('orgId', org_id))
-
- if state is not None:
-
- _query_params.append(('state', state))
-
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
+ # set the HTTP header `Content-Type`
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1CreateProjectResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/admin/projects',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/projects', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_delete_project(self, id : StrictStr, **kwargs) -> object: # noqa: E501
+ """Delete Project # noqa: E501
+ Delete a project all of its relations permanently. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_create_project(
- self,
- body: V1beta1ProjectRequestBody,
- _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,
- ) -> V1beta1CreateProjectResponse:
- """Create project
+ >>> thread = api.frontier_service_delete_project(id, async_req=True)
+ >>> result = thread.get()
+ :param id: (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_delete_project_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_delete_project_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_delete_project_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """Delete Project # noqa: E501
+
+ Delete a project all of its relations permanently. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_delete_project_with_http_info(id, async_req=True)
+ >>> result = thread.get()
- :param body: (required)
- :type body: V1beta1ProjectRequestBody
+ :param id: (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_project_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateProjectResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_project_with_http_info(
- self,
- body: V1beta1ProjectRequestBody,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _params = locals()
+
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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[V1beta1CreateProjectResponse]:
- """Create project
+ )
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_delete_project" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- :param body: (required)
- :type body: V1beta1ProjectRequestBody
- :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._frontier_service_create_project_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ _collection_formats = {}
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateProjectResponse",
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
+
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "object",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/projects/{id}', 'DELETE',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_disable_project(self, id : StrictStr, body : Dict[str, Any], **kwargs) -> object: # noqa: E501
+ """Disable project # noqa: E501
- @validate_call
- def frontier_service_create_project_without_preload_content(
- self,
- body: V1beta1ProjectRequestBody,
- _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 project
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.frontier_service_disable_project(id, body, async_req=True)
+ >>> result = thread.get()
+ :param id: (required)
+ :type id: str
:param body: (required)
- :type body: V1beta1ProjectRequestBody
+ :type body: object
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_disable_project_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_disable_project_with_http_info(id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_disable_project_with_http_info(self, id : StrictStr, body : Dict[str, Any], **kwargs) -> ApiResponse: # noqa: E501
+ """Disable project # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_disable_project_with_http_info(id, body, async_req=True)
+ >>> result = thread.get()
+
+ :param id: (required)
+ :type id: str
+ :param body: (required)
+ :type body: object
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_project_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateProjectResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ _params = locals()
+ _all_params = [
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
- def _frontier_service_create_project_serialize(
- self,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_disable_project" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "object",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/projects',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/projects/{id}/disable', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_enable_project(self, id : StrictStr, body : Dict[str, Any], **kwargs) -> object: # noqa: E501
+ """Enable project # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_delete_project(
- self,
- id: StrictStr,
- _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:
- """Delete Project
+ >>> thread = api.frontier_service_enable_project(id, body, async_req=True)
+ >>> result = thread.get()
- Delete a project all of its relations permanently.
+ :param id: (required)
+ :type id: str
+ :param body: (required)
+ :type body: object
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_enable_project_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_enable_project_with_http_info(id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_enable_project_with_http_info(self, id : StrictStr, body : Dict[str, Any], **kwargs) -> ApiResponse: # noqa: E501
+ """Enable project # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_enable_project_with_http_info(id, body, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
+ :param body: (required)
+ :type body: object
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_delete_project_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_enable_project" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
+
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # set the HTTP header `Content-Type`
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
'200': "object",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/projects/{id}/enable', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- ).data
-
-
- @validate_call
- def frontier_service_delete_project_with_http_info(
- self,
- id: StrictStr,
- _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]:
- """Delete Project
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+
+ @validate_arguments
+ def frontier_service_get_project(self, id : StrictStr, **kwargs) -> V1beta1GetProjectResponse: # noqa: E501
+ """Get project # noqa: E501
- Delete a project all of its relations permanently.
+ Returns a project by ID # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_get_project(id, async_req=True)
+ >>> result = thread.get()
+
+ :param id: (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1GetProjectResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_get_project_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_get_project_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_get_project_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """Get project # noqa: E501
+
+ Returns a project by ID # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_get_project_with_http_info(id, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_delete_project_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1GetProjectResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_delete_project_without_preload_content(
- self,
- id: StrictStr,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Delete Project
+ )
- Delete a project all of its relations permanently.
-
- :param id: (required)
- :type id: str
- :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._frontier_service_delete_project_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_delete_project_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='DELETE',
- resource_path='/v1beta1/projects/{id}',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_disable_project(
- self,
- id: StrictStr,
- body: Dict[str, Any],
- _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:
- """Disable project
-
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: object
- :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._frontier_service_disable_project_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_disable_project_with_http_info(
- self,
- id: StrictStr,
- body: Dict[str, Any],
- _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]:
- """Disable project
-
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: object
- :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._frontier_service_disable_project_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_disable_project_without_preload_content(
- self,
- id: StrictStr,
- body: Dict[str, Any],
- _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:
- """Disable project
-
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: object
- :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._frontier_service_disable_project_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_disable_project_serialize(
- self,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
- if body is not None:
- _body_params = body
-
-
- # 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] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/projects/{id}/disable',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_enable_project(
- self,
- id: StrictStr,
- body: Dict[str, Any],
- _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:
- """Enable project
-
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: object
- :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._frontier_service_enable_project_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_enable_project_with_http_info(
- self,
- id: StrictStr,
- body: Dict[str, Any],
- _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]:
- """Enable project
-
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: object
- :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._frontier_service_enable_project_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_enable_project_without_preload_content(
- self,
- id: StrictStr,
- body: Dict[str, Any],
- _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:
- """Enable project
-
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: object
- :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._frontier_service_enable_project_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_enable_project_serialize(
- self,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
- if body is not None:
- _body_params = body
-
-
- # 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] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/projects/{id}/enable',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_get_project(
- self,
- id: StrictStr,
- _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,
- ) -> V1beta1GetProjectResponse:
- """Get project
-
- Returns a project by ID
-
- :param id: (required)
- :type id: str
- :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._frontier_service_get_project_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetProjectResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_project_with_http_info(
- self,
- id: StrictStr,
- _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[V1beta1GetProjectResponse]:
- """Get project
-
- Returns a project by ID
-
- :param id: (required)
- :type id: str
- :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._frontier_service_get_project_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetProjectResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_project_without_preload_content(
- self,
- id: StrictStr,
- _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:
- """Get project
-
- Returns a project by ID
-
- :param id: (required)
- :type id: str
- :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._frontier_service_get_project_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetProjectResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_get_project_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/projects/{id}',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_list_project_admins(
- self,
- id: StrictStr,
- _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,
- ) -> V1beta1ListProjectAdminsResponse:
- """List project admins
-
- Returns a collection of admins of a project
-
- :param id: (required)
- :type id: str
- :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._frontier_service_list_project_admins_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListProjectAdminsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_project_admins_with_http_info(
- self,
- id: StrictStr,
- _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[V1beta1ListProjectAdminsResponse]:
- """List project admins
-
- Returns a collection of admins of a project
-
- :param id: (required)
- :type id: str
- :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._frontier_service_list_project_admins_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListProjectAdminsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_project_admins_without_preload_content(
- self,
- id: StrictStr,
- _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:
- """List project admins
-
- Returns a collection of admins of a project
-
- :param id: (required)
- :type id: str
- :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._frontier_service_list_project_admins_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListProjectAdminsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_list_project_admins_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _host = None
-
- _collection_formats: Dict[str, str] = {
-
- }
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_get_project" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/projects/{id}/admins',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_list_project_groups(
- self,
- id: StrictStr,
- with_roles: Optional[StrictBool] = None,
- _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,
- ) -> V1beta1ListProjectGroupsResponse:
- """List project groups
-
- Returns a collection of groups of a project.
-
- :param id: (required)
- :type id: str
- :param with_roles:
- :type with_roles: bool
- :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._frontier_service_list_project_groups_serialize(
- id=id,
- with_roles=with_roles,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListProjectGroupsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_project_groups_with_http_info(
- self,
- id: StrictStr,
- with_roles: Optional[StrictBool] = None,
- _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[V1beta1ListProjectGroupsResponse]:
- """List project groups
-
- Returns a collection of groups of a project.
-
- :param id: (required)
- :type id: str
- :param with_roles:
- :type with_roles: bool
- :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._frontier_service_list_project_groups_serialize(
- id=id,
- with_roles=with_roles,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListProjectGroupsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_project_groups_without_preload_content(
- self,
- id: StrictStr,
- with_roles: Optional[StrictBool] = None,
- _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:
- """List project groups
-
- Returns a collection of groups of a project.
-
- :param id: (required)
- :type id: str
- :param with_roles:
- :type with_roles: bool
- :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._frontier_service_list_project_groups_serialize(
- id=id,
- with_roles=with_roles,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListProjectGroupsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_list_project_groups_serialize(
- self,
- id,
- with_roles,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
- if with_roles is not None:
-
- _query_params.append(('withRoles', with_roles))
-
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/projects/{id}/groups',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_list_project_service_users(
- self,
- id: StrictStr,
- with_roles: Optional[StrictBool] = None,
- _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,
- ) -> V1beta1ListProjectServiceUsersResponse:
- """List project serviceusers
-
- Returns a collection of users of a project.
-
- :param id: (required)
- :type id: str
- :param with_roles:
- :type with_roles: bool
- :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._frontier_service_list_project_service_users_serialize(
- id=id,
- with_roles=with_roles,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListProjectServiceUsersResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_project_service_users_with_http_info(
- self,
- id: StrictStr,
- with_roles: Optional[StrictBool] = None,
- _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[V1beta1ListProjectServiceUsersResponse]:
- """List project serviceusers
+ _auth_settings = ['Basic'] # noqa: E501
- Returns a collection of users of a project.
-
- :param id: (required)
- :type id: str
- :param with_roles:
- :type with_roles: bool
- :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._frontier_service_list_project_service_users_serialize(
- id=id,
- with_roles=with_roles,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListProjectServiceUsersResponse",
+ _response_types_map = {
+ '200': "V1beta1GetProjectResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/projects/{id}', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_project_admins(self, id : StrictStr, **kwargs) -> V1beta1ListProjectAdminsResponse: # noqa: E501
+ """List project admins # noqa: E501
- @validate_call
- def frontier_service_list_project_service_users_without_preload_content(
- self,
- id: StrictStr,
- with_roles: Optional[StrictBool] = None,
- _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:
- """List project serviceusers
+ Returns a collection of admins of a project # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Returns a collection of users of a project.
+ >>> thread = api.frontier_service_list_project_admins(id, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
- :param with_roles:
- :type with_roles: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListProjectAdminsResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_project_admins_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_project_admins_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_project_admins_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """List project admins # noqa: E501
+
+ Returns a collection of admins of a project # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_project_admins_with_http_info(id, async_req=True)
+ >>> result = thread.get()
+
+ :param id: (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_project_service_users_serialize(
- id=id,
- with_roles=with_roles,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListProjectAdminsResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListProjectServiceUsersResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ _params = locals()
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
- def _frontier_service_list_project_service_users_serialize(
- self,
- id,
- with_roles,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_project_admins" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
- if with_roles is not None:
-
- _query_params.append(('withRoles', with_roles))
-
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListProjectAdminsResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/projects/{id}/serviceusers',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/projects/{id}/admins', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_project_groups(self, id : StrictStr, with_roles : Optional[StrictBool] = None, **kwargs) -> V1beta1ListProjectGroupsResponse: # noqa: E501
+ """List project groups # noqa: E501
+ Returns a collection of groups of a project. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_list_project_users(
- self,
- id: StrictStr,
- permission_filter: Optional[StrictStr] = None,
- with_roles: Optional[StrictBool] = None,
- _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,
- ) -> V1beta1ListProjectUsersResponse:
- """List project users
-
- Returns a collection of users of a project. Filter by user permissions is supported.
+ >>> thread = api.frontier_service_list_project_groups(id, with_roles, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
- :param permission_filter:
- :type permission_filter: str
:param with_roles:
:type with_roles: bool
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_project_users_serialize(
- id=id,
- permission_filter=permission_filter,
- with_roles=with_roles,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListProjectUsersResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_project_users_with_http_info(
- self,
- id: StrictStr,
- permission_filter: Optional[StrictStr] = None,
- with_roles: Optional[StrictBool] = None,
- _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[V1beta1ListProjectUsersResponse]:
- """List project users
-
- Returns a collection of users of a project. Filter by user permissions is supported.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListProjectGroupsResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_project_groups_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_project_groups_with_http_info(id, with_roles, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_project_groups_with_http_info(self, id : StrictStr, with_roles : Optional[StrictBool] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """List project groups # noqa: E501
+
+ Returns a collection of groups of a project. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_project_groups_with_http_info(id, with_roles, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
- :param permission_filter:
- :type permission_filter: str
:param with_roles:
:type with_roles: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_project_users_serialize(
- id=id,
- permission_filter=permission_filter,
- with_roles=with_roles,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListProjectGroupsResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'id',
+ 'with_roles'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListProjectUsersResponse",
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_project_groups" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
+
+
+ # process the query parameters
+ _query_params = []
+ if _params.get('with_roles') is not None: # noqa: E501
+ _query_params.append(('withRoles', _params['with_roles']))
+
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListProjectGroupsResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/projects/{id}/groups', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_project_service_users(self, id : StrictStr, with_roles : Optional[StrictBool] = None, **kwargs) -> V1beta1ListProjectServiceUsersResponse: # noqa: E501
+ """List project serviceusers # noqa: E501
- @validate_call
- def frontier_service_list_project_users_without_preload_content(
- self,
- id: StrictStr,
- permission_filter: Optional[StrictStr] = None,
- with_roles: Optional[StrictBool] = None,
- _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:
- """List project users
+ Returns a collection of users of a project. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Returns a collection of users of a project. Filter by user permissions is supported.
+ >>> thread = api.frontier_service_list_project_service_users(id, with_roles, async_req=True)
+ >>> result = thread.get()
+
+ :param id: (required)
+ :type id: str
+ :param with_roles:
+ :type with_roles: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListProjectServiceUsersResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_project_service_users_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_project_service_users_with_http_info(id, with_roles, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_project_service_users_with_http_info(self, id : StrictStr, with_roles : Optional[StrictBool] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """List project serviceusers # noqa: E501
+
+ Returns a collection of users of a project. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_project_service_users_with_http_info(id, with_roles, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
- :param permission_filter:
- :type permission_filter: str
:param with_roles:
:type with_roles: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_project_users_serialize(
- id=id,
- permission_filter=permission_filter,
- with_roles=with_roles,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListProjectServiceUsersResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListProjectUsersResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ _params = locals()
+ _all_params = [
+ 'id',
+ 'with_roles'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
- def _frontier_service_list_project_users_serialize(
- self,
- id,
- permission_filter,
- with_roles,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_project_service_users" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
- if permission_filter is not None:
-
- _query_params.append(('permissionFilter', permission_filter))
-
- if with_roles is not None:
-
- _query_params.append(('withRoles', with_roles))
-
+ _query_params = []
+ if _params.get('with_roles') is not None: # noqa: E501
+ _query_params.append(('withRoles', _params['with_roles']))
+
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListProjectServiceUsersResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/projects/{id}/users',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/projects/{id}/serviceusers', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_project_users(self, id : StrictStr, permission_filter : Optional[StrictStr] = None, with_roles : Optional[StrictBool] = None, **kwargs) -> V1beta1ListProjectUsersResponse: # noqa: E501
+ """List project users # noqa: E501
+ Returns a collection of users of a project. Filter by user permissions is supported. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.frontier_service_list_project_users(id, permission_filter, with_roles, async_req=True)
+ >>> result = thread.get()
- @validate_call
- def frontier_service_update_project(
- self,
- id: StrictStr,
- body: V1beta1ProjectRequestBody,
- _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,
- ) -> V1beta1UpdateProjectResponse:
- """Update project
-
- Updates a project by ID
+ :param id: (required)
+ :type id: str
+ :param permission_filter:
+ :type permission_filter: str
+ :param with_roles:
+ :type with_roles: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListProjectUsersResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_project_users_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_project_users_with_http_info(id, permission_filter, with_roles, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_project_users_with_http_info(self, id : StrictStr, permission_filter : Optional[StrictStr] = None, with_roles : Optional[StrictBool] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """List project users # noqa: E501
+
+ Returns a collection of users of a project. Filter by user permissions is supported. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_project_users_with_http_info(id, permission_filter, with_roles, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
- :param body: (required)
- :type body: V1beta1ProjectRequestBody
+ :param permission_filter:
+ :type permission_filter: str
+ :param with_roles:
+ :type with_roles: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_update_project_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListProjectUsersResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'id',
+ 'permission_filter',
+ 'with_roles'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateProjectResponse",
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_project_users" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
+
+
+ # process the query parameters
+ _query_params = []
+ if _params.get('permission_filter') is not None: # noqa: E501
+ _query_params.append(('permissionFilter', _params['permission_filter']))
+
+ if _params.get('with_roles') is not None: # noqa: E501
+ _query_params.append(('withRoles', _params['with_roles']))
+
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListProjectUsersResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/projects/{id}/users', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- ).data
-
-
- @validate_call
- def frontier_service_update_project_with_http_info(
- self,
- id: StrictStr,
- body: V1beta1ProjectRequestBody,
- _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[V1beta1UpdateProjectResponse]:
- """Update project
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+
+ @validate_arguments
+ def frontier_service_update_project(self, id : StrictStr, body : V1beta1ProjectRequestBody, **kwargs) -> V1beta1UpdateProjectResponse: # noqa: E501
+ """Update project # noqa: E501
- Updates a project by ID
+ Updates a project by ID # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_update_project(id, body, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
:param body: (required)
:type body: V1beta1ProjectRequestBody
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_update_project_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateProjectResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_update_project_without_preload_content(
- self,
- id: StrictStr,
- body: V1beta1ProjectRequestBody,
- _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:
- """Update project
-
- Updates a project by ID
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1UpdateProjectResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_update_project_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_update_project_with_http_info(id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_update_project_with_http_info(self, id : StrictStr, body : V1beta1ProjectRequestBody, **kwargs) -> ApiResponse: # noqa: E501
+ """Update project # noqa: E501
+
+ Updates a project by ID # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_update_project_with_http_info(id, body, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
:param body: (required)
:type body: V1beta1ProjectRequestBody
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_update_project_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1UpdateProjectResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateProjectResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ _params = locals()
+ _all_params = [
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
- def _frontier_service_update_project_serialize(
- self,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_update_project" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1UpdateProjectResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='PUT',
- resource_path='/v1beta1/projects/{id}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/projects/{id}', 'PUT',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
diff --git a/frontier_api/api/relation_api.py b/frontier_api/api/relation_api.py
index bd9988d..d0cb531 100644
--- a/frontier_api/api/relation_api.py
+++ b/frontier_api/api/relation_api.py
@@ -13,22 +13,16 @@
""" # noqa: E501
+import re # noqa: F401
import io
import warnings
-from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
-from typing import Dict, List, Optional, Tuple, Union, Any
+from pydantic import validate_arguments, ValidationError
-try:
- from typing import Annotated
-except ImportError:
- from typing_extensions import Annotated
-
-from pydantic import Field
from typing_extensions import Annotated
-from pydantic import StrictStr
+from pydantic import Field, StrictStr
-from typing import Any, Dict, Union
+from typing import Any, Dict, Optional
from frontier_api.models.v1beta1_create_relation_response import V1beta1CreateRelationResponse
from frontier_api.models.v1beta1_get_relation_response import V1beta1GetRelationResponse
@@ -37,7 +31,10 @@
from frontier_api.api_client import ApiClient
from frontier_api.api_response import ApiResponse
-from frontier_api.rest import RESTResponseType
+from frontier_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class RelationApi:
@@ -52,581 +49,317 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client
+ @validate_arguments
+ def admin_service_list_relations(self, subject : Annotated[Optional[StrictStr], Field(description="The subject to filter by.")] = None, object : Annotated[Optional[StrictStr], Field(description="The object to filter by.")] = None, **kwargs) -> V1beta1ListRelationsResponse: # noqa: E501
+ """List all relations # noqa: E501
- @validate_call
- def admin_service_list_relations(
- self,
- _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,
- ) -> V1beta1ListRelationsResponse:
- """List all relations
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.admin_service_list_relations(subject, object, async_req=True)
+ >>> result = thread.get()
- :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
+ :param subject: The subject to filter by.
+ :type subject: str
+ :param object: The object to filter by.
+ :type object: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_list_relations_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListRelationsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 admin_service_list_relations_with_http_info(
- self,
- _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[V1beta1ListRelationsResponse]:
- """List all relations
-
-
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListRelationsResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the admin_service_list_relations_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.admin_service_list_relations_with_http_info(subject, object, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def admin_service_list_relations_with_http_info(self, subject : Annotated[Optional[StrictStr], Field(description="The subject to filter by.")] = None, object : Annotated[Optional[StrictStr], Field(description="The object to filter by.")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """List all relations # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.admin_service_list_relations_with_http_info(subject, object, async_req=True)
+ >>> result = thread.get()
+
+ :param subject: The subject to filter by.
+ :type subject: str
+ :param object: The object to filter by.
+ :type object: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_list_relations_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListRelationsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListRelationsResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def admin_service_list_relations_without_preload_content(
- self,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'subject',
+ 'object'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """List all relations
-
-
- :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._admin_service_list_relations_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListRelationsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
)
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method admin_service_list_relations" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _admin_service_list_relations_serialize(
- self,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _collection_formats = {}
- _host = None
+ # process the path parameters
+ _path_params = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the query parameters
+ _query_params = []
+ if _params.get('subject') is not None: # noqa: E501
+ _query_params.append(('subject', _params['subject']))
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ if _params.get('object') is not None: # noqa: E501
+ _query_params.append(('object', _params['object']))
- # process the path parameters
- # process the query parameters
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/admin/relations',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ _response_types_map = {
+ '200': "V1beta1ListRelationsResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
+
+ return self.api_client.call_api(
+ '/v1beta1/admin/relations', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_create_relation(self, body : V1beta1RelationRequestBody, **kwargs) -> V1beta1CreateRelationResponse: # noqa: E501
+ """Create relation # noqa: E501
- @validate_call
- def frontier_service_create_relation(
- self,
- body: V1beta1RelationRequestBody,
- _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,
- ) -> V1beta1CreateRelationResponse:
- """Create relation
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.frontier_service_create_relation(body, async_req=True)
+ >>> result = thread.get()
:param body: (required)
:type body: V1beta1RelationRequestBody
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_relation_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateRelationResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_relation_with_http_info(
- self,
- body: V1beta1RelationRequestBody,
- _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[V1beta1CreateRelationResponse]:
- """Create relation
-
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CreateRelationResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_create_relation_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_create_relation_with_http_info(body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_create_relation_with_http_info(self, body : V1beta1RelationRequestBody, **kwargs) -> ApiResponse: # noqa: E501
+ """Create relation # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_create_relation_with_http_info(body, async_req=True)
+ >>> result = thread.get()
:param body: (required)
:type body: V1beta1RelationRequestBody
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_relation_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateRelationResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CreateRelationResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_create_relation_without_preload_content(
- self,
- body: V1beta1RelationRequestBody,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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 relation
-
-
- :param body: (required)
- :type body: V1beta1RelationRequestBody
- :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._frontier_service_create_relation_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateRelationResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_create_relation_serialize(
- self,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _host = None
-
- _collection_formats: Dict[str, str] = {
-
- }
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_create_relation" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
+ _path_params = {}
+
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1CreateRelationResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/relations',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/relations', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_delete_relation(self, relation : StrictStr, object : Annotated[StrictStr, Field(..., description="objectnamespace:uuid")], subject : Annotated[StrictStr, Field(..., description="subjectnamespace:uuid")], **kwargs) -> object: # noqa: E501
+ """Delete relation # noqa: E501
- @validate_call
- def frontier_service_delete_relation(
- self,
- relation: StrictStr,
- object: Annotated[StrictStr, Field(description="objectnamespace:uuid")],
- subject: Annotated[StrictStr, Field(description="subjectnamespace:uuid")],
- _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:
- """Delete relation
+ Remove a subject having a relation from an object # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Remove a subject having a relation from an object
+ >>> thread = api.frontier_service_delete_relation(relation, object, subject, async_req=True)
+ >>> result = thread.get()
:param relation: (required)
:type relation: str
@@ -634,81 +367,33 @@ def frontier_service_delete_relation(
:type object: str
:param subject: subjectnamespace:uuid (required)
:type subject: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_delete_relation_serialize(
- relation=relation,
- object=object,
- subject=subject,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_delete_relation_with_http_info(
- self,
- relation: StrictStr,
- object: Annotated[StrictStr, Field(description="objectnamespace:uuid")],
- subject: Annotated[StrictStr, Field(description="subjectnamespace:uuid")],
- _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]:
- """Delete relation
-
- Remove a subject having a relation from an object
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_delete_relation_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_delete_relation_with_http_info(relation, object, subject, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_delete_relation_with_http_info(self, relation : StrictStr, object : Annotated[StrictStr, Field(..., description="objectnamespace:uuid")], subject : Annotated[StrictStr, Field(..., description="subjectnamespace:uuid")], **kwargs) -> ApiResponse: # noqa: E501
+ """Delete relation # noqa: E501
+
+ Remove a subject having a relation from an object # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_delete_relation_with_http_info(relation, object, subject, async_req=True)
+ >>> result = thread.get()
:param relation: (required)
:type relation: str
@@ -716,480 +401,257 @@ def frontier_service_delete_relation_with_http_info(
:type object: str
:param subject: subjectnamespace:uuid (required)
:type subject: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_delete_relation_serialize(
- relation=relation,
- object=object,
- subject=subject,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_delete_relation_without_preload_content(
- self,
- relation: StrictStr,
- object: Annotated[StrictStr, Field(description="objectnamespace:uuid")],
- subject: Annotated[StrictStr, Field(description="subjectnamespace:uuid")],
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'relation',
+ 'object',
+ 'subject'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Delete relation
-
- Remove a subject having a relation from an object
-
- :param relation: (required)
- :type relation: str
- :param object: objectnamespace:uuid (required)
- :type object: str
- :param subject: subjectnamespace:uuid (required)
- :type subject: str
- :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._frontier_service_delete_relation_serialize(
- relation=relation,
- object=object,
- subject=subject,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_delete_relation" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+ _collection_formats = {}
- def _frontier_service_delete_relation_serialize(
- self,
- relation,
- object,
- subject,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # process the path parameters
+ _path_params = {}
+ if _params['relation']:
+ _path_params['relation'] = _params['relation']
- _host = None
+ if _params['object']:
+ _path_params['object'] = _params['object']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['subject']:
+ _path_params['subject'] = _params['subject']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if relation is not None:
- _path_params['relation'] = relation
- if object is not None:
- _path_params['object'] = object
- if subject is not None:
- _path_params['subject'] = subject
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='DELETE',
- resource_path='/v1beta1/relations/{relation}/object/{object}/subject/{subject}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ _response_types_map = {
+ '200': "object",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
+
+ return self.api_client.call_api(
+ '/v1beta1/relations/{relation}/object/{object}/subject/{subject}', 'DELETE',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_get_relation(self, id : StrictStr, **kwargs) -> V1beta1GetRelationResponse: # noqa: E501
+ """Get relation # noqa: E501
+ Returns a relation by ID # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
-
- @validate_call
- def frontier_service_get_relation(
- self,
- id: StrictStr,
- _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,
- ) -> V1beta1GetRelationResponse:
- """Get relation
-
- Returns a relation by ID
+ >>> thread = api.frontier_service_get_relation(id, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_get_relation_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetRelationResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_relation_with_http_info(
- self,
- id: StrictStr,
- _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[V1beta1GetRelationResponse]:
- """Get relation
-
- Returns a relation by ID
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1GetRelationResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_get_relation_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_get_relation_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_get_relation_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """Get relation # noqa: E501
+
+ Returns a relation by ID # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_get_relation_with_http_info(id, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_get_relation_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetRelationResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1GetRelationResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_get_relation_without_preload_content(
- self,
- id: StrictStr,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Get relation
-
- Returns a relation by ID
-
- :param id: (required)
- :type id: str
- :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._frontier_service_get_relation_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetRelationResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
)
- return response_data.response
-
- def _frontier_service_get_relation_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_get_relation" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1GetRelationResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/relations/{id}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/relations/{id}', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
diff --git a/frontier_api/api/resource_api.py b/frontier_api/api/resource_api.py
index 664be50..99185c0 100644
--- a/frontier_api/api/resource_api.py
+++ b/frontier_api/api/resource_api.py
@@ -13,22 +13,16 @@
""" # noqa: E501
+import re # noqa: F401
import io
import warnings
-from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
-from typing import Dict, List, Optional, Tuple, Union, Any
+from pydantic import validate_arguments, ValidationError
-try:
- from typing import Annotated
-except ImportError:
- from typing_extensions import Annotated
-
-from pydantic import Field
from typing_extensions import Annotated
-from pydantic import StrictStr
+from pydantic import Field, StrictStr
-from typing import Any, Dict, Optional, Union
+from typing import Any, Dict, Optional
from frontier_api.models.v1beta1_create_project_resource_response import V1beta1CreateProjectResourceResponse
from frontier_api.models.v1beta1_get_project_resource_response import V1beta1GetProjectResourceResponse
@@ -39,7 +33,10 @@
from frontier_api.api_client import ApiClient
from frontier_api.api_response import ApiResponse
-from frontier_api.rest import RESTResponseType
+from frontier_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class ResourceApi:
@@ -54,30 +51,16 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client
+ @validate_arguments
+ def admin_service_list_resources(self, user_id : Annotated[Optional[StrictStr], Field(description="The user id to filter by.")] = None, project_id : Annotated[Optional[StrictStr], Field(description="The project id to filter by.")] = None, organization_id : Annotated[Optional[StrictStr], Field(description="The organization id to filter by.")] = None, namespace : Annotated[Optional[StrictStr], Field(description="The namespace to filter by.")] = None, **kwargs) -> V1beta1ListResourcesResponse: # noqa: E501
+ """List all resources # noqa: E501
- @validate_call
- def admin_service_list_resources(
- self,
- user_id: Annotated[Optional[StrictStr], Field(description="The user id to filter by.")] = None,
- project_id: Annotated[Optional[StrictStr], Field(description="The project id to filter by.")] = None,
- organization_id: Annotated[Optional[StrictStr], Field(description="The organization id to filter by.")] = None,
- namespace: Annotated[Optional[StrictStr], Field(description="The namespace to filter by.")] = None,
- _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,
- ) -> V1beta1ListResourcesResponse:
- """List all resources
+ Lists all the resources from all the organizations in a Frontier instance. It can be filtered by user, project, organization and namespace. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Lists all the resources from all the organizations in a Frontier instance. It can be filtered by user, project, organization and namespace.
+ >>> thread = api.admin_service_list_resources(user_id, project_id, organization_id, namespace, async_req=True)
+ >>> result = thread.get()
:param user_id: The user id to filter by.
:type user_id: str
@@ -87,83 +70,33 @@ def admin_service_list_resources(
:type organization_id: str
:param namespace: The namespace to filter by.
:type namespace: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_list_resources_serialize(
- user_id=user_id,
- project_id=project_id,
- organization_id=organization_id,
- namespace=namespace,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListResourcesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 admin_service_list_resources_with_http_info(
- self,
- user_id: Annotated[Optional[StrictStr], Field(description="The user id to filter by.")] = None,
- project_id: Annotated[Optional[StrictStr], Field(description="The project id to filter by.")] = None,
- organization_id: Annotated[Optional[StrictStr], Field(description="The organization id to filter by.")] = None,
- namespace: Annotated[Optional[StrictStr], Field(description="The namespace to filter by.")] = None,
- _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[V1beta1ListResourcesResponse]:
- """List all resources
-
- Lists all the resources from all the organizations in a Frontier instance. It can be filtered by user, project, organization and namespace.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListResourcesResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the admin_service_list_resources_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.admin_service_list_resources_with_http_info(user_id, project_id, organization_id, namespace, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def admin_service_list_resources_with_http_info(self, user_id : Annotated[Optional[StrictStr], Field(description="The user id to filter by.")] = None, project_id : Annotated[Optional[StrictStr], Field(description="The project id to filter by.")] = None, organization_id : Annotated[Optional[StrictStr], Field(description="The organization id to filter by.")] = None, namespace : Annotated[Optional[StrictStr], Field(description="The namespace to filter by.")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """List all resources # noqa: E501
+
+ Lists all the resources from all the organizations in a Frontier instance. It can be filtered by user, project, organization and namespace. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.admin_service_list_resources_with_http_info(user_id, project_id, organization_id, namespace, async_req=True)
+ >>> result = thread.get()
:param user_id: The user id to filter by.
:type user_id: str
@@ -173,243 +106,130 @@ def admin_service_list_resources_with_http_info(
:type organization_id: str
:param namespace: The namespace to filter by.
:type namespace: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_list_resources_serialize(
- user_id=user_id,
- project_id=project_id,
- organization_id=organization_id,
- namespace=namespace,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListResourcesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 admin_service_list_resources_without_preload_content(
- self,
- user_id: Annotated[Optional[StrictStr], Field(description="The user id to filter by.")] = None,
- project_id: Annotated[Optional[StrictStr], Field(description="The project id to filter by.")] = None,
- organization_id: Annotated[Optional[StrictStr], Field(description="The organization id to filter by.")] = None,
- namespace: Annotated[Optional[StrictStr], Field(description="The namespace to filter by.")] = None,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListResourcesResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'user_id',
+ 'project_id',
+ 'organization_id',
+ 'namespace'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """List all resources
-
- Lists all the resources from all the organizations in a Frontier instance. It can be filtered by user, project, organization and namespace.
-
- :param user_id: The user id to filter by.
- :type user_id: str
- :param project_id: The project id to filter by.
- :type project_id: str
- :param organization_id: The organization id to filter by.
- :type organization_id: str
- :param namespace: The namespace to filter by.
- :type namespace: str
- :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._admin_service_list_resources_serialize(
- user_id=user_id,
- project_id=project_id,
- organization_id=organization_id,
- namespace=namespace,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListResourcesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method admin_service_list_resources" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+ _collection_formats = {}
- def _admin_service_list_resources_serialize(
- self,
- user_id,
- project_id,
- organization_id,
- namespace,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # process the path parameters
+ _path_params = {}
- _host = None
+ # process the query parameters
+ _query_params = []
+ if _params.get('user_id') is not None: # noqa: E501
+ _query_params.append(('userId', _params['user_id']))
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params.get('project_id') is not None: # noqa: E501
+ _query_params.append(('projectId', _params['project_id']))
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ if _params.get('organization_id') is not None: # noqa: E501
+ _query_params.append(('organizationId', _params['organization_id']))
+
+ if _params.get('namespace') is not None: # noqa: E501
+ _query_params.append(('namespace', _params['namespace']))
- # process the path parameters
- # process the query parameters
- if user_id is not None:
-
- _query_params.append(('userId', user_id))
-
- if project_id is not None:
-
- _query_params.append(('projectId', project_id))
-
- if organization_id is not None:
-
- _query_params.append(('organizationId', organization_id))
-
- if namespace is not None:
-
- _query_params.append(('namespace', namespace))
-
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/admin/resources',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ _response_types_map = {
+ '200': "V1beta1ListResourcesResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
+
+ return self.api_client.call_api(
+ '/v1beta1/admin/resources', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_create_project_resource(self, project_id : Annotated[StrictStr, Field(..., description="project uuid or name")], body : V1beta1ResourceRequestBody, id : Annotated[Optional[StrictStr], Field(description="Autogenerated if skipped.")] = None, **kwargs) -> V1beta1CreateProjectResourceResponse: # noqa: E501
+ """Create resource # noqa: E501
+ Creates a resource in a project # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
-
- @validate_call
- def frontier_service_create_project_resource(
- self,
- project_id: Annotated[StrictStr, Field(description="project uuid or name")],
- body: V1beta1ResourceRequestBody,
- id: Annotated[Optional[StrictStr], Field(description="Autogenerated if skipped.")] = None,
- _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,
- ) -> V1beta1CreateProjectResourceResponse:
- """Create resource
-
- Creates a resource in a project
+ >>> thread = api.frontier_service_create_project_resource(project_id, body, id, async_req=True)
+ >>> result = thread.get()
:param project_id: project uuid or name (required)
:type project_id: str
@@ -417,81 +237,33 @@ def frontier_service_create_project_resource(
:type body: V1beta1ResourceRequestBody
:param id: Autogenerated if skipped.
:type id: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_project_resource_serialize(
- project_id=project_id,
- body=body,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateProjectResourceResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_project_resource_with_http_info(
- self,
- project_id: Annotated[StrictStr, Field(description="project uuid or name")],
- body: V1beta1ResourceRequestBody,
- id: Annotated[Optional[StrictStr], Field(description="Autogenerated if skipped.")] = None,
- _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[V1beta1CreateProjectResourceResponse]:
- """Create resource
-
- Creates a resource in a project
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CreateProjectResourceResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_create_project_resource_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_create_project_resource_with_http_info(project_id, body, id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_create_project_resource_with_http_info(self, project_id : Annotated[StrictStr, Field(..., description="project uuid or name")], body : V1beta1ResourceRequestBody, id : Annotated[Optional[StrictStr], Field(description="Autogenerated if skipped.")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """Create resource # noqa: E501
+
+ Creates a resource in a project # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_create_project_resource_with_http_info(project_id, body, id, async_req=True)
+ >>> result = thread.get()
:param project_id: project uuid or name (required)
:type project_id: str
@@ -499,1126 +271,590 @@ def frontier_service_create_project_resource_with_http_info(
:type body: V1beta1ResourceRequestBody
:param id: Autogenerated if skipped.
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_project_resource_serialize(
- project_id=project_id,
- body=body,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateProjectResourceResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CreateProjectResourceResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_create_project_resource_without_preload_content(
- self,
- project_id: Annotated[StrictStr, Field(description="project uuid or name")],
- body: V1beta1ResourceRequestBody,
- id: Annotated[Optional[StrictStr], Field(description="Autogenerated if skipped.")] = None,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'project_id',
+ 'body',
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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 resource
-
- Creates a resource in a project
-
- :param project_id: project uuid or name (required)
- :type project_id: str
- :param body: (required)
- :type body: V1beta1ResourceRequestBody
- :param id: Autogenerated if skipped.
- :type id: str
- :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._frontier_service_create_project_resource_serialize(
- project_id=project_id,
- body=body,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateProjectResourceResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_create_project_resource_serialize(
- self,
- project_id,
- body,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_create_project_resource" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['project_id']:
+ _path_params['projectId'] = _params['project_id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if project_id is not None:
- _path_params['projectId'] = project_id
# process the query parameters
- if id is not None:
-
- _query_params.append(('id', id))
-
+ _query_params = []
+ if _params.get('id') is not None: # noqa: E501
+ _query_params.append(('id', _params['id']))
+
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/projects/{projectId}/resources',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ _response_types_map = {
+ '200': "V1beta1CreateProjectResourceResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
+
+ return self.api_client.call_api(
+ '/v1beta1/projects/{projectId}/resources', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_delete_project_resource(self, project_id : StrictStr, id : StrictStr, **kwargs) -> object: # noqa: E501
+ """Delete resource # noqa: E501
+ Deletes a resource from a project permanently # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_delete_project_resource(
- self,
- project_id: StrictStr,
- id: StrictStr,
- _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:
- """Delete resource
-
- Deletes a resource from a project permanently
+ >>> thread = api.frontier_service_delete_project_resource(project_id, id, async_req=True)
+ >>> result = thread.get()
:param project_id: (required)
:type project_id: str
:param id: (required)
:type id: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_delete_project_resource_serialize(
- project_id=project_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_delete_project_resource_with_http_info(
- self,
- project_id: StrictStr,
- id: StrictStr,
- _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]:
- """Delete resource
-
- Deletes a resource from a project permanently
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_delete_project_resource_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_delete_project_resource_with_http_info(project_id, id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_delete_project_resource_with_http_info(self, project_id : StrictStr, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """Delete resource # noqa: E501
+
+ Deletes a resource from a project permanently # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_delete_project_resource_with_http_info(project_id, id, async_req=True)
+ >>> result = thread.get()
:param project_id: (required)
:type project_id: str
:param id: (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_delete_project_resource_serialize(
- project_id=project_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_delete_project_resource_without_preload_content(
- self,
- project_id: StrictStr,
- id: StrictStr,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'project_id',
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Delete resource
-
- Deletes a resource from a project permanently
-
- :param project_id: (required)
- :type project_id: str
- :param id: (required)
- :type id: str
- :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._frontier_service_delete_project_resource_serialize(
- project_id=project_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_delete_project_resource" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_delete_project_resource_serialize(
- self,
- project_id,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _collection_formats = {}
- _host = None
+ # process the path parameters
+ _path_params = {}
+ if _params['project_id']:
+ _path_params['projectId'] = _params['project_id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if project_id is not None:
- _path_params['projectId'] = project_id
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "object",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='DELETE',
- resource_path='/v1beta1/projects/{projectId}/resources/{id}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/projects/{projectId}/resources/{id}', 'DELETE',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_get_project_resource(self, project_id : StrictStr, id : StrictStr, **kwargs) -> V1beta1GetProjectResourceResponse: # noqa: E501
+ """Get resource # noqa: E501
- @validate_call
- def frontier_service_get_project_resource(
- self,
- project_id: StrictStr,
- id: StrictStr,
- _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,
- ) -> V1beta1GetProjectResourceResponse:
- """Get resource
+ Returns a project resource by ID # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Returns a project resource by ID
+ >>> thread = api.frontier_service_get_project_resource(project_id, id, async_req=True)
+ >>> result = thread.get()
:param project_id: (required)
:type project_id: str
:param id: (required)
:type id: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_get_project_resource_serialize(
- project_id=project_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetProjectResourceResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_project_resource_with_http_info(
- self,
- project_id: StrictStr,
- id: StrictStr,
- _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[V1beta1GetProjectResourceResponse]:
- """Get resource
-
- Returns a project resource by ID
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1GetProjectResourceResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_get_project_resource_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_get_project_resource_with_http_info(project_id, id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_get_project_resource_with_http_info(self, project_id : StrictStr, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """Get resource # noqa: E501
+
+ Returns a project resource by ID # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_get_project_resource_with_http_info(project_id, id, async_req=True)
+ >>> result = thread.get()
:param project_id: (required)
:type project_id: str
:param id: (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_get_project_resource_serialize(
- project_id=project_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1GetProjectResourceResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetProjectResourceResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ _params = locals()
-
- @validate_call
- def frontier_service_get_project_resource_without_preload_content(
- self,
- project_id: StrictStr,
- id: StrictStr,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'project_id',
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Get resource
-
- Returns a project resource by ID
-
- :param project_id: (required)
- :type project_id: str
- :param id: (required)
- :type id: str
- :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._frontier_service_get_project_resource_serialize(
- project_id=project_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetProjectResourceResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_get_project_resource" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_get_project_resource_serialize(
- self,
- project_id,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _collection_formats = {}
- _host = None
+ # process the path parameters
+ _path_params = {}
+ if _params['project_id']:
+ _path_params['projectId'] = _params['project_id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if project_id is not None:
- _path_params['projectId'] = project_id
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/projects/{projectId}/resources/{id}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ _response_types_map = {
+ '200': "V1beta1GetProjectResourceResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
+
+ return self.api_client.call_api(
+ '/v1beta1/projects/{projectId}/resources/{id}', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_project_resources(self, project_id : StrictStr, namespace : Optional[StrictStr] = None, **kwargs) -> V1beta1ListProjectResourcesResponse: # noqa: E501
+ """Get all resources # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
-
- @validate_call
- def frontier_service_list_project_resources(
- self,
- project_id: StrictStr,
- namespace: Optional[StrictStr] = None,
- _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,
- ) -> V1beta1ListProjectResourcesResponse:
- """Get all resources
-
+ >>> thread = api.frontier_service_list_project_resources(project_id, namespace, async_req=True)
+ >>> result = thread.get()
:param project_id: (required)
:type project_id: str
:param namespace:
:type namespace: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_project_resources_serialize(
- project_id=project_id,
- namespace=namespace,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListProjectResourcesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_project_resources_with_http_info(
- self,
- project_id: StrictStr,
- namespace: Optional[StrictStr] = None,
- _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[V1beta1ListProjectResourcesResponse]:
- """Get all resources
-
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListProjectResourcesResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_project_resources_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_project_resources_with_http_info(project_id, namespace, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_project_resources_with_http_info(self, project_id : StrictStr, namespace : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """Get all resources # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_project_resources_with_http_info(project_id, namespace, async_req=True)
+ >>> result = thread.get()
:param project_id: (required)
:type project_id: str
:param namespace:
:type namespace: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_project_resources_serialize(
- project_id=project_id,
- namespace=namespace,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListProjectResourcesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListProjectResourcesResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_list_project_resources_without_preload_content(
- self,
- project_id: StrictStr,
- namespace: Optional[StrictStr] = None,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'project_id',
+ 'namespace'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Get all resources
-
-
- :param project_id: (required)
- :type project_id: str
- :param namespace:
- :type namespace: str
- :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._frontier_service_list_project_resources_serialize(
- project_id=project_id,
- namespace=namespace,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListProjectResourcesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_list_project_resources_serialize(
- self,
- project_id,
- namespace,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_project_resources" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['project_id']:
+ _path_params['projectId'] = _params['project_id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if project_id is not None:
- _path_params['projectId'] = project_id
# process the query parameters
- if namespace is not None:
-
- _query_params.append(('namespace', namespace))
-
+ _query_params = []
+ if _params.get('namespace') is not None: # noqa: E501
+ _query_params.append(('namespace', _params['namespace']))
+
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/projects/{projectId}/resources',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ _response_types_map = {
+ '200': "V1beta1ListProjectResourcesResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
+
+ return self.api_client.call_api(
+ '/v1beta1/projects/{projectId}/resources', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_update_project_resource(self, project_id : StrictStr, id : StrictStr, body : V1beta1ResourceRequestBody, **kwargs) -> V1beta1UpdateProjectResourceResponse: # noqa: E501
+ """Update resource # noqa: E501
+ Updates a resource in a project # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_update_project_resource(
- self,
- project_id: StrictStr,
- id: StrictStr,
- body: V1beta1ResourceRequestBody,
- _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,
- ) -> V1beta1UpdateProjectResourceResponse:
- """Update resource
-
- Updates a resource in a project
+ >>> thread = api.frontier_service_update_project_resource(project_id, id, body, async_req=True)
+ >>> result = thread.get()
:param project_id: (required)
:type project_id: str
@@ -1626,81 +862,33 @@ def frontier_service_update_project_resource(
:type id: str
:param body: (required)
:type body: V1beta1ResourceRequestBody
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_update_project_resource_serialize(
- project_id=project_id,
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateProjectResourceResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_update_project_resource_with_http_info(
- self,
- project_id: StrictStr,
- id: StrictStr,
- body: V1beta1ResourceRequestBody,
- _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[V1beta1UpdateProjectResourceResponse]:
- """Update resource
-
- Updates a resource in a project
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1UpdateProjectResourceResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_update_project_resource_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_update_project_resource_with_http_info(project_id, id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_update_project_resource_with_http_info(self, project_id : StrictStr, id : StrictStr, body : V1beta1ResourceRequestBody, **kwargs) -> ApiResponse: # noqa: E501
+ """Update resource # noqa: E501
+
+ Updates a resource in a project # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_update_project_resource_with_http_info(project_id, id, body, async_req=True)
+ >>> result = thread.get()
:param project_id: (required)
:type project_id: str
@@ -1708,213 +896,119 @@ def frontier_service_update_project_resource_with_http_info(
:type id: str
:param body: (required)
:type body: V1beta1ResourceRequestBody
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_update_project_resource_serialize(
- project_id=project_id,
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateProjectResourceResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1UpdateProjectResourceResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_update_project_resource_without_preload_content(
- self,
- project_id: StrictStr,
- id: StrictStr,
- body: V1beta1ResourceRequestBody,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'project_id',
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Update resource
-
- Updates a resource in a project
-
- :param project_id: (required)
- :type project_id: str
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: V1beta1ResourceRequestBody
- :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._frontier_service_update_project_resource_serialize(
- project_id=project_id,
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateProjectResourceResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_update_project_resource" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_update_project_resource_serialize(
- self,
- project_id,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _collection_formats = {}
- _host = None
+ # process the path parameters
+ _path_params = {}
+ if _params['project_id']:
+ _path_params['projectId'] = _params['project_id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if project_id is not None:
- _path_params['projectId'] = project_id
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='PUT',
- resource_path='/v1beta1/projects/{projectId}/resources/{id}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ _response_types_map = {
+ '200': "V1beta1UpdateProjectResourceResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
+
+ return self.api_client.call_api(
+ '/v1beta1/projects/{projectId}/resources/{id}', 'PUT',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
diff --git a/frontier_api/api/role_api.py b/frontier_api/api/role_api.py
index d2cd89b..2f1faa4 100644
--- a/frontier_api/api/role_api.py
+++ b/frontier_api/api/role_api.py
@@ -13,22 +13,16 @@
""" # noqa: E501
+import re # noqa: F401
import io
import warnings
-from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
-from typing import Dict, List, Optional, Tuple, Union, Any
+from pydantic import validate_arguments, ValidationError
-try:
- from typing import Annotated
-except ImportError:
- from typing_extensions import Annotated
-
-from pydantic import Field
from typing_extensions import Annotated
-from pydantic import StrictStr
+from pydantic import Field, StrictStr, conlist
-from typing import Any, Dict, List, Optional, Union
+from typing import Any, Dict, Optional
from frontier_api.models.v1beta1_create_organization_role_response import V1beta1CreateOrganizationRoleResponse
from frontier_api.models.v1beta1_create_role_response import V1beta1CreateRoleResponse
@@ -41,7 +35,10 @@
from frontier_api.api_client import ApiClient
from frontier_api.api_response import ApiResponse
-from frontier_api.rest import RESTResponseType
+from frontier_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class RoleApi:
@@ -56,1808 +53,939 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client
+ @validate_arguments
+ def admin_service_create_role(self, body : V1beta1RoleRequestBody, **kwargs) -> V1beta1CreateRoleResponse: # noqa: E501
+ """Create platform role # noqa: E501
- @validate_call
- def admin_service_create_role(
- self,
- body: V1beta1RoleRequestBody,
- _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,
- ) -> V1beta1CreateRoleResponse:
- """Create platform role
+ Creates a platform wide role. It can be used to grant permissions to all the resources in a Frontier instance. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Creates a platform wide role. It can be used to grant permissions to all the resources in a Frontier instance.
+ >>> thread = api.admin_service_create_role(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1beta1RoleRequestBody
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CreateRoleResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the admin_service_create_role_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.admin_service_create_role_with_http_info(body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def admin_service_create_role_with_http_info(self, body : V1beta1RoleRequestBody, **kwargs) -> ApiResponse: # noqa: E501
+ """Create platform role # noqa: E501
+
+ Creates a platform wide role. It can be used to grant permissions to all the resources in a Frontier instance. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.admin_service_create_role_with_http_info(body, async_req=True)
+ >>> result = thread.get()
:param body: (required)
:type body: V1beta1RoleRequestBody
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_create_role_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CreateRoleResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method admin_service_create_role" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # set the HTTP header `Content-Type`
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
'200': "V1beta1CreateRoleResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/roles', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- ).data
-
-
- @validate_call
- def admin_service_create_role_with_http_info(
- self,
- body: V1beta1RoleRequestBody,
- _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[V1beta1CreateRoleResponse]:
- """Create platform role
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
- Creates a platform wide role. It can be used to grant permissions to all the resources in a Frontier instance.
+ @validate_arguments
+ def admin_service_delete_role(self, id : Annotated[StrictStr, Field(..., description="The role id to delete.")], **kwargs) -> object: # noqa: E501
+ """Delete platform role # noqa: E501
- :param body: (required)
- :type body: V1beta1RoleRequestBody
+ Delete a platform wide role and all of its relations. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.admin_service_delete_role(id, async_req=True)
+ >>> result = thread.get()
+
+ :param id: The role id to delete. (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the admin_service_delete_role_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.admin_service_delete_role_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def admin_service_delete_role_with_http_info(self, id : Annotated[StrictStr, Field(..., description="The role id to delete.")], **kwargs) -> ApiResponse: # noqa: E501
+ """Delete platform role # noqa: E501
+
+ Delete a platform wide role and all of its relations. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.admin_service_delete_role_with_http_info(id, async_req=True)
+ >>> result = thread.get()
+
+ :param id: The role id to delete. (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_create_role_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateRoleResponse",
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method admin_service_delete_role" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
+
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "object",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/roles/{id}', 'DELETE',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def admin_service_update_role(self, id : Annotated[StrictStr, Field(..., description="The role id to update.")], body : V1beta1RoleRequestBody, **kwargs) -> V1beta1UpdateRoleResponse: # noqa: E501
+ """Update role # noqa: E501
- @validate_call
- def admin_service_create_role_without_preload_content(
- self,
- body: V1beta1RoleRequestBody,
- _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 platform role
+ Update a role title, description and permissions. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.admin_service_update_role(id, body, async_req=True)
+ >>> result = thread.get()
- Creates a platform wide role. It can be used to grant permissions to all the resources in a Frontier instance.
+ :param id: The role id to update. (required)
+ :type id: str
+ :param body: (required)
+ :type body: V1beta1RoleRequestBody
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1UpdateRoleResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the admin_service_update_role_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.admin_service_update_role_with_http_info(id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def admin_service_update_role_with_http_info(self, id : Annotated[StrictStr, Field(..., description="The role id to update.")], body : V1beta1RoleRequestBody, **kwargs) -> ApiResponse: # noqa: E501
+ """Update role # noqa: E501
+
+ Update a role title, description and permissions. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.admin_service_update_role_with_http_info(id, body, async_req=True)
+ >>> result = thread.get()
+ :param id: The role id to update. (required)
+ :type id: str
:param body: (required)
:type body: V1beta1RoleRequestBody
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_create_role_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1UpdateRoleResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateRoleResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ _params = locals()
+ _all_params = [
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
- def _admin_service_create_role_serialize(
- self,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method admin_service_update_role" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1UpdateRoleResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/roles',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/roles/{id}', 'PUT',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_create_organization_role(self, org_id : Annotated[StrictStr, Field(..., description="The organization ID to which the role belongs to.")], body : V1beta1RoleRequestBody, **kwargs) -> V1beta1CreateOrganizationRoleResponse: # noqa: E501
+ """Create organization role # noqa: E501
+ Create a custom role under an organization. This custom role will only be available for assignment to the principles within the organization. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.frontier_service_create_organization_role(org_id, body, async_req=True)
+ >>> result = thread.get()
- @validate_call
- def admin_service_delete_role(
- self,
- id: Annotated[StrictStr, Field(description="The role id to delete.")],
- _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:
- """Delete platform role
-
- Delete a platform wide role and all of its relations.
+ :param org_id: The organization ID to which the role belongs to. (required)
+ :type org_id: str
+ :param body: (required)
+ :type body: V1beta1RoleRequestBody
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CreateOrganizationRoleResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_create_organization_role_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_create_organization_role_with_http_info(org_id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_create_organization_role_with_http_info(self, org_id : Annotated[StrictStr, Field(..., description="The organization ID to which the role belongs to.")], body : V1beta1RoleRequestBody, **kwargs) -> ApiResponse: # noqa: E501
+ """Create organization role # noqa: E501
+
+ Create a custom role under an organization. This custom role will only be available for assignment to the principles within the organization. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_create_organization_role_with_http_info(org_id, body, async_req=True)
+ >>> result = thread.get()
- :param id: The role id to delete. (required)
- :type id: str
+ :param org_id: The organization ID to which the role belongs to. (required)
+ :type org_id: str
+ :param body: (required)
+ :type body: V1beta1RoleRequestBody
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_delete_role_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CreateOrganizationRoleResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'org_id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_create_organization_role" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
+
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # set the HTTP header `Content-Type`
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1CreateOrganizationRoleResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/roles', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- ).data
-
-
- @validate_call
- def admin_service_delete_role_with_http_info(
- self,
- id: Annotated[StrictStr, Field(description="The role id to delete.")],
- _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]:
- """Delete platform role
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
- Delete a platform wide role and all of its relations.
+ @validate_arguments
+ def frontier_service_delete_organization_role(self, org_id : StrictStr, id : StrictStr, **kwargs) -> object: # noqa: E501
+ """Delete organization role # noqa: E501
- :param id: The role id to delete. (required)
+ Delete a custom role and all of its relations under an organization permanently. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_delete_organization_role(org_id, id, async_req=True)
+ >>> result = thread.get()
+
+ :param org_id: (required)
+ :type org_id: str
+ :param id: (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_delete_organization_role_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_delete_organization_role_with_http_info(org_id, id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_delete_organization_role_with_http_info(self, org_id : StrictStr, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """Delete organization role # noqa: E501
+
+ Delete a custom role and all of its relations under an organization permanently. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_delete_organization_role_with_http_info(org_id, id, async_req=True)
+ >>> result = thread.get()
+
+ :param org_id: (required)
+ :type org_id: str
+ :param id: (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_delete_role_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'org_id',
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_delete_organization_role" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
+
+ if _params['id']:
+ _path_params['id'] = _params['id']
+
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
'200': "object",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/roles/{id}', 'DELETE',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_get_organization_role(self, org_id : StrictStr, id : StrictStr, **kwargs) -> V1beta1GetOrganizationRoleResponse: # noqa: E501
+ """Get organization role # noqa: E501
- @validate_call
- def admin_service_delete_role_without_preload_content(
- self,
- id: Annotated[StrictStr, Field(description="The role id to delete.")],
- _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:
- """Delete platform role
+ Returns a custom role under an organization along with its associated permissions # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Delete a platform wide role and all of its relations.
+ >>> thread = api.frontier_service_get_organization_role(org_id, id, async_req=True)
+ >>> result = thread.get()
- :param id: The role id to delete. (required)
+ :param org_id: (required)
+ :type org_id: str
+ :param id: (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1GetOrganizationRoleResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_get_organization_role_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_get_organization_role_with_http_info(org_id, id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_get_organization_role_with_http_info(self, org_id : StrictStr, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """Get organization role # noqa: E501
+
+ Returns a custom role under an organization along with its associated permissions # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_get_organization_role_with_http_info(org_id, id, async_req=True)
+ >>> result = thread.get()
+
+ :param org_id: (required)
+ :type org_id: str
+ :param id: (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_delete_role_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1GetOrganizationRoleResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
+ _params = locals()
+
+ _all_params = [
+ 'org_id',
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_get_organization_role" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _admin_service_delete_role_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _collection_formats = {}
- _host = None
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1GetOrganizationRoleResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='DELETE',
- resource_path='/v1beta1/roles/{id}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/roles/{id}', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_organization_roles(self, org_id : StrictStr, state : Optional[StrictStr] = None, scopes : Optional[conlist(StrictStr)] = None, **kwargs) -> V1beta1ListOrganizationRolesResponse: # noqa: E501
+ """List organization roles # noqa: E501
+ Returns a list of custom roles created under an organization with their associated permissions # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def admin_service_update_role(
- self,
- id: Annotated[StrictStr, Field(description="The role id to update.")],
- body: V1beta1RoleRequestBody,
- _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,
- ) -> V1beta1UpdateRoleResponse:
- """Update role
-
- Update a role title, description and permissions.
-
- :param id: The role id to update. (required)
- :type id: str
- :param body: (required)
- :type body: V1beta1RoleRequestBody
- :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._admin_service_update_role_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateRoleResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 admin_service_update_role_with_http_info(
- self,
- id: Annotated[StrictStr, Field(description="The role id to update.")],
- body: V1beta1RoleRequestBody,
- _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[V1beta1UpdateRoleResponse]:
- """Update role
-
- Update a role title, description and permissions.
-
- :param id: The role id to update. (required)
- :type id: str
- :param body: (required)
- :type body: V1beta1RoleRequestBody
- :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._admin_service_update_role_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateRoleResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 admin_service_update_role_without_preload_content(
- self,
- id: Annotated[StrictStr, Field(description="The role id to update.")],
- body: V1beta1RoleRequestBody,
- _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:
- """Update role
-
- Update a role title, description and permissions.
-
- :param id: The role id to update. (required)
- :type id: str
- :param body: (required)
- :type body: V1beta1RoleRequestBody
- :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._admin_service_update_role_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateRoleResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _admin_service_update_role_serialize(
- self,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
- if body is not None:
- _body_params = body
-
-
- # 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] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='PUT',
- resource_path='/v1beta1/roles/{id}',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_create_organization_role(
- self,
- org_id: Annotated[StrictStr, Field(description="The organization ID to which the role belongs to.")],
- body: V1beta1RoleRequestBody,
- _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,
- ) -> V1beta1CreateOrganizationRoleResponse:
- """Create organization role
-
- Create a custom role under an organization. This custom role will only be available for assignment to the principles within the organization.
-
- :param org_id: The organization ID to which the role belongs to. (required)
- :type org_id: str
- :param body: (required)
- :type body: V1beta1RoleRequestBody
- :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._frontier_service_create_organization_role_serialize(
- org_id=org_id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateOrganizationRoleResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_organization_role_with_http_info(
- self,
- org_id: Annotated[StrictStr, Field(description="The organization ID to which the role belongs to.")],
- body: V1beta1RoleRequestBody,
- _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[V1beta1CreateOrganizationRoleResponse]:
- """Create organization role
-
- Create a custom role under an organization. This custom role will only be available for assignment to the principles within the organization.
-
- :param org_id: The organization ID to which the role belongs to. (required)
- :type org_id: str
- :param body: (required)
- :type body: V1beta1RoleRequestBody
- :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._frontier_service_create_organization_role_serialize(
- org_id=org_id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateOrganizationRoleResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_organization_role_without_preload_content(
- self,
- org_id: Annotated[StrictStr, Field(description="The organization ID to which the role belongs to.")],
- body: V1beta1RoleRequestBody,
- _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 organization role
-
- Create a custom role under an organization. This custom role will only be available for assignment to the principles within the organization.
-
- :param org_id: The organization ID to which the role belongs to. (required)
- :type org_id: str
- :param body: (required)
- :type body: V1beta1RoleRequestBody
- :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._frontier_service_create_organization_role_serialize(
- org_id=org_id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateOrganizationRoleResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_create_organization_role_serialize(
- self,
- org_id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
- if body is not None:
- _body_params = body
-
-
- # 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] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/organizations/{orgId}/roles',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_delete_organization_role(
- self,
- org_id: StrictStr,
- id: StrictStr,
- _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:
- """Delete organization role
-
- Delete a custom role and all of its relations under an organization permanently.
-
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :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._frontier_service_delete_organization_role_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_delete_organization_role_with_http_info(
- self,
- org_id: StrictStr,
- id: StrictStr,
- _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]:
- """Delete organization role
-
- Delete a custom role and all of its relations under an organization permanently.
-
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :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._frontier_service_delete_organization_role_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_delete_organization_role_without_preload_content(
- self,
- org_id: StrictStr,
- id: StrictStr,
- _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:
- """Delete organization role
-
- Delete a custom role and all of its relations under an organization permanently.
-
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :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._frontier_service_delete_organization_role_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_delete_organization_role_serialize(
- self,
- org_id,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='DELETE',
- resource_path='/v1beta1/organizations/{orgId}/roles/{id}',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_get_organization_role(
- self,
- org_id: StrictStr,
- id: StrictStr,
- _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,
- ) -> V1beta1GetOrganizationRoleResponse:
- """Get organization role
-
- Returns a custom role under an organization along with its associated permissions
-
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :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._frontier_service_get_organization_role_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetOrganizationRoleResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_organization_role_with_http_info(
- self,
- org_id: StrictStr,
- id: StrictStr,
- _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[V1beta1GetOrganizationRoleResponse]:
- """Get organization role
-
- Returns a custom role under an organization along with its associated permissions
-
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :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._frontier_service_get_organization_role_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetOrganizationRoleResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_organization_role_without_preload_content(
- self,
- org_id: StrictStr,
- id: StrictStr,
- _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:
- """Get organization role
-
- Returns a custom role under an organization along with its associated permissions
-
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :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._frontier_service_get_organization_role_serialize(
- org_id=org_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetOrganizationRoleResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_get_organization_role_serialize(
- self,
- org_id,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/organizations/{orgId}/roles/{id}',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_list_organization_roles(
- self,
- org_id: StrictStr,
- state: Optional[StrictStr] = None,
- scopes: Optional[List[StrictStr]] = None,
- _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,
- ) -> V1beta1ListOrganizationRolesResponse:
- """List organization roles
-
- Returns a list of custom roles created under an organization with their associated permissions
+ >>> thread = api.frontier_service_list_organization_roles(org_id, state, scopes, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
@@ -1865,81 +993,33 @@ def frontier_service_list_organization_roles(
:type state: str
:param scopes:
:type scopes: List[str]
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_organization_roles_serialize(
- org_id=org_id,
- state=state,
- scopes=scopes,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationRolesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_organization_roles_with_http_info(
- self,
- org_id: StrictStr,
- state: Optional[StrictStr] = None,
- scopes: Optional[List[StrictStr]] = None,
- _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[V1beta1ListOrganizationRolesResponse]:
- """List organization roles
-
- Returns a list of custom roles created under an organization with their associated permissions
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListOrganizationRolesResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_organization_roles_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_organization_roles_with_http_info(org_id, state, scopes, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_organization_roles_with_http_info(self, org_id : StrictStr, state : Optional[StrictStr] = None, scopes : Optional[conlist(StrictStr)] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """List organization roles # noqa: E501
+
+ Returns a list of custom roles created under an organization with their associated permissions # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_organization_roles_with_http_info(org_id, state, scopes, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
@@ -1947,532 +1027,281 @@ def frontier_service_list_organization_roles_with_http_info(
:type state: str
:param scopes:
:type scopes: List[str]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_organization_roles_serialize(
- org_id=org_id,
- state=state,
- scopes=scopes,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationRolesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListOrganizationRolesResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_list_organization_roles_without_preload_content(
- self,
- org_id: StrictStr,
- state: Optional[StrictStr] = None,
- scopes: Optional[List[StrictStr]] = None,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'org_id',
+ 'state',
+ 'scopes'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """List organization roles
-
- Returns a list of custom roles created under an organization with their associated permissions
-
- :param org_id: (required)
- :type org_id: str
- :param state:
- :type state: str
- :param scopes:
- :type scopes: List[str]
- :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._frontier_service_list_organization_roles_serialize(
- org_id=org_id,
- state=state,
- scopes=scopes,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationRolesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_organization_roles" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+ _collection_formats = {}
- def _frontier_service_list_organization_roles_serialize(
- self,
- org_id,
- state,
- scopes,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _host = None
- _collection_formats: Dict[str, str] = {
-
- 'scopes': 'multi',
- }
+ # process the query parameters
+ _query_params = []
+ if _params.get('state') is not None: # noqa: E501
+ _query_params.append(('state', _params['state']))
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ if _params.get('scopes') is not None: # noqa: E501
+ _query_params.append(('scopes', _params['scopes']))
+ _collection_formats['scopes'] = 'multi'
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- # process the query parameters
- if state is not None:
-
- _query_params.append(('state', state))
-
- if scopes is not None:
-
- _query_params.append(('scopes', scopes))
-
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListOrganizationRolesResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/organizations/{orgId}/roles',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/roles', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_roles(self, state : Optional[StrictStr] = None, scopes : Optional[conlist(StrictStr)] = None, **kwargs) -> V1beta1ListRolesResponse: # noqa: E501
+ """List platform roles # noqa: E501
+ Returns a list of platform wide roles available in enitre Frontier instance along with their associated permissions # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_list_roles(
- self,
- state: Optional[StrictStr] = None,
- scopes: Optional[List[StrictStr]] = None,
- _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,
- ) -> V1beta1ListRolesResponse:
- """List platform roles
-
- Returns a list of platform wide roles available in enitre Frontier instance along with their associated permissions
+ >>> thread = api.frontier_service_list_roles(state, scopes, async_req=True)
+ >>> result = thread.get()
:param state:
:type state: str
:param scopes:
:type scopes: List[str]
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_roles_serialize(
- state=state,
- scopes=scopes,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListRolesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_roles_with_http_info(
- self,
- state: Optional[StrictStr] = None,
- scopes: Optional[List[StrictStr]] = None,
- _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[V1beta1ListRolesResponse]:
- """List platform roles
-
- Returns a list of platform wide roles available in enitre Frontier instance along with their associated permissions
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListRolesResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_roles_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_roles_with_http_info(state, scopes, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_roles_with_http_info(self, state : Optional[StrictStr] = None, scopes : Optional[conlist(StrictStr)] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """List platform roles # noqa: E501
+
+ Returns a list of platform wide roles available in enitre Frontier instance along with their associated permissions # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_roles_with_http_info(state, scopes, async_req=True)
+ >>> result = thread.get()
:param state:
:type state: str
:param scopes:
:type scopes: List[str]
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_roles_serialize(
- state=state,
- scopes=scopes,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListRolesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListRolesResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_list_roles_without_preload_content(
- self,
- state: Optional[StrictStr] = None,
- scopes: Optional[List[StrictStr]] = None,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'state',
+ 'scopes'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """List platform roles
-
- Returns a list of platform wide roles available in enitre Frontier instance along with their associated permissions
-
- :param state:
- :type state: str
- :param scopes:
- :type scopes: List[str]
- :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._frontier_service_list_roles_serialize(
- state=state,
- scopes=scopes,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListRolesResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
)
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_roles" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_list_roles_serialize(
- self,
- state,
- scopes,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _collection_formats = {}
- _host = None
+ # process the path parameters
+ _path_params = {}
- _collection_formats: Dict[str, str] = {
-
- 'scopes': 'multi',
- }
+ # process the query parameters
+ _query_params = []
+ if _params.get('state') is not None: # noqa: E501
+ _query_params.append(('state', _params['state']))
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ if _params.get('scopes') is not None: # noqa: E501
+ _query_params.append(('scopes', _params['scopes']))
+ _collection_formats['scopes'] = 'multi'
- # process the path parameters
- # process the query parameters
- if state is not None:
-
- _query_params.append(('state', state))
-
- if scopes is not None:
-
- _query_params.append(('scopes', scopes))
-
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListRolesResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/roles',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/roles', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_update_organization_role(self, org_id : StrictStr, id : StrictStr, body : V1beta1RoleRequestBody, **kwargs) -> V1beta1UpdateOrganizationRoleResponse: # noqa: E501
+ """Update organization role # noqa: E501
- @validate_call
- def frontier_service_update_organization_role(
- self,
- org_id: StrictStr,
- id: StrictStr,
- body: V1beta1RoleRequestBody,
- _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,
- ) -> V1beta1UpdateOrganizationRoleResponse:
- """Update organization role
+ Update a custom role under an organization. This custom role will only be available for assignment to the principles within the organization. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Update a custom role under an organization. This custom role will only be available for assignment to the principles within the organization.
+ >>> thread = api.frontier_service_update_organization_role(org_id, id, body, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
@@ -2480,81 +1309,33 @@ def frontier_service_update_organization_role(
:type id: str
:param body: (required)
:type body: V1beta1RoleRequestBody
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_update_organization_role_serialize(
- org_id=org_id,
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateOrganizationRoleResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_update_organization_role_with_http_info(
- self,
- org_id: StrictStr,
- id: StrictStr,
- body: V1beta1RoleRequestBody,
- _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[V1beta1UpdateOrganizationRoleResponse]:
- """Update organization role
-
- Update a custom role under an organization. This custom role will only be available for assignment to the principles within the organization.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1UpdateOrganizationRoleResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_update_organization_role_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_update_organization_role_with_http_info(org_id, id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_update_organization_role_with_http_info(self, org_id : StrictStr, id : StrictStr, body : V1beta1RoleRequestBody, **kwargs) -> ApiResponse: # noqa: E501
+ """Update organization role # noqa: E501
+
+ Update a custom role under an organization. This custom role will only be available for assignment to the principles within the organization. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_update_organization_role_with_http_info(org_id, id, body, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
@@ -2562,213 +1343,119 @@ def frontier_service_update_organization_role_with_http_info(
:type id: str
:param body: (required)
:type body: V1beta1RoleRequestBody
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_update_organization_role_serialize(
- org_id=org_id,
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateOrganizationRoleResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1UpdateOrganizationRoleResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_update_organization_role_without_preload_content(
- self,
- org_id: StrictStr,
- id: StrictStr,
- body: V1beta1RoleRequestBody,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'org_id',
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Update organization role
-
- Update a custom role under an organization. This custom role will only be available for assignment to the principles within the organization.
-
- :param org_id: (required)
- :type org_id: str
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: V1beta1RoleRequestBody
- :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._frontier_service_update_organization_role_serialize(
- org_id=org_id,
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateOrganizationRoleResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
)
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_update_organization_role" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_update_organization_role_serialize(
- self,
- org_id,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _collection_formats = {}
- _host = None
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1UpdateOrganizationRoleResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='PUT',
- resource_path='/v1beta1/organizations/{orgId}/roles/{id}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/roles/{id}', 'PUT',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
diff --git a/frontier_api/api/service_user_api.py b/frontier_api/api/service_user_api.py
index 0453366..1ef8188 100644
--- a/frontier_api/api/service_user_api.py
+++ b/frontier_api/api/service_user_api.py
@@ -13,22 +13,16 @@
""" # noqa: E501
+import re # noqa: F401
import io
import warnings
-from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
-from typing import Dict, List, Optional, Tuple, Union, Any
+from pydantic import validate_arguments, ValidationError
-try:
- from typing import Annotated
-except ImportError:
- from typing_extensions import Annotated
-
-from pydantic import Field
from typing_extensions import Annotated
-from pydantic import StrictStr
+from pydantic import Field, StrictStr
-from typing import Any, Dict, Optional, Union
+from typing import Any, Dict, Optional
from frontier_api.models.frontier_service_create_service_user_key_request import FrontierServiceCreateServiceUserKeyRequest
from frontier_api.models.v1beta1_create_service_user_key_response import V1beta1CreateServiceUserKeyResponse
@@ -43,7 +37,10 @@
from frontier_api.api_client import ApiClient
from frontier_api.api_response import ApiResponse
-from frontier_api.rest import RESTResponseType
+from frontier_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class ServiceUserApi:
@@ -58,3232 +55,1674 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client
+ @validate_arguments
+ def frontier_service_create_service_user(self, body : V1beta1CreateServiceUserRequest, **kwargs) -> V1beta1CreateServiceUserResponse: # noqa: E501
+ """Create service user # noqa: E501
- @validate_call
- def frontier_service_create_service_user(
- self,
- body: V1beta1CreateServiceUserRequest,
- _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,
- ) -> V1beta1CreateServiceUserResponse:
- """Create service user
+ Create a service user. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Create a service user.
+ >>> thread = api.frontier_service_create_service_user(body, async_req=True)
+ >>> result = thread.get()
:param body: (required)
:type body: V1beta1CreateServiceUserRequest
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_service_user_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateServiceUserResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_service_user_with_http_info(
- self,
- body: V1beta1CreateServiceUserRequest,
- _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[V1beta1CreateServiceUserResponse]:
- """Create service user
-
- Create a service user.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CreateServiceUserResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_create_service_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_create_service_user_with_http_info(body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_create_service_user_with_http_info(self, body : V1beta1CreateServiceUserRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Create service user # noqa: E501
+
+ Create a service user. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_create_service_user_with_http_info(body, async_req=True)
+ >>> result = thread.get()
:param body: (required)
:type body: V1beta1CreateServiceUserRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_service_user_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CreateServiceUserResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_create_service_user" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # set the HTTP header `Content-Type`
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
'200': "V1beta1CreateServiceUserResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/serviceusers', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_create_service_user_key(self, id : Annotated[StrictStr, Field(..., description="The unique ID of the service user to create a key for.")], body : FrontierServiceCreateServiceUserKeyRequest, **kwargs) -> V1beta1CreateServiceUserKeyResponse: # noqa: E501
+ """Create service user key # noqa: E501
- @validate_call
- def frontier_service_create_service_user_without_preload_content(
- self,
- body: V1beta1CreateServiceUserRequest,
- _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 service user
+ Generate a service user key and return it, the private key part of the response will not be persisted and should be kept securely by client. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Create a service user.
+ >>> thread = api.frontier_service_create_service_user_key(id, body, async_req=True)
+ >>> result = thread.get()
+ :param id: The unique ID of the service user to create a key for. (required)
+ :type id: str
:param body: (required)
- :type body: V1beta1CreateServiceUserRequest
+ :type body: FrontierServiceCreateServiceUserKeyRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CreateServiceUserKeyResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_create_service_user_key_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_create_service_user_key_with_http_info(id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_create_service_user_key_with_http_info(self, id : Annotated[StrictStr, Field(..., description="The unique ID of the service user to create a key for.")], body : FrontierServiceCreateServiceUserKeyRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Create service user key # noqa: E501
+
+ Generate a service user key and return it, the private key part of the response will not be persisted and should be kept securely by client. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_create_service_user_key_with_http_info(id, body, async_req=True)
+ >>> result = thread.get()
+
+ :param id: The unique ID of the service user to create a key for. (required)
+ :type id: str
+ :param body: (required)
+ :type body: FrontierServiceCreateServiceUserKeyRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_service_user_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CreateServiceUserKeyResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateServiceUserResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ _params = locals()
+ _all_params = [
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
- def _frontier_service_create_service_user_serialize(
- self,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_create_service_user_key" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1CreateServiceUserKeyResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/serviceusers',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/serviceusers/{id}/keys', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_create_service_user_secret(self, id : Annotated[StrictStr, Field(..., description="The unique ID of the service user to create a key for.")], body : FrontierServiceCreateServiceUserKeyRequest, **kwargs) -> V1beta1CreateServiceUserSecretResponse: # noqa: E501
+ """Create service user secret # noqa: E501
+ Generate a service user secret and return it. The secret value will not be persisted and should be securely stored by client. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_create_service_user_key(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the service user to create a key for.")],
- body: FrontierServiceCreateServiceUserKeyRequest,
- _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,
- ) -> V1beta1CreateServiceUserKeyResponse:
- """Create service user key
+ >>> thread = api.frontier_service_create_service_user_secret(id, body, async_req=True)
+ >>> result = thread.get()
- Generate a service user key and return it, the private key part of the response will not be persisted and should be kept securely by client.
+ :param id: The unique ID of the service user to create a key for. (required)
+ :type id: str
+ :param body: (required)
+ :type body: FrontierServiceCreateServiceUserKeyRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CreateServiceUserSecretResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_create_service_user_secret_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_create_service_user_secret_with_http_info(id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_create_service_user_secret_with_http_info(self, id : Annotated[StrictStr, Field(..., description="The unique ID of the service user to create a key for.")], body : FrontierServiceCreateServiceUserKeyRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Create service user secret # noqa: E501
+
+ Generate a service user secret and return it. The secret value will not be persisted and should be securely stored by client. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_create_service_user_secret_with_http_info(id, body, async_req=True)
+ >>> result = thread.get()
:param id: The unique ID of the service user to create a key for. (required)
:type id: str
:param body: (required)
:type body: FrontierServiceCreateServiceUserKeyRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_service_user_key_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CreateServiceUserSecretResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateServiceUserKeyResponse",
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_create_service_user_secret" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
+
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # set the HTTP header `Content-Type`
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1CreateServiceUserSecretResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/serviceusers/{id}/secrets', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- ).data
-
-
- @validate_call
- def frontier_service_create_service_user_key_with_http_info(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the service user to create a key for.")],
- body: FrontierServiceCreateServiceUserKeyRequest,
- _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[V1beta1CreateServiceUserKeyResponse]:
- """Create service user key
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
- Generate a service user key and return it, the private key part of the response will not be persisted and should be kept securely by client.
+ @validate_arguments
+ def frontier_service_delete_service_user(self, id : Annotated[StrictStr, Field(..., description="The unique ID of the service user to delete.")], org_id : Optional[StrictStr] = None, **kwargs) -> object: # noqa: E501
+ """Delete service user # noqa: E501
- :param id: The unique ID of the service user to create a key for. (required)
+ Delete a service user permanently and all of its relations (keys, organizations, roles, etc) # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_delete_service_user(id, org_id, async_req=True)
+ >>> result = thread.get()
+
+ :param id: The unique ID of the service user to delete. (required)
:type id: str
- :param body: (required)
- :type body: FrontierServiceCreateServiceUserKeyRequest
+ :param org_id:
+ :type org_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_delete_service_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_delete_service_user_with_http_info(id, org_id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_delete_service_user_with_http_info(self, id : Annotated[StrictStr, Field(..., description="The unique ID of the service user to delete.")], org_id : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """Delete service user # noqa: E501
+
+ Delete a service user permanently and all of its relations (keys, organizations, roles, etc) # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_delete_service_user_with_http_info(id, org_id, async_req=True)
+ >>> result = thread.get()
+
+ :param id: The unique ID of the service user to delete. (required)
+ :type id: str
+ :param org_id:
+ :type org_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_service_user_key_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'id',
+ 'org_id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateServiceUserKeyResponse",
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_delete_service_user" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
+
+
+ # process the query parameters
+ _query_params = []
+ if _params.get('org_id') is not None: # noqa: E501
+ _query_params.append(('orgId', _params['org_id']))
+
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "object",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/serviceusers/{id}', 'DELETE',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_delete_service_user_key(self, id : Annotated[StrictStr, Field(..., description="The unique ID of the service user to delete a key for.")], key_id : Annotated[StrictStr, Field(..., description="The unique ID of the key to delete.")], **kwargs) -> object: # noqa: E501
+ """Delete service user key # noqa: E501
- @validate_call
- def frontier_service_create_service_user_key_without_preload_content(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the service user to create a key for.")],
- body: FrontierServiceCreateServiceUserKeyRequest,
- _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 service user key
+ Delete a service user key permanently. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Generate a service user key and return it, the private key part of the response will not be persisted and should be kept securely by client.
+ >>> thread = api.frontier_service_delete_service_user_key(id, key_id, async_req=True)
+ >>> result = thread.get()
- :param id: The unique ID of the service user to create a key for. (required)
+ :param id: The unique ID of the service user to delete a key for. (required)
:type id: str
- :param body: (required)
- :type body: FrontierServiceCreateServiceUserKeyRequest
+ :param key_id: The unique ID of the key to delete. (required)
+ :type key_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_delete_service_user_key_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_delete_service_user_key_with_http_info(id, key_id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_delete_service_user_key_with_http_info(self, id : Annotated[StrictStr, Field(..., description="The unique ID of the service user to delete a key for.")], key_id : Annotated[StrictStr, Field(..., description="The unique ID of the key to delete.")], **kwargs) -> ApiResponse: # noqa: E501
+ """Delete service user key # noqa: E501
+
+ Delete a service user key permanently. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_delete_service_user_key_with_http_info(id, key_id, async_req=True)
+ >>> result = thread.get()
+
+ :param id: The unique ID of the service user to delete a key for. (required)
+ :type id: str
+ :param key_id: The unique ID of the key to delete. (required)
+ :type key_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_service_user_key_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateServiceUserKeyResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
+ _params = locals()
+
+ _all_params = [
+ 'id',
+ 'key_id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_delete_service_user_key" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_create_service_user_key_serialize(
- self,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _collection_formats = {}
- _host = None
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['key_id']:
+ _path_params['keyId'] = _params['key_id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
-
+ _body_params = None
# 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
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "object",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/serviceusers/{id}/keys',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/serviceusers/{id}/keys/{keyId}', 'DELETE',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_delete_service_user_secret(self, id : Annotated[StrictStr, Field(..., description="The unique ID of the service user to delete a secret for.")], secret_id : Annotated[StrictStr, Field(..., description="The unique ID of the secret to delete.")], **kwargs) -> object: # noqa: E501
+ """Delete service user secret # noqa: E501
+ Delete a service user secret credential. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.frontier_service_delete_service_user_secret(id, secret_id, async_req=True)
+ >>> result = thread.get()
- @validate_call
- def frontier_service_create_service_user_secret(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the service user to create a key for.")],
- body: FrontierServiceCreateServiceUserKeyRequest,
- _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,
- ) -> V1beta1CreateServiceUserSecretResponse:
- """Create service user secret
-
- Generate a service user secret and return it. The secret value will not be persisted and should be securely stored by client.
+ :param id: The unique ID of the service user to delete a secret for. (required)
+ :type id: str
+ :param secret_id: The unique ID of the secret to delete. (required)
+ :type secret_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_delete_service_user_secret_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_delete_service_user_secret_with_http_info(id, secret_id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_delete_service_user_secret_with_http_info(self, id : Annotated[StrictStr, Field(..., description="The unique ID of the service user to delete a secret for.")], secret_id : Annotated[StrictStr, Field(..., description="The unique ID of the secret to delete.")], **kwargs) -> ApiResponse: # noqa: E501
+ """Delete service user secret # noqa: E501
+
+ Delete a service user secret credential. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_delete_service_user_secret_with_http_info(id, secret_id, async_req=True)
+ >>> result = thread.get()
- :param id: The unique ID of the service user to create a key for. (required)
+ :param id: The unique ID of the service user to delete a secret for. (required)
:type id: str
- :param body: (required)
- :type body: FrontierServiceCreateServiceUserKeyRequest
+ :param secret_id: The unique ID of the secret to delete. (required)
+ :type secret_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_service_user_secret_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateServiceUserSecretResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_service_user_secret_with_http_info(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the service user to create a key for.")],
- body: FrontierServiceCreateServiceUserKeyRequest,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _params = locals()
+
+ _all_params = [
+ 'id',
+ 'secret_id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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[V1beta1CreateServiceUserSecretResponse]:
- """Create service user secret
+ )
- Generate a service user secret and return it. The secret value will not be persisted and should be securely stored by client.
-
- :param id: The unique ID of the service user to create a key for. (required)
- :type id: str
- :param body: (required)
- :type body: FrontierServiceCreateServiceUserKeyRequest
- :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._frontier_service_create_service_user_secret_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateServiceUserSecretResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_service_user_secret_without_preload_content(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the service user to create a key for.")],
- body: FrontierServiceCreateServiceUserKeyRequest,
- _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 service user secret
-
- Generate a service user secret and return it. The secret value will not be persisted and should be securely stored by client.
-
- :param id: The unique ID of the service user to create a key for. (required)
- :type id: str
- :param body: (required)
- :type body: FrontierServiceCreateServiceUserKeyRequest
- :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._frontier_service_create_service_user_secret_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateServiceUserSecretResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_create_service_user_secret_serialize(
- self,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
- if body is not None:
- _body_params = body
-
-
- # 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] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/serviceusers/{id}/secrets',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_delete_service_user(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the service user to delete.")],
- org_id: Optional[StrictStr] = None,
- _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:
- """Delete service user
-
- Delete a service user permanently and all of its relations (keys, organizations, roles, etc)
-
- :param id: The unique ID of the service user to delete. (required)
- :type id: str
- :param org_id:
- :type org_id: str
- :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._frontier_service_delete_service_user_serialize(
- id=id,
- org_id=org_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_delete_service_user_with_http_info(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the service user to delete.")],
- org_id: Optional[StrictStr] = None,
- _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]:
- """Delete service user
-
- Delete a service user permanently and all of its relations (keys, organizations, roles, etc)
-
- :param id: The unique ID of the service user to delete. (required)
- :type id: str
- :param org_id:
- :type org_id: str
- :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._frontier_service_delete_service_user_serialize(
- id=id,
- org_id=org_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_delete_service_user_without_preload_content(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the service user to delete.")],
- org_id: Optional[StrictStr] = None,
- _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:
- """Delete service user
-
- Delete a service user permanently and all of its relations (keys, organizations, roles, etc)
-
- :param id: The unique ID of the service user to delete. (required)
- :type id: str
- :param org_id:
- :type org_id: str
- :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._frontier_service_delete_service_user_serialize(
- id=id,
- org_id=org_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_delete_service_user_serialize(
- self,
- id,
- org_id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- if org_id is not None:
-
- _query_params.append(('orgId', org_id))
-
- # process the header parameters
- # process the form parameters
- # process the body parameter
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='DELETE',
- resource_path='/v1beta1/serviceusers/{id}',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_delete_service_user_key(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the service user to delete a key for.")],
- key_id: Annotated[StrictStr, Field(description="The unique ID of the key to delete.")],
- _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:
- """Delete service user key
-
- Delete a service user key permanently.
-
- :param id: The unique ID of the service user to delete a key for. (required)
- :type id: str
- :param key_id: The unique ID of the key to delete. (required)
- :type key_id: str
- :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._frontier_service_delete_service_user_key_serialize(
- id=id,
- key_id=key_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_delete_service_user_key_with_http_info(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the service user to delete a key for.")],
- key_id: Annotated[StrictStr, Field(description="The unique ID of the key to delete.")],
- _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]:
- """Delete service user key
-
- Delete a service user key permanently.
-
- :param id: The unique ID of the service user to delete a key for. (required)
- :type id: str
- :param key_id: The unique ID of the key to delete. (required)
- :type key_id: str
- :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._frontier_service_delete_service_user_key_serialize(
- id=id,
- key_id=key_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_delete_service_user_key_without_preload_content(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the service user to delete a key for.")],
- key_id: Annotated[StrictStr, Field(description="The unique ID of the key to delete.")],
- _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:
- """Delete service user key
-
- Delete a service user key permanently.
-
- :param id: The unique ID of the service user to delete a key for. (required)
- :type id: str
- :param key_id: The unique ID of the key to delete. (required)
- :type key_id: str
- :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._frontier_service_delete_service_user_key_serialize(
- id=id,
- key_id=key_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_delete_service_user_key_serialize(
- self,
- id,
- key_id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
- if key_id is not None:
- _path_params['keyId'] = key_id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='DELETE',
- resource_path='/v1beta1/serviceusers/{id}/keys/{keyId}',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_delete_service_user_secret(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the service user to delete a secret for.")],
- secret_id: Annotated[StrictStr, Field(description="The unique ID of the secret to delete.")],
- _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:
- """Delete service user secret
-
- Delete a service user secret credential.
-
- :param id: The unique ID of the service user to delete a secret for. (required)
- :type id: str
- :param secret_id: The unique ID of the secret to delete. (required)
- :type secret_id: str
- :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._frontier_service_delete_service_user_secret_serialize(
- id=id,
- secret_id=secret_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_delete_service_user_secret_with_http_info(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the service user to delete a secret for.")],
- secret_id: Annotated[StrictStr, Field(description="The unique ID of the secret to delete.")],
- _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]:
- """Delete service user secret
-
- Delete a service user secret credential.
-
- :param id: The unique ID of the service user to delete a secret for. (required)
- :type id: str
- :param secret_id: The unique ID of the secret to delete. (required)
- :type secret_id: str
- :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._frontier_service_delete_service_user_secret_serialize(
- id=id,
- secret_id=secret_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_delete_service_user_secret_without_preload_content(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the service user to delete a secret for.")],
- secret_id: Annotated[StrictStr, Field(description="The unique ID of the secret to delete.")],
- _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:
- """Delete service user secret
-
- Delete a service user secret credential.
-
- :param id: The unique ID of the service user to delete a secret for. (required)
- :type id: str
- :param secret_id: The unique ID of the secret to delete. (required)
- :type secret_id: str
- :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._frontier_service_delete_service_user_secret_serialize(
- id=id,
- secret_id=secret_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_delete_service_user_secret_serialize(
- self,
- id,
- secret_id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
- if secret_id is not None:
- _path_params['secretId'] = secret_id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_delete_service_user_secret" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='DELETE',
- resource_path='/v1beta1/serviceusers/{id}/secrets/{secretId}',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_get_service_user(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the service user to get.")],
- _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,
- ) -> V1beta1GetServiceUserResponse:
- """Get service user
-
- Get service user details by its id.
-
- :param id: The unique ID of the service user to get. (required)
- :type id: str
- :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._frontier_service_get_service_user_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetServiceUserResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_service_user_with_http_info(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the service user to get.")],
- _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[V1beta1GetServiceUserResponse]:
- """Get service user
-
- Get service user details by its id.
-
- :param id: The unique ID of the service user to get. (required)
- :type id: str
- :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._frontier_service_get_service_user_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetServiceUserResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_service_user_without_preload_content(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the service user to get.")],
- _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:
- """Get service user
-
- Get service user details by its id.
-
- :param id: The unique ID of the service user to get. (required)
- :type id: str
- :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._frontier_service_get_service_user_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetServiceUserResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_get_service_user_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/serviceusers/{id}',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_get_service_user_key(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the service user to get a key for.")],
- key_id: Annotated[StrictStr, Field(description="The unique ID of the key to get.")],
- _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,
- ) -> V1beta1GetServiceUserKeyResponse:
- """Get service user key
-
- Get a service user public RSA JWK set.
-
- :param id: The unique ID of the service user to get a key for. (required)
- :type id: str
- :param key_id: The unique ID of the key to get. (required)
- :type key_id: str
- :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._frontier_service_get_service_user_key_serialize(
- id=id,
- key_id=key_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetServiceUserKeyResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_service_user_key_with_http_info(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the service user to get a key for.")],
- key_id: Annotated[StrictStr, Field(description="The unique ID of the key to get.")],
- _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[V1beta1GetServiceUserKeyResponse]:
- """Get service user key
-
- Get a service user public RSA JWK set.
-
- :param id: The unique ID of the service user to get a key for. (required)
- :type id: str
- :param key_id: The unique ID of the key to get. (required)
- :type key_id: str
- :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._frontier_service_get_service_user_key_serialize(
- id=id,
- key_id=key_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetServiceUserKeyResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_service_user_key_without_preload_content(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the service user to get a key for.")],
- key_id: Annotated[StrictStr, Field(description="The unique ID of the key to get.")],
- _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:
- """Get service user key
-
- Get a service user public RSA JWK set.
-
- :param id: The unique ID of the service user to get a key for. (required)
- :type id: str
- :param key_id: The unique ID of the key to get. (required)
- :type key_id: str
- :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._frontier_service_get_service_user_key_serialize(
- id=id,
- key_id=key_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetServiceUserKeyResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_get_service_user_key_serialize(
- self,
- id,
- key_id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _host = None
+ if _params['secret_id']:
+ _path_params['secretId'] = _params['secret_id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
- if key_id is not None:
- _path_params['keyId'] = key_id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/serviceusers/{id}/keys/{keyId}',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_list_service_user_keys(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the service user to list keys for.")],
- _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,
- ) -> V1beta1ListServiceUserKeysResponse:
- """List service user keys
-
- List all the keys of a service user with its details except jwk.
-
- :param id: The unique ID of the service user to list keys for. (required)
- :type id: str
- :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._frontier_service_list_service_user_keys_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListServiceUserKeysResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_service_user_keys_with_http_info(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the service user to list keys for.")],
- _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[V1beta1ListServiceUserKeysResponse]:
- """List service user keys
-
- List all the keys of a service user with its details except jwk.
-
- :param id: The unique ID of the service user to list keys for. (required)
- :type id: str
- :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._frontier_service_list_service_user_keys_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListServiceUserKeysResponse",
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "object",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/serviceusers/{id}/secrets/{secretId}', 'DELETE',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_get_service_user(self, id : Annotated[StrictStr, Field(..., description="The unique ID of the service user to get.")], **kwargs) -> V1beta1GetServiceUserResponse: # noqa: E501
+ """Get service user # noqa: E501
- @validate_call
- def frontier_service_list_service_user_keys_without_preload_content(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the service user to list keys for.")],
- _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:
- """List service user keys
+ Get service user details by its id. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- List all the keys of a service user with its details except jwk.
+ >>> thread = api.frontier_service_get_service_user(id, async_req=True)
+ >>> result = thread.get()
- :param id: The unique ID of the service user to list keys for. (required)
+ :param id: The unique ID of the service user to get. (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1GetServiceUserResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_get_service_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_get_service_user_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_get_service_user_with_http_info(self, id : Annotated[StrictStr, Field(..., description="The unique ID of the service user to get.")], **kwargs) -> ApiResponse: # noqa: E501
+ """Get service user # noqa: E501
+
+ Get service user details by its id. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_get_service_user_with_http_info(id, async_req=True)
+ >>> result = thread.get()
+
+ :param id: The unique ID of the service user to get. (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_service_user_keys_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1GetServiceUserResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListServiceUserKeysResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ _params = locals()
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
- def _frontier_service_list_service_user_keys_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_get_service_user" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1GetServiceUserResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/serviceusers/{id}/keys',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/serviceusers/{id}', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_get_service_user_key(self, id : Annotated[StrictStr, Field(..., description="The unique ID of the service user to get a key for.")], key_id : Annotated[StrictStr, Field(..., description="The unique ID of the key to get.")], **kwargs) -> V1beta1GetServiceUserKeyResponse: # noqa: E501
+ """Get service user key # noqa: E501
+ Get a service user public RSA JWK set. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.frontier_service_get_service_user_key(id, key_id, async_req=True)
+ >>> result = thread.get()
- @validate_call
- def frontier_service_list_service_user_secrets(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the service user to list secrets for.")],
- _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,
- ) -> V1beta1ListServiceUserSecretsResponse:
- """List service user secrets
-
- List all the secrets of a service user.
+ :param id: The unique ID of the service user to get a key for. (required)
+ :type id: str
+ :param key_id: The unique ID of the key to get. (required)
+ :type key_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1GetServiceUserKeyResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_get_service_user_key_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_get_service_user_key_with_http_info(id, key_id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_get_service_user_key_with_http_info(self, id : Annotated[StrictStr, Field(..., description="The unique ID of the service user to get a key for.")], key_id : Annotated[StrictStr, Field(..., description="The unique ID of the key to get.")], **kwargs) -> ApiResponse: # noqa: E501
+ """Get service user key # noqa: E501
+
+ Get a service user public RSA JWK set. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_get_service_user_key_with_http_info(id, key_id, async_req=True)
+ >>> result = thread.get()
- :param id: The unique ID of the service user to list secrets for. (required)
+ :param id: The unique ID of the service user to get a key for. (required)
:type id: str
+ :param key_id: The unique ID of the key to get. (required)
+ :type key_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_service_user_secrets_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1GetServiceUserKeyResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListServiceUserSecretsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_service_user_secrets_with_http_info(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the service user to list secrets for.")],
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _params = locals()
+
+ _all_params = [
+ 'id',
+ 'key_id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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[V1beta1ListServiceUserSecretsResponse]:
- """List service user secrets
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_get_service_user_key" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- List all the secrets of a service user.
+ _collection_formats = {}
- :param id: The unique ID of the service user to list secrets for. (required)
- :type id: str
- :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._frontier_service_list_service_user_secrets_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListServiceUserSecretsResponse",
+ if _params['key_id']:
+ _path_params['keyId'] = _params['key_id']
+
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1GetServiceUserKeyResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/serviceusers/{id}/keys/{keyId}', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_service_user_keys(self, id : Annotated[StrictStr, Field(..., description="The unique ID of the service user to list keys for.")], **kwargs) -> V1beta1ListServiceUserKeysResponse: # noqa: E501
+ """List service user keys # noqa: E501
- @validate_call
- def frontier_service_list_service_user_secrets_without_preload_content(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the service user to list secrets for.")],
- _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:
- """List service user secrets
+ List all the keys of a service user with its details except jwk. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- List all the secrets of a service user.
+ >>> thread = api.frontier_service_list_service_user_keys(id, async_req=True)
+ >>> result = thread.get()
- :param id: The unique ID of the service user to list secrets for. (required)
+ :param id: The unique ID of the service user to list keys for. (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListServiceUserKeysResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_service_user_keys_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_service_user_keys_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_service_user_keys_with_http_info(self, id : Annotated[StrictStr, Field(..., description="The unique ID of the service user to list keys for.")], **kwargs) -> ApiResponse: # noqa: E501
+ """List service user keys # noqa: E501
+
+ List all the keys of a service user with its details except jwk. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_service_user_keys_with_http_info(id, async_req=True)
+ >>> result = thread.get()
+
+ :param id: The unique ID of the service user to list keys for. (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_service_user_secrets_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListServiceUserKeysResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListServiceUserSecretsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ _params = locals()
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
- def _frontier_service_list_service_user_secrets_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_service_user_keys" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/serviceusers/{id}/secrets',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ _response_types_map = {
+ '200': "V1beta1ListServiceUserKeysResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
+
+ return self.api_client.call_api(
+ '/v1beta1/serviceusers/{id}/keys', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_service_user_secrets(self, id : Annotated[StrictStr, Field(..., description="The unique ID of the service user to list secrets for.")], **kwargs) -> V1beta1ListServiceUserSecretsResponse: # noqa: E501
+ """List service user secrets # noqa: E501
+ List all the secrets of a service user. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.frontier_service_list_service_user_secrets(id, async_req=True)
+ >>> result = thread.get()
- @validate_call
- def frontier_service_list_service_users(
- self,
- org_id: Annotated[StrictStr, Field(description="The organization ID to filter service users by.")],
- state: Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None,
- _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,
- ) -> V1beta1ListServiceUsersResponse:
- """List org service users
-
- Returns the service user of an organization in a Frontier instance. It can be filter by it's state
+ :param id: The unique ID of the service user to list secrets for. (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListServiceUserSecretsResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_service_user_secrets_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_service_user_secrets_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_service_user_secrets_with_http_info(self, id : Annotated[StrictStr, Field(..., description="The unique ID of the service user to list secrets for.")], **kwargs) -> ApiResponse: # noqa: E501
+ """List service user secrets # noqa: E501
+
+ List all the secrets of a service user. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_service_user_secrets_with_http_info(id, async_req=True)
+ >>> result = thread.get()
- :param org_id: The organization ID to filter service users by. (required)
- :type org_id: str
- :param state: The state to filter by. It can be enabled or disabled.
- :type state: str
+ :param id: The unique ID of the service user to list secrets for. (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_service_users_serialize(
- org_id=org_id,
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListServiceUserSecretsResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListServiceUsersResponse",
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_service_user_secrets" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
+
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListServiceUserSecretsResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/serviceusers/{id}/secrets', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- ).data
-
-
- @validate_call
- def frontier_service_list_service_users_with_http_info(
- self,
- org_id: Annotated[StrictStr, Field(description="The organization ID to filter service users by.")],
- state: Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None,
- _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[V1beta1ListServiceUsersResponse]:
- """List org service users
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+
+ @validate_arguments
+ def frontier_service_list_service_users(self, org_id : Annotated[StrictStr, Field(..., description="The organization ID to filter service users by.")], state : Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None, **kwargs) -> V1beta1ListServiceUsersResponse: # noqa: E501
+ """List org service users # noqa: E501
- Returns the service user of an organization in a Frontier instance. It can be filter by it's state
+ Returns the service user of an organization in a Frontier instance. It can be filter by it's state # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_service_users(org_id, state, async_req=True)
+ >>> result = thread.get()
:param org_id: The organization ID to filter service users by. (required)
:type org_id: str
:param state: The state to filter by. It can be enabled or disabled.
:type state: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_service_users_serialize(
- org_id=org_id,
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListServiceUsersResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_service_users_without_preload_content(
- self,
- org_id: Annotated[StrictStr, Field(description="The organization ID to filter service users by.")],
- state: Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None,
- _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:
- """List org service users
-
- Returns the service user of an organization in a Frontier instance. It can be filter by it's state
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListServiceUsersResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_service_users_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_service_users_with_http_info(org_id, state, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_service_users_with_http_info(self, org_id : Annotated[StrictStr, Field(..., description="The organization ID to filter service users by.")], state : Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """List org service users # noqa: E501
+
+ Returns the service user of an organization in a Frontier instance. It can be filter by it's state # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_service_users_with_http_info(org_id, state, async_req=True)
+ >>> result = thread.get()
:param org_id: The organization ID to filter service users by. (required)
:type org_id: str
:param state: The state to filter by. It can be enabled or disabled.
:type state: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_service_users_serialize(
- org_id=org_id,
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListServiceUsersResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListServiceUsersResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
+ _params = locals()
+
+ _all_params = [
+ 'org_id',
+ 'state'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
)
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_service_users" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_list_service_users_serialize(
- self,
- org_id,
- state,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _collection_formats = {}
- _host = None
+ # process the path parameters
+ _path_params = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the query parameters
+ _query_params = []
+ if _params.get('org_id') is not None: # noqa: E501
+ _query_params.append(('orgId', _params['org_id']))
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ if _params.get('state') is not None: # noqa: E501
+ _query_params.append(('state', _params['state']))
- # process the path parameters
- # process the query parameters
- if org_id is not None:
-
- _query_params.append(('orgId', org_id))
-
- if state is not None:
-
- _query_params.append(('state', state))
-
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListServiceUsersResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/serviceusers',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/serviceusers', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
diff --git a/frontier_api/api/subscription_api.py b/frontier_api/api/subscription_api.py
index 6a58127..59c4d07 100644
--- a/frontier_api/api/subscription_api.py
+++ b/frontier_api/api/subscription_api.py
@@ -13,22 +13,16 @@
""" # noqa: E501
+import re # noqa: F401
import io
import warnings
-from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
-from typing import Dict, List, Optional, Tuple, Union, Any
+from pydantic import validate_arguments, ValidationError
-try:
- from typing import Annotated
-except ImportError:
- from typing_extensions import Annotated
-
-from pydantic import Field
from typing_extensions import Annotated
-from pydantic import StrictStr
+from pydantic import Field, StrictStr
-from typing import Any, Dict, Union
+from typing import Any, Dict
from frontier_api.models.frontier_service_update_subscription_request import FrontierServiceUpdateSubscriptionRequest
from frontier_api.models.v1beta1_get_subscription_response import V1beta1GetSubscriptionResponse
@@ -37,7 +31,10 @@
from frontier_api.api_client import ApiClient
from frontier_api.api_response import ApiResponse
-from frontier_api.rest import RESTResponseType
+from frontier_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class SubscriptionApi:
@@ -52,29 +49,16 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client
+ @validate_arguments
+ def frontier_service_cancel_subscription(self, org_id : StrictStr, billing_id : Annotated[StrictStr, Field(..., description="ID of the billing account to update the subscription for")], id : Annotated[StrictStr, Field(..., description="ID of the subscription to cancel")], **kwargs) -> object: # noqa: E501
+ """Cancel subscription # noqa: E501
- @validate_call
- def frontier_service_cancel_subscription(
- self,
- org_id: StrictStr,
- billing_id: Annotated[StrictStr, Field(description="ID of the billing account to update the subscription for")],
- id: Annotated[StrictStr, Field(description="ID of the subscription to cancel")],
- _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:
- """Cancel subscription
+ Cancel a subscription by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Cancel a subscription by ID.
+ >>> thread = api.frontier_service_cancel_subscription(org_id, billing_id, id, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
@@ -82,81 +66,33 @@ def frontier_service_cancel_subscription(
:type billing_id: str
:param id: ID of the subscription to cancel (required)
:type id: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_cancel_subscription_serialize(
- org_id=org_id,
- billing_id=billing_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_cancel_subscription_with_http_info(
- self,
- org_id: StrictStr,
- billing_id: Annotated[StrictStr, Field(description="ID of the billing account to update the subscription for")],
- id: Annotated[StrictStr, Field(description="ID of the subscription to cancel")],
- _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]:
- """Cancel subscription
-
- Cancel a subscription by ID.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_cancel_subscription_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_cancel_subscription_with_http_info(org_id, billing_id, id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_cancel_subscription_with_http_info(self, org_id : StrictStr, billing_id : Annotated[StrictStr, Field(..., description="ID of the billing account to update the subscription for")], id : Annotated[StrictStr, Field(..., description="ID of the subscription to cancel")], **kwargs) -> ApiResponse: # noqa: E501
+ """Cancel subscription # noqa: E501
+
+ Cancel a subscription by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_cancel_subscription_with_http_info(org_id, billing_id, id, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
@@ -164,227 +100,126 @@ def frontier_service_cancel_subscription_with_http_info(
:type billing_id: str
:param id: ID of the subscription to cancel (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_cancel_subscription_serialize(
- org_id=org_id,
- billing_id=billing_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_cancel_subscription_without_preload_content(
- self,
- org_id: StrictStr,
- billing_id: Annotated[StrictStr, Field(description="ID of the billing account to update the subscription for")],
- id: Annotated[StrictStr, Field(description="ID of the subscription to cancel")],
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'org_id',
+ 'billing_id',
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Cancel subscription
-
- Cancel a subscription by ID.
-
- :param org_id: (required)
- :type org_id: str
- :param billing_id: ID of the billing account to update the subscription for (required)
- :type billing_id: str
- :param id: ID of the subscription to cancel (required)
- :type id: str
- :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._frontier_service_cancel_subscription_serialize(
- org_id=org_id,
- billing_id=billing_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_cancel_subscription" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+ _collection_formats = {}
- def _frontier_service_cancel_subscription_serialize(
- self,
- org_id,
- billing_id,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _host = None
+ if _params['billing_id']:
+ _path_params['billingId'] = _params['billing_id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if billing_id is not None:
- _path_params['billingId'] = billing_id
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "object",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/organizations/{orgId}/billing/{billingId}/subscriptions/{id}/cancel',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/billing/{billingId}/subscriptions/{id}/cancel', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_get_subscription(self, org_id : StrictStr, billing_id : Annotated[StrictStr, Field(..., description="ID of the billing account to get the subscription for")], id : Annotated[StrictStr, Field(..., description="ID of the subscription to get")], **kwargs) -> V1beta1GetSubscriptionResponse: # noqa: E501
+ """Get subscription # noqa: E501
- @validate_call
- def frontier_service_get_subscription(
- self,
- org_id: StrictStr,
- billing_id: Annotated[StrictStr, Field(description="ID of the billing account to get the subscription for")],
- id: Annotated[StrictStr, Field(description="ID of the subscription to get")],
- _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,
- ) -> V1beta1GetSubscriptionResponse:
- """Get subscription
+ Get a subscription by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Get a subscription by ID.
+ >>> thread = api.frontier_service_get_subscription(org_id, billing_id, id, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
@@ -392,81 +227,33 @@ def frontier_service_get_subscription(
:type billing_id: str
:param id: ID of the subscription to get (required)
:type id: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_get_subscription_serialize(
- org_id=org_id,
- billing_id=billing_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetSubscriptionResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_subscription_with_http_info(
- self,
- org_id: StrictStr,
- billing_id: Annotated[StrictStr, Field(description="ID of the billing account to get the subscription for")],
- id: Annotated[StrictStr, Field(description="ID of the subscription to get")],
- _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[V1beta1GetSubscriptionResponse]:
- """Get subscription
-
- Get a subscription by ID.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1GetSubscriptionResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_get_subscription_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_get_subscription_with_http_info(org_id, billing_id, id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_get_subscription_with_http_info(self, org_id : StrictStr, billing_id : Annotated[StrictStr, Field(..., description="ID of the billing account to get the subscription for")], id : Annotated[StrictStr, Field(..., description="ID of the subscription to get")], **kwargs) -> ApiResponse: # noqa: E501
+ """Get subscription # noqa: E501
+
+ Get a subscription by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_get_subscription_with_http_info(org_id, billing_id, id, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
@@ -474,523 +261,279 @@ def frontier_service_get_subscription_with_http_info(
:type billing_id: str
:param id: ID of the subscription to get (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_get_subscription_serialize(
- org_id=org_id,
- billing_id=billing_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1GetSubscriptionResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetSubscriptionResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ _params = locals()
-
- @validate_call
- def frontier_service_get_subscription_without_preload_content(
- self,
- org_id: StrictStr,
- billing_id: Annotated[StrictStr, Field(description="ID of the billing account to get the subscription for")],
- id: Annotated[StrictStr, Field(description="ID of the subscription to get")],
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'org_id',
+ 'billing_id',
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Get subscription
-
- Get a subscription by ID.
-
- :param org_id: (required)
- :type org_id: str
- :param billing_id: ID of the billing account to get the subscription for (required)
- :type billing_id: str
- :param id: ID of the subscription to get (required)
- :type id: str
- :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._frontier_service_get_subscription_serialize(
- org_id=org_id,
- billing_id=billing_id,
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetSubscriptionResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_get_subscription" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+ _collection_formats = {}
- def _frontier_service_get_subscription_serialize(
- self,
- org_id,
- billing_id,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _host = None
+ if _params['billing_id']:
+ _path_params['billingId'] = _params['billing_id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if billing_id is not None:
- _path_params['billingId'] = billing_id
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1GetSubscriptionResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/organizations/{orgId}/billing/{billingId}/subscriptions/{id}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/billing/{billingId}/subscriptions/{id}', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_subscriptions(self, org_id : StrictStr, billing_id : Annotated[StrictStr, Field(..., description="ID of the billing account to list subscriptions for")], **kwargs) -> V1beta1ListSubscriptionsResponse: # noqa: E501
+ """List subscriptions # noqa: E501
+ List subscriptions of a billing account. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_list_subscriptions(
- self,
- org_id: StrictStr,
- billing_id: Annotated[StrictStr, Field(description="ID of the billing account to list subscriptions for")],
- _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,
- ) -> V1beta1ListSubscriptionsResponse:
- """List subscriptions
-
- List subscriptions of a billing account.
+ >>> thread = api.frontier_service_list_subscriptions(org_id, billing_id, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
:param billing_id: ID of the billing account to list subscriptions for (required)
:type billing_id: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_subscriptions_serialize(
- org_id=org_id,
- billing_id=billing_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListSubscriptionsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_subscriptions_with_http_info(
- self,
- org_id: StrictStr,
- billing_id: Annotated[StrictStr, Field(description="ID of the billing account to list subscriptions for")],
- _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[V1beta1ListSubscriptionsResponse]:
- """List subscriptions
-
- List subscriptions of a billing account.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListSubscriptionsResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_subscriptions_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_subscriptions_with_http_info(org_id, billing_id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_subscriptions_with_http_info(self, org_id : StrictStr, billing_id : Annotated[StrictStr, Field(..., description="ID of the billing account to list subscriptions for")], **kwargs) -> ApiResponse: # noqa: E501
+ """List subscriptions # noqa: E501
+
+ List subscriptions of a billing account. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_subscriptions_with_http_info(org_id, billing_id, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
:param billing_id: ID of the billing account to list subscriptions for (required)
:type billing_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_subscriptions_serialize(
- org_id=org_id,
- billing_id=billing_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListSubscriptionsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListSubscriptionsResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_list_subscriptions_without_preload_content(
- self,
- org_id: StrictStr,
- billing_id: Annotated[StrictStr, Field(description="ID of the billing account to list subscriptions for")],
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'org_id',
+ 'billing_id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """List subscriptions
-
- List subscriptions of a billing account.
-
- :param org_id: (required)
- :type org_id: str
- :param billing_id: ID of the billing account to list subscriptions for (required)
- :type billing_id: str
- :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._frontier_service_list_subscriptions_serialize(
- org_id=org_id,
- billing_id=billing_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListSubscriptionsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
)
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_subscriptions" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_list_subscriptions_serialize(
- self,
- org_id,
- billing_id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _collection_formats = {}
- _host = None
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['billing_id']:
+ _path_params['billingId'] = _params['billing_id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if billing_id is not None:
- _path_params['billingId'] = billing_id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListSubscriptionsResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/organizations/{orgId}/billing/{billingId}/subscriptions',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/billing/{billingId}/subscriptions', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_update_subscription(self, org_id : StrictStr, billing_id : Annotated[StrictStr, Field(..., description="ID of the billing account to update the subscription for")], id : Annotated[StrictStr, Field(..., description="ID of the subscription to update")], body : FrontierServiceUpdateSubscriptionRequest, **kwargs) -> V1beta1UpdateSubscriptionResponse: # noqa: E501
+ """Update subscription # noqa: E501
+ Update a subscription by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
-
- @validate_call
- def frontier_service_update_subscription(
- self,
- org_id: StrictStr,
- billing_id: Annotated[StrictStr, Field(description="ID of the billing account to update the subscription for")],
- id: Annotated[StrictStr, Field(description="ID of the subscription to update")],
- body: FrontierServiceUpdateSubscriptionRequest,
- _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,
- ) -> V1beta1UpdateSubscriptionResponse:
- """Update subscription
-
- Update a subscription by ID.
+ >>> thread = api.frontier_service_update_subscription(org_id, billing_id, id, body, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
@@ -1000,83 +543,33 @@ def frontier_service_update_subscription(
:type id: str
:param body: (required)
:type body: FrontierServiceUpdateSubscriptionRequest
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_update_subscription_serialize(
- org_id=org_id,
- billing_id=billing_id,
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateSubscriptionResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_update_subscription_with_http_info(
- self,
- org_id: StrictStr,
- billing_id: Annotated[StrictStr, Field(description="ID of the billing account to update the subscription for")],
- id: Annotated[StrictStr, Field(description="ID of the subscription to update")],
- body: FrontierServiceUpdateSubscriptionRequest,
- _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[V1beta1UpdateSubscriptionResponse]:
- """Update subscription
-
- Update a subscription by ID.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1UpdateSubscriptionResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_update_subscription_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_update_subscription_with_http_info(org_id, billing_id, id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_update_subscription_with_http_info(self, org_id : StrictStr, billing_id : Annotated[StrictStr, Field(..., description="ID of the billing account to update the subscription for")], id : Annotated[StrictStr, Field(..., description="ID of the subscription to update")], body : FrontierServiceUpdateSubscriptionRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Update subscription # noqa: E501
+
+ Update a subscription by ID. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_update_subscription_with_http_info(org_id, billing_id, id, body, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
@@ -1086,221 +579,123 @@ def frontier_service_update_subscription_with_http_info(
:type id: str
:param body: (required)
:type body: FrontierServiceUpdateSubscriptionRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_update_subscription_serialize(
- org_id=org_id,
- billing_id=billing_id,
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateSubscriptionResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_update_subscription_without_preload_content(
- self,
- org_id: StrictStr,
- billing_id: Annotated[StrictStr, Field(description="ID of the billing account to update the subscription for")],
- id: Annotated[StrictStr, Field(description="ID of the subscription to update")],
- body: FrontierServiceUpdateSubscriptionRequest,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1UpdateSubscriptionResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'org_id',
+ 'billing_id',
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """Update subscription
-
- Update a subscription by ID.
-
- :param org_id: (required)
- :type org_id: str
- :param billing_id: ID of the billing account to update the subscription for (required)
- :type billing_id: str
- :param id: ID of the subscription to update (required)
- :type id: str
- :param body: (required)
- :type body: FrontierServiceUpdateSubscriptionRequest
- :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._frontier_service_update_subscription_serialize(
- org_id=org_id,
- billing_id=billing_id,
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
)
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateSubscriptionResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_update_subscription" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+ _collection_formats = {}
- def _frontier_service_update_subscription_serialize(
- self,
- org_id,
- billing_id,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _host = None
+ if _params['billing_id']:
+ _path_params['billingId'] = _params['billing_id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if billing_id is not None:
- _path_params['billingId'] = billing_id
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1UpdateSubscriptionResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='PUT',
- resource_path='/v1beta1/organizations/{orgId}/billing/{billingId}/subscriptions/{id}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/billing/{billingId}/subscriptions/{id}', 'PUT',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
diff --git a/frontier_api/api/transaction_api.py b/frontier_api/api/transaction_api.py
index b0ef220..64324cb 100644
--- a/frontier_api/api/transaction_api.py
+++ b/frontier_api/api/transaction_api.py
@@ -13,22 +13,16 @@
""" # noqa: E501
+import re # noqa: F401
import io
import warnings
-from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
-from typing import Dict, List, Optional, Tuple, Union, Any
+from pydantic import validate_arguments, ValidationError
-try:
- from typing import Annotated
-except ImportError:
- from typing_extensions import Annotated
-
-from pydantic import Field
from typing_extensions import Annotated
from datetime import datetime
-from pydantic import StrictStr
+from pydantic import Field, StrictStr
from typing import Optional
@@ -36,7 +30,10 @@
from frontier_api.api_client import ApiClient
from frontier_api.api_response import ApiResponse
-from frontier_api.rest import RESTResponseType
+from frontier_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class TransactionApi:
@@ -51,29 +48,16 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client
+ @validate_arguments
+ def frontier_service_list_billing_transactions(self, billing_id : Annotated[StrictStr, Field(..., description="ID of the billing account to update the subscription for")], org_id : Optional[StrictStr] = None, since : Optional[datetime] = None, **kwargs) -> V1beta1ListBillingTransactionsResponse: # noqa: E501
+ """List billing transactions # noqa: E501
- @validate_call
- def frontier_service_list_billing_transactions(
- self,
- billing_id: Annotated[StrictStr, Field(description="ID of the billing account to update the subscription for")],
- org_id: Optional[StrictStr] = None,
- since: Optional[datetime] = None,
- _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,
- ) -> V1beta1ListBillingTransactionsResponse:
- """List billing transactions
+ List all transactions of a billing account. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- List all transactions of a billing account.
+ >>> thread = api.frontier_service_list_billing_transactions(billing_id, org_id, since, async_req=True)
+ >>> result = thread.get()
:param billing_id: ID of the billing account to update the subscription for (required)
:type billing_id: str
@@ -81,81 +65,33 @@ def frontier_service_list_billing_transactions(
:type org_id: str
:param since:
:type since: datetime
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_billing_transactions_serialize(
- billing_id=billing_id,
- org_id=org_id,
- since=since,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListBillingTransactionsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_billing_transactions_with_http_info(
- self,
- billing_id: Annotated[StrictStr, Field(description="ID of the billing account to update the subscription for")],
- org_id: Optional[StrictStr] = None,
- since: Optional[datetime] = None,
- _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[V1beta1ListBillingTransactionsResponse]:
- """List billing transactions
-
- List all transactions of a billing account.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListBillingTransactionsResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_billing_transactions_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_billing_transactions_with_http_info(billing_id, org_id, since, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_billing_transactions_with_http_info(self, billing_id : Annotated[StrictStr, Field(..., description="ID of the billing account to update the subscription for")], org_id : Optional[StrictStr] = None, since : Optional[datetime] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """List billing transactions # noqa: E501
+
+ List all transactions of a billing account. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_billing_transactions_with_http_info(billing_id, org_id, since, async_req=True)
+ >>> result = thread.get()
:param billing_id: ID of the billing account to update the subscription for (required)
:type billing_id: str
@@ -163,213 +99,115 @@ def frontier_service_list_billing_transactions_with_http_info(
:type org_id: str
:param since:
:type since: datetime
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_billing_transactions_serialize(
- billing_id=billing_id,
- org_id=org_id,
- since=since,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListBillingTransactionsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListBillingTransactionsResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_list_billing_transactions_without_preload_content(
- self,
- billing_id: Annotated[StrictStr, Field(description="ID of the billing account to update the subscription for")],
- org_id: Optional[StrictStr] = None,
- since: Optional[datetime] = None,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'billing_id',
+ 'org_id',
+ 'since'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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:
- """List billing transactions
-
- List all transactions of a billing account.
-
- :param billing_id: ID of the billing account to update the subscription for (required)
- :type billing_id: str
- :param org_id:
- :type org_id: str
- :param since:
- :type since: datetime
- :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._frontier_service_list_billing_transactions_serialize(
- billing_id=billing_id,
- org_id=org_id,
- since=since,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListBillingTransactionsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
)
- return response_data.response
-
- def _frontier_service_list_billing_transactions_serialize(
- self,
- billing_id,
- org_id,
- since,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_billing_transactions" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['billing_id']:
+ _path_params['billingId'] = _params['billing_id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if billing_id is not None:
- _path_params['billingId'] = billing_id
# process the query parameters
- if org_id is not None:
-
- _query_params.append(('orgId', org_id))
-
- if since is not None:
- if isinstance(since, datetime):
- _query_params.append(
- (
- 'since',
- since.strftime(
- self.api_client.configuration.datetime_format
- )
- )
- )
+ _query_params = []
+ if _params.get('org_id') is not None: # noqa: E501
+ _query_params.append(('orgId', _params['org_id']))
+
+ if _params.get('since') is not None: # noqa: E501
+ if isinstance(_params['since'], datetime):
+ _query_params.append(('since', _params['since'].strftime(self.api_client.configuration.datetime_format)))
else:
- _query_params.append(('since', since))
-
+ _query_params.append(('since', _params['since']))
+
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/billing/{billingId}/transactions',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ _response_types_map = {
+ '200': "V1beta1ListBillingTransactionsResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
+
+ return self.api_client.call_api(
+ '/v1beta1/billing/{billingId}/transactions', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
diff --git a/frontier_api/api/usage_api.py b/frontier_api/api/usage_api.py
index 982751a..2942555 100644
--- a/frontier_api/api/usage_api.py
+++ b/frontier_api/api/usage_api.py
@@ -13,28 +13,25 @@
""" # noqa: E501
+import re # noqa: F401
import io
import warnings
-from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
-from typing import Dict, List, Optional, Tuple, Union, Any
+from pydantic import validate_arguments, ValidationError
-try:
- from typing import Annotated
-except ImportError:
- from typing_extensions import Annotated
-
-from pydantic import Field
from typing_extensions import Annotated
-from pydantic import StrictStr
+from pydantic import Field, StrictStr
-from typing import Any, Dict, Union
+from typing import Any, Dict
from frontier_api.models.frontier_service_create_billing_usage_request import FrontierServiceCreateBillingUsageRequest
from frontier_api.api_client import ApiClient
from frontier_api.api_response import ApiResponse
-from frontier_api.rest import RESTResponseType
+from frontier_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class UsageApi:
@@ -49,29 +46,16 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client
+ @validate_arguments
+ def frontier_service_create_billing_usage(self, org_id : StrictStr, billing_id : Annotated[StrictStr, Field(..., description="ID of the billing account to update the subscription for")], body : FrontierServiceCreateBillingUsageRequest, **kwargs) -> object: # noqa: E501
+ """Create billing usage # noqa: E501
- @validate_call
- def frontier_service_create_billing_usage(
- self,
- org_id: StrictStr,
- billing_id: Annotated[StrictStr, Field(description="ID of the billing account to update the subscription for")],
- body: FrontierServiceCreateBillingUsageRequest,
- _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 billing usage
+ Report a new billing usage for a billing account. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Report a new billing usage for a billing account.
+ >>> thread = api.frontier_service_create_billing_usage(org_id, billing_id, body, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
@@ -79,81 +63,33 @@ def frontier_service_create_billing_usage(
:type billing_id: str
:param body: (required)
:type body: FrontierServiceCreateBillingUsageRequest
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_billing_usage_serialize(
- org_id=org_id,
- billing_id=billing_id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_billing_usage_with_http_info(
- self,
- org_id: StrictStr,
- billing_id: Annotated[StrictStr, Field(description="ID of the billing account to update the subscription for")],
- body: FrontierServiceCreateBillingUsageRequest,
- _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 billing usage
-
- Report a new billing usage for a billing account.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_create_billing_usage_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_create_billing_usage_with_http_info(org_id, billing_id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_create_billing_usage_with_http_info(self, org_id : StrictStr, billing_id : Annotated[StrictStr, Field(..., description="ID of the billing account to update the subscription for")], body : FrontierServiceCreateBillingUsageRequest, **kwargs) -> ApiResponse: # noqa: E501
+ """Create billing usage # noqa: E501
+
+ Report a new billing usage for a billing account. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_create_billing_usage_with_http_info(org_id, billing_id, body, async_req=True)
+ >>> result = thread.get()
:param org_id: (required)
:type org_id: str
@@ -161,213 +97,119 @@ def frontier_service_create_billing_usage_with_http_info(
:type billing_id: str
:param body: (required)
:type body: FrontierServiceCreateBillingUsageRequest
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_billing_usage_serialize(
- org_id=org_id,
- billing_id=billing_id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_create_billing_usage_without_preload_content(
- self,
- org_id: StrictStr,
- billing_id: Annotated[StrictStr, Field(description="ID of the billing account to update the subscription for")],
- body: FrontierServiceCreateBillingUsageRequest,
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
+ _all_params = [
+ 'org_id',
+ 'billing_id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
]
- ] = 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 billing usage
-
- Report a new billing usage for a billing account.
-
- :param org_id: (required)
- :type org_id: str
- :param billing_id: ID of the billing account to update the subscription for (required)
- :type billing_id: str
- :param body: (required)
- :type body: FrontierServiceCreateBillingUsageRequest
- :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._frontier_service_create_billing_usage_serialize(
- org_id=org_id,
- billing_id=billing_id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
)
- return response_data.response
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_create_billing_usage" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- def _frontier_service_create_billing_usage_serialize(
- self,
- org_id,
- billing_id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _collection_formats = {}
- _host = None
+ # process the path parameters
+ _path_params = {}
+ if _params['org_id']:
+ _path_params['orgId'] = _params['org_id']
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params['billing_id']:
+ _path_params['billingId'] = _params['billing_id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if org_id is not None:
- _path_params['orgId'] = org_id
- if billing_id is not None:
- _path_params['billingId'] = billing_id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "object",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/organizations/{orgId}/billing/{billingId}/usages',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/organizations/{orgId}/billing/{billingId}/usages', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
diff --git a/frontier_api/api/user_api.py b/frontier_api/api/user_api.py
index 4bed06e..bbc9e10 100644
--- a/frontier_api/api/user_api.py
+++ b/frontier_api/api/user_api.py
@@ -13,22 +13,16 @@
""" # noqa: E501
+import re # noqa: F401
import io
import warnings
-from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
-from typing import Dict, List, Optional, Tuple, Union, Any
+from pydantic import validate_arguments, ValidationError
-try:
- from typing import Annotated
-except ImportError:
- from typing_extensions import Annotated
-
-from pydantic import Field
from typing_extensions import Annotated
-from pydantic import StrictInt, StrictStr
+from pydantic import Field, StrictBool, StrictInt, StrictStr, conlist
-from typing import Any, Dict, List, Optional, Union
+from typing import Any, Dict, Optional
from frontier_api.models.v1beta1_create_user_response import V1beta1CreateUserResponse
from frontier_api.models.v1beta1_get_current_user_response import V1beta1GetCurrentUserResponse
@@ -49,7 +43,10 @@
from frontier_api.api_client import ApiClient
from frontier_api.api_response import ApiResponse
-from frontier_api.rest import RESTResponseType
+from frontier_api.exceptions import ( # noqa: F401
+ ApiTypeError,
+ ApiValueError
+)
class UserApi:
@@ -64,32 +61,16 @@ def __init__(self, api_client=None) -> None:
api_client = ApiClient.get_default()
self.api_client = api_client
+ @validate_arguments
+ def admin_service_list_all_users(self, page_size : Annotated[Optional[StrictInt], Field(description="The maximum number of users to return per page. The default is 50.")] = None, page_num : Annotated[Optional[StrictInt], Field(description="The page number to return. The default is 1.")] = None, keyword : Annotated[Optional[StrictStr], Field(description="The keyword to search for. It can be a user's name, email,metadata or id.")] = None, org_id : Annotated[Optional[StrictStr], Field(description="The organization id to filter by.")] = None, group_id : Annotated[Optional[StrictStr], Field(description="The group id to filter by.")] = None, state : Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None, **kwargs) -> V1beta1ListAllUsersResponse: # noqa: E501
+ """List all users # noqa: E501
- @validate_call
- def admin_service_list_all_users(
- self,
- page_size: Annotated[Optional[StrictInt], Field(description="The maximum number of users to return per page. The default is 50.")] = None,
- page_num: Annotated[Optional[StrictInt], Field(description="The page number to return. The default is 1.")] = None,
- keyword: Annotated[Optional[StrictStr], Field(description="The keyword to search for. It can be a user's name, email,metadata or id.")] = None,
- org_id: Annotated[Optional[StrictStr], Field(description="The organization id to filter by.")] = None,
- group_id: Annotated[Optional[StrictStr], Field(description="The group id to filter by.")] = None,
- state: Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None,
- _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,
- ) -> V1beta1ListAllUsersResponse:
- """List all users
+ Lists all the users from all the organizations in a Frontier instance. It can be filtered by keyword, organization, group and state. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Lists all the users from all the organizations in a Frontier instance. It can be filtered by keyword, organization, group and state.
+ >>> thread = api.admin_service_list_all_users(page_size, page_num, keyword, org_id, group_id, state, async_req=True)
+ >>> result = thread.get()
:param page_size: The maximum number of users to return per page. The default is 50.
:type page_size: int
@@ -103,87 +84,33 @@ def admin_service_list_all_users(
:type group_id: str
:param state: The state to filter by. It can be enabled or disabled.
:type state: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_list_all_users_serialize(
- page_size=page_size,
- page_num=page_num,
- keyword=keyword,
- org_id=org_id,
- group_id=group_id,
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListAllUsersResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 admin_service_list_all_users_with_http_info(
- self,
- page_size: Annotated[Optional[StrictInt], Field(description="The maximum number of users to return per page. The default is 50.")] = None,
- page_num: Annotated[Optional[StrictInt], Field(description="The page number to return. The default is 1.")] = None,
- keyword: Annotated[Optional[StrictStr], Field(description="The keyword to search for. It can be a user's name, email,metadata or id.")] = None,
- org_id: Annotated[Optional[StrictStr], Field(description="The organization id to filter by.")] = None,
- group_id: Annotated[Optional[StrictStr], Field(description="The group id to filter by.")] = None,
- state: Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None,
- _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[V1beta1ListAllUsersResponse]:
- """List all users
-
- Lists all the users from all the organizations in a Frontier instance. It can be filtered by keyword, organization, group and state.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListAllUsersResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the admin_service_list_all_users_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.admin_service_list_all_users_with_http_info(page_size, page_num, keyword, org_id, group_id, state, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def admin_service_list_all_users_with_http_info(self, page_size : Annotated[Optional[StrictInt], Field(description="The maximum number of users to return per page. The default is 50.")] = None, page_num : Annotated[Optional[StrictInt], Field(description="The page number to return. The default is 1.")] = None, keyword : Annotated[Optional[StrictStr], Field(description="The keyword to search for. It can be a user's name, email,metadata or id.")] = None, org_id : Annotated[Optional[StrictStr], Field(description="The organization id to filter by.")] = None, group_id : Annotated[Optional[StrictStr], Field(description="The group id to filter by.")] = None, state : Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """List all users # noqa: E501
+
+ Lists all the users from all the organizations in a Frontier instance. It can be filtered by keyword, organization, group and state. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.admin_service_list_all_users_with_http_info(page_size, page_num, keyword, org_id, group_id, state, async_req=True)
+ >>> result = thread.get()
:param page_size: The maximum number of users to return per page. The default is 50.
:type page_size: int
@@ -197,4371 +124,2235 @@ def admin_service_list_all_users_with_http_info(
:type group_id: str
:param state: The state to filter by. It can be enabled or disabled.
:type state: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_list_all_users_serialize(
- page_size=page_size,
- page_num=page_num,
- keyword=keyword,
- org_id=org_id,
- group_id=group_id,
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListAllUsersResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'page_size',
+ 'page_num',
+ 'keyword',
+ 'org_id',
+ 'group_id',
+ 'state'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method admin_service_list_all_users" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+
+ # process the query parameters
+ _query_params = []
+ if _params.get('page_size') is not None: # noqa: E501
+ _query_params.append(('pageSize', _params['page_size']))
+
+ if _params.get('page_num') is not None: # noqa: E501
+ _query_params.append(('pageNum', _params['page_num']))
+
+ if _params.get('keyword') is not None: # noqa: E501
+ _query_params.append(('keyword', _params['keyword']))
- _response_types_map: Dict[str, Optional[str]] = {
+ if _params.get('org_id') is not None: # noqa: E501
+ _query_params.append(('orgId', _params['org_id']))
+
+ if _params.get('group_id') is not None: # noqa: E501
+ _query_params.append(('groupId', _params['group_id']))
+
+ if _params.get('state') is not None: # noqa: E501
+ _query_params.append(('state', _params['state']))
+
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
'200': "V1beta1ListAllUsersResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/admin/users', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_create_user(self, body : V1beta1UserRequestBody, **kwargs) -> V1beta1CreateUserResponse: # noqa: E501
+ """Create user # noqa: E501
- @validate_call
- def admin_service_list_all_users_without_preload_content(
- self,
- page_size: Annotated[Optional[StrictInt], Field(description="The maximum number of users to return per page. The default is 50.")] = None,
- page_num: Annotated[Optional[StrictInt], Field(description="The page number to return. The default is 1.")] = None,
- keyword: Annotated[Optional[StrictStr], Field(description="The keyword to search for. It can be a user's name, email,metadata or id.")] = None,
- org_id: Annotated[Optional[StrictStr], Field(description="The organization id to filter by.")] = None,
- group_id: Annotated[Optional[StrictStr], Field(description="The group id to filter by.")] = None,
- state: Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None,
- _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:
- """List all users
+ Create a user with the given details. A user is not attached to an organization or a group by default,and can be invited to the org/group. The name of the user must be unique within the entire Frontier instance. If a user name is not provided, Frontier automatically generates a name from the user email. The user metadata is validated against the user metaschema. By default the user metaschema contains `labels` and `descriptions` for the user. The `title` field can be optionally added for a user-friendly name.
*Example:*`{\"email\":\"john.doe@raystack.org\",\"title\":\"John Doe\",metadata:{\"label\": {\"key1\": \"value1\"}, \"description\": \"User Description\"}}` # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Lists all the users from all the organizations in a Frontier instance. It can be filtered by keyword, organization, group and state.
+ >>> thread = api.frontier_service_create_user(body, async_req=True)
+ >>> result = thread.get()
- :param page_size: The maximum number of users to return per page. The default is 50.
- :type page_size: int
- :param page_num: The page number to return. The default is 1.
- :type page_num: int
- :param keyword: The keyword to search for. It can be a user's name, email,metadata or id.
- :type keyword: str
- :param org_id: The organization id to filter by.
- :type org_id: str
- :param group_id: The group id to filter by.
- :type group_id: str
- :param state: The state to filter by. It can be enabled or disabled.
- :type state: str
+ :param body: (required)
+ :type body: V1beta1UserRequestBody
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1CreateUserResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_create_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_create_user_with_http_info(body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_create_user_with_http_info(self, body : V1beta1UserRequestBody, **kwargs) -> ApiResponse: # noqa: E501
+ """Create user # noqa: E501
+
+ Create a user with the given details. A user is not attached to an organization or a group by default,and can be invited to the org/group. The name of the user must be unique within the entire Frontier instance. If a user name is not provided, Frontier automatically generates a name from the user email. The user metadata is validated against the user metaschema. By default the user metaschema contains `labels` and `descriptions` for the user. The `title` field can be optionally added for a user-friendly name.
*Example:*`{\"email\":\"john.doe@raystack.org\",\"title\":\"John Doe\",metadata:{\"label\": {\"key1\": \"value1\"}, \"description\": \"User Description\"}}` # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_create_user_with_http_info(body, async_req=True)
+ >>> result = thread.get()
+
+ :param body: (required)
+ :type body: V1beta1UserRequestBody
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._admin_service_list_all_users_serialize(
- page_size=page_size,
- page_num=page_num,
- keyword=keyword,
- org_id=org_id,
- group_id=group_id,
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1CreateUserResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListAllUsersResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _admin_service_list_all_users_serialize(
- self,
- page_size,
- page_num,
- keyword,
- org_id,
- group_id,
- state,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _host = None
-
- _collection_formats: Dict[str, str] = {
-
- }
+ _params = locals()
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _all_params = [
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_create_user" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
# process the path parameters
+ _path_params = {}
+
# process the query parameters
- if page_size is not None:
-
- _query_params.append(('pageSize', page_size))
-
- if page_num is not None:
-
- _query_params.append(('pageNum', page_num))
-
- if keyword is not None:
-
- _query_params.append(('keyword', keyword))
-
- if org_id is not None:
-
- _query_params.append(('orgId', org_id))
-
- if group_id is not None:
-
- _query_params.append(('groupId', group_id))
-
- if state is not None:
-
- _query_params.append(('state', state))
-
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
+ # set the HTTP header `Content-Type`
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = [] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1CreateUserResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/admin/users',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/users', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_delete_user(self, id : StrictStr, **kwargs) -> object: # noqa: E501
+ """Delete user # noqa: E501
+ Delete an user permanently forever and all of its relations (organizations, groups, etc) # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_create_user(
- self,
- body: V1beta1UserRequestBody,
- _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,
- ) -> V1beta1CreateUserResponse:
- """Create user
+ >>> thread = api.frontier_service_delete_user(id, async_req=True)
+ >>> result = thread.get()
- Create a user with the given details. A user is not attached to an organization or a group by default,and can be invited to the org/group. The name of the user must be unique within the entire Frontier instance. If a user name is not provided, Frontier automatically generates a name from the user email. The user metadata is validated against the user metaschema. By default the user metaschema contains `labels` and `descriptions` for the user. The `title` field can be optionally added for a user-friendly name.
*Example:*`{\"email\":\"john.doe@raystack.org\",\"title\":\"John Doe\",metadata:{\"label\": {\"key1\": \"value1\"}, \"description\": \"User Description\"}}`
+ :param id: (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_delete_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_delete_user_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_delete_user_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """Delete user # noqa: E501
+
+ Delete an user permanently forever and all of its relations (organizations, groups, etc) # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_delete_user_with_http_info(id, async_req=True)
+ >>> result = thread.get()
- :param body: (required)
- :type body: V1beta1UserRequestBody
+ :param id: (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_user_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateUserResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_create_user_with_http_info(
- self,
- body: V1beta1UserRequestBody,
- _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[V1beta1CreateUserResponse]:
- """Create user
+ _params = locals()
- Create a user with the given details. A user is not attached to an organization or a group by default,and can be invited to the org/group. The name of the user must be unique within the entire Frontier instance. If a user name is not provided, Frontier automatically generates a name from the user email. The user metadata is validated against the user metaschema. By default the user metaschema contains `labels` and `descriptions` for the user. The `title` field can be optionally added for a user-friendly name.
*Example:*`{\"email\":\"john.doe@raystack.org\",\"title\":\"John Doe\",metadata:{\"label\": {\"key1\": \"value1\"}, \"description\": \"User Description\"}}`
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_delete_user" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- :param body: (required)
- :type body: V1beta1UserRequestBody
- :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._frontier_service_create_user_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ _collection_formats = {}
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateUserResponse",
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
+
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "object",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/users/{id}', 'DELETE',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_disable_user(self, id : StrictStr, body : Dict[str, Any], **kwargs) -> object: # noqa: E501
+ """Disable user # noqa: E501
- @validate_call
- def frontier_service_create_user_without_preload_content(
- self,
- body: V1beta1UserRequestBody,
- _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 user
+ Sets the state of the user as diabled.The user's membership to groups and organizations will still exist along with all it's roles for access control, but the user will not be able to log in and access the Frontier instance. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Create a user with the given details. A user is not attached to an organization or a group by default,and can be invited to the org/group. The name of the user must be unique within the entire Frontier instance. If a user name is not provided, Frontier automatically generates a name from the user email. The user metadata is validated against the user metaschema. By default the user metaschema contains `labels` and `descriptions` for the user. The `title` field can be optionally added for a user-friendly name.
*Example:*`{\"email\":\"john.doe@raystack.org\",\"title\":\"John Doe\",metadata:{\"label\": {\"key1\": \"value1\"}, \"description\": \"User Description\"}}`
+ >>> thread = api.frontier_service_disable_user(id, body, async_req=True)
+ >>> result = thread.get()
+ :param id: (required)
+ :type id: str
:param body: (required)
- :type body: V1beta1UserRequestBody
+ :type body: object
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_disable_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_disable_user_with_http_info(id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_disable_user_with_http_info(self, id : StrictStr, body : Dict[str, Any], **kwargs) -> ApiResponse: # noqa: E501
+ """Disable user # noqa: E501
+
+ Sets the state of the user as diabled.The user's membership to groups and organizations will still exist along with all it's roles for access control, but the user will not be able to log in and access the Frontier instance. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_disable_user_with_http_info(id, body, async_req=True)
+ >>> result = thread.get()
+
+ :param id: (required)
+ :type id: str
+ :param body: (required)
+ :type body: object
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_create_user_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1CreateUserResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- def _frontier_service_create_user_serialize(
- self,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _all_params = [
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_disable_user" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "object",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/users',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/users/{id}/disable', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_enable_user(self, id : StrictStr, body : Dict[str, Any], **kwargs) -> object: # noqa: E501
+ """Enable user # noqa: E501
+ Sets the state of the user as enabled. The user will be able to log in and access the Frontier instance. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_delete_user(
- self,
- id: StrictStr,
- _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:
- """Delete user
+ >>> thread = api.frontier_service_enable_user(id, body, async_req=True)
+ >>> result = thread.get()
- Delete an user permanently forever and all of its relations (organizations, groups, etc)
+ :param id: (required)
+ :type id: str
+ :param body: (required)
+ :type body: object
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: object
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_enable_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_enable_user_with_http_info(id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_enable_user_with_http_info(self, id : StrictStr, body : Dict[str, Any], **kwargs) -> ApiResponse: # noqa: E501
+ """Enable user # noqa: E501
+
+ Sets the state of the user as enabled. The user will be able to log in and access the Frontier instance. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_enable_user_with_http_info(id, body, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
+ :param body: (required)
+ :type body: object
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_delete_user_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_enable_user" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
+
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # set the HTTP header `Content-Type`
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
- _response_types_map: Dict[str, Optional[str]] = {
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
'200': "object",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/users/{id}/enable', 'POST',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- ).data
-
-
- @validate_call
- def frontier_service_delete_user_with_http_info(
- self,
- id: StrictStr,
- _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]:
- """Delete user
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
- Delete an user permanently forever and all of its relations (organizations, groups, etc)
+ @validate_arguments
+ def frontier_service_get_current_user(self, **kwargs) -> V1beta1GetCurrentUserResponse: # noqa: E501
+ """Get current user # noqa: E501
- :param id: (required)
- :type id: str
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_get_current_user(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1GetCurrentUserResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_get_current_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_get_current_user_with_http_info(**kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_get_current_user_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
+ """Get current user # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_get_current_user_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_delete_user_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1GetCurrentUserResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- @validate_call
- def frontier_service_delete_user_without_preload_content(
- self,
- id: StrictStr,
- _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:
- """Delete user
-
- Delete an user permanently forever and all of its relations (organizations, groups, etc)
-
- :param id: (required)
- :type id: str
- :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._frontier_service_delete_user_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_delete_user_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='DELETE',
- resource_path='/v1beta1/users/{id}',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_disable_user(
- self,
- id: StrictStr,
- body: Dict[str, Any],
- _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:
- """Disable user
-
- Sets the state of the user as diabled.The user's membership to groups and organizations will still exist along with all it's roles for access control, but the user will not be able to log in and access the Frontier instance.
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: object
- :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._frontier_service_disable_user_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_disable_user_with_http_info(
- self,
- id: StrictStr,
- body: Dict[str, Any],
- _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]:
- """Disable user
-
- Sets the state of the user as diabled.The user's membership to groups and organizations will still exist along with all it's roles for access control, but the user will not be able to log in and access the Frontier instance.
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: object
- :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._frontier_service_disable_user_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_disable_user_without_preload_content(
- self,
- id: StrictStr,
- body: Dict[str, Any],
- _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:
- """Disable user
-
- Sets the state of the user as diabled.The user's membership to groups and organizations will still exist along with all it's roles for access control, but the user will not be able to log in and access the Frontier instance.
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: object
- :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._frontier_service_disable_user_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_disable_user_serialize(
- self,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
- if body is not None:
- _body_params = body
-
-
- # 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] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/users/{id}/disable',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_enable_user(
- self,
- id: StrictStr,
- body: Dict[str, Any],
- _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:
- """Enable user
-
- Sets the state of the user as enabled. The user will be able to log in and access the Frontier instance.
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: object
- :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._frontier_service_enable_user_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_enable_user_with_http_info(
- self,
- id: StrictStr,
- body: Dict[str, Any],
- _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]:
- """Enable user
-
- Sets the state of the user as enabled. The user will be able to log in and access the Frontier instance.
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: object
- :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._frontier_service_enable_user_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_enable_user_without_preload_content(
- self,
- id: StrictStr,
- body: Dict[str, Any],
- _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:
- """Enable user
-
- Sets the state of the user as enabled. The user will be able to log in and access the Frontier instance.
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: object
- :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._frontier_service_enable_user_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "object",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_enable_user_serialize(
- self,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
- if body is not None:
- _body_params = body
-
-
- # 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] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='POST',
- resource_path='/v1beta1/users/{id}/enable',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_get_current_user(
- self,
- _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,
- ) -> V1beta1GetCurrentUserResponse:
- """Get current user
-
-
- :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._frontier_service_get_current_user_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetCurrentUserResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_current_user_with_http_info(
- self,
- _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[V1beta1GetCurrentUserResponse]:
- """Get current user
-
-
- :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._frontier_service_get_current_user_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetCurrentUserResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_current_user_without_preload_content(
- self,
- _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:
- """Get current user
-
-
- :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._frontier_service_get_current_user_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetCurrentUserResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_get_current_user_serialize(
- self,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _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
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/users/self',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_get_user(
- self,
- id: StrictStr,
- _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,
- ) -> V1beta1GetUserResponse:
- """Get user
-
- Get a user by id searched over all organizations in Frontier.
-
- :param id: (required)
- :type id: str
- :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._frontier_service_get_user_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetUserResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_user_with_http_info(
- self,
- id: StrictStr,
- _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[V1beta1GetUserResponse]:
- """Get user
-
- Get a user by id searched over all organizations in Frontier.
-
- :param id: (required)
- :type id: str
- :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._frontier_service_get_user_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetUserResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_get_user_without_preload_content(
- self,
- id: StrictStr,
- _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:
- """Get user
-
- Get a user by id searched over all organizations in Frontier.
-
- :param id: (required)
- :type id: str
- :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._frontier_service_get_user_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1GetUserResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_get_user_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/users/{id}',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_list_current_user_groups(
- self,
- org_id: Annotated[Optional[StrictStr], Field(description="org_id is optional filter over an organization")] = None,
- with_permissions: Optional[List[StrictStr]] = None,
- _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,
- ) -> V1beta1ListCurrentUserGroupsResponse:
- """List my groups
-
-
- :param org_id: org_id is optional filter over an organization
- :type org_id: str
- :param with_permissions:
- :type with_permissions: List[str]
- :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._frontier_service_list_current_user_groups_serialize(
- org_id=org_id,
- with_permissions=with_permissions,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListCurrentUserGroupsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_current_user_groups_with_http_info(
- self,
- org_id: Annotated[Optional[StrictStr], Field(description="org_id is optional filter over an organization")] = None,
- with_permissions: Optional[List[StrictStr]] = None,
- _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[V1beta1ListCurrentUserGroupsResponse]:
- """List my groups
-
-
- :param org_id: org_id is optional filter over an organization
- :type org_id: str
- :param with_permissions:
- :type with_permissions: List[str]
- :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._frontier_service_list_current_user_groups_serialize(
- org_id=org_id,
- with_permissions=with_permissions,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListCurrentUserGroupsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_current_user_groups_without_preload_content(
- self,
- org_id: Annotated[Optional[StrictStr], Field(description="org_id is optional filter over an organization")] = None,
- with_permissions: Optional[List[StrictStr]] = None,
- _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:
- """List my groups
-
-
- :param org_id: org_id is optional filter over an organization
- :type org_id: str
- :param with_permissions:
- :type with_permissions: List[str]
- :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._frontier_service_list_current_user_groups_serialize(
- org_id=org_id,
- with_permissions=with_permissions,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListCurrentUserGroupsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_list_current_user_groups_serialize(
- self,
- org_id,
- with_permissions,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _host = None
-
- _collection_formats: Dict[str, str] = {
-
- 'withPermissions': 'multi',
- }
-
- _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, str] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- # process the query parameters
- if org_id is not None:
-
- _query_params.append(('orgId', org_id))
-
- if with_permissions is not None:
-
- _query_params.append(('withPermissions', with_permissions))
-
- # process the header parameters
- # process the form parameters
- # process the body parameter
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/users/self/groups',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_list_current_user_invitations(
- self,
- _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,
- ) -> V1beta1ListCurrentUserInvitationsResponse:
- """List user invitations
-
- List all the invitations sent to current user.
-
- :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._frontier_service_list_current_user_invitations_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListCurrentUserInvitationsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_current_user_invitations_with_http_info(
- self,
- _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[V1beta1ListCurrentUserInvitationsResponse]:
- """List user invitations
-
- List all the invitations sent to current user.
-
- :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._frontier_service_list_current_user_invitations_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListCurrentUserInvitationsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_current_user_invitations_without_preload_content(
- self,
- _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:
- """List user invitations
-
- List all the invitations sent to current user.
-
- :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._frontier_service_list_current_user_invitations_serialize(
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListCurrentUserInvitationsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_list_current_user_invitations_serialize(
- self,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _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, str] = {}
- _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
-
-
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/users/self/invitations',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_list_organizations_by_current_user(
- self,
- state: Optional[StrictStr] = None,
- _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,
- ) -> V1beta1ListOrganizationsByCurrentUserResponse:
- """Get my organizations
-
- This API returns two list of organizations for the current logged in user. i) The list of orgs which the current user is already a part of ii) The list of organizations the user can join directly (based on domain whitelisted and verified by the org). This list will also contain orgs of which user is already a part of. Note: the domain needs to be verified by the org before the it is returned as one of the joinable orgs by domain
-
- :param state:
- :type state: str
- :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._frontier_service_list_organizations_by_current_user_serialize(
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationsByCurrentUserResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_organizations_by_current_user_with_http_info(
- self,
- state: Optional[StrictStr] = None,
- _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[V1beta1ListOrganizationsByCurrentUserResponse]:
- """Get my organizations
-
- This API returns two list of organizations for the current logged in user. i) The list of orgs which the current user is already a part of ii) The list of organizations the user can join directly (based on domain whitelisted and verified by the org). This list will also contain orgs of which user is already a part of. Note: the domain needs to be verified by the org before the it is returned as one of the joinable orgs by domain
-
- :param state:
- :type state: str
- :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._frontier_service_list_organizations_by_current_user_serialize(
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationsByCurrentUserResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_organizations_by_current_user_without_preload_content(
- self,
- state: Optional[StrictStr] = None,
- _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:
- """Get my organizations
-
- This API returns two list of organizations for the current logged in user. i) The list of orgs which the current user is already a part of ii) The list of organizations the user can join directly (based on domain whitelisted and verified by the org). This list will also contain orgs of which user is already a part of. Note: the domain needs to be verified by the org before the it is returned as one of the joinable orgs by domain
-
- :param state:
- :type state: str
- :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._frontier_service_list_organizations_by_current_user_serialize(
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationsByCurrentUserResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_list_organizations_by_current_user_serialize(
- self,
- state,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _host = None
-
- _collection_formats: Dict[str, str] = {
-
- }
+ _all_params = [
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_get_current_user" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
+ _path_params = {}
+
# process the query parameters
- if state is not None:
-
- _query_params.append(('state', state))
-
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/users/self/organizations',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_list_organizations_by_user(
- self,
- id: StrictStr,
- _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,
- ) -> V1beta1ListOrganizationsByUserResponse:
- """Get user organizations
-
- This API returns two list of organizations for the user. i) The list of orgs which the current user is already a part of ii) The list of organizations the user can join directly (based on domain whitelisted and verified by the org). This list will also contain orgs of which user is already a part of. Note: the domain needs to be verified by the org before the it is returned as one of the joinable orgs by domain
-
- :param id: (required)
- :type id: str
- :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._frontier_service_list_organizations_by_user_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ _auth_settings = ['Basic'] # noqa: E501
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationsByUserResponse",
+ _response_types_map = {
+ '200': "V1beta1GetCurrentUserResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/users/self', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- ).data
-
-
- @validate_call
- def frontier_service_list_organizations_by_user_with_http_info(
- self,
- id: StrictStr,
- _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[V1beta1ListOrganizationsByUserResponse]:
- """Get user organizations
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
- This API returns two list of organizations for the user. i) The list of orgs which the current user is already a part of ii) The list of organizations the user can join directly (based on domain whitelisted and verified by the org). This list will also contain orgs of which user is already a part of. Note: the domain needs to be verified by the org before the it is returned as one of the joinable orgs by domain
+ @validate_arguments
+ def frontier_service_get_user(self, id : StrictStr, **kwargs) -> V1beta1GetUserResponse: # noqa: E501
+ """Get user # noqa: E501
+
+ Get a user by id searched over all organizations in Frontier. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_get_user(id, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_organizations_by_user_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationsByUserResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_organizations_by_user_without_preload_content(
- self,
- id: StrictStr,
- _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:
- """Get user organizations
-
- This API returns two list of organizations for the user. i) The list of orgs which the current user is already a part of ii) The list of organizations the user can join directly (based on domain whitelisted and verified by the org). This list will also contain orgs of which user is already a part of. Note: the domain needs to be verified by the org before the it is returned as one of the joinable orgs by domain
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1GetUserResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_get_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_get_user_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_get_user_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """Get user # noqa: E501
+
+ Get a user by id searched over all organizations in Frontier. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_get_user_with_http_info(id, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_organizations_by_user_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListOrganizationsByUserResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1GetUserResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- def _frontier_service_list_organizations_by_user_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_get_user" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1GetUserResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/users/{id}/organizations',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/users/{id}', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_current_user_groups(self, org_id : Annotated[Optional[StrictStr], Field(description="org_id is optional filter over an organization")] = None, with_permissions : Optional[conlist(StrictStr)] = None, with_member_count : Optional[StrictBool] = None, **kwargs) -> V1beta1ListCurrentUserGroupsResponse: # noqa: E501
+ """List my groups # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_list_projects_by_current_user(
- self,
- org_id: Annotated[Optional[StrictStr], Field(description="org_id is optional and filter projects by org")] = None,
- with_permissions: Annotated[Optional[List[StrictStr]], Field(description="list of permissions needs to be checked against each project query params are set as with_permissions=get&with_permissions=delete to be represented as array")] = None,
- _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,
- ) -> V1beta1ListProjectsByCurrentUserResponse:
- """Get my projects
-
- Get all projects the current user belongs to
+ >>> thread = api.frontier_service_list_current_user_groups(org_id, with_permissions, with_member_count, async_req=True)
+ >>> result = thread.get()
- :param org_id: org_id is optional and filter projects by org
+ :param org_id: org_id is optional filter over an organization
:type org_id: str
- :param with_permissions: list of permissions needs to be checked against each project query params are set as with_permissions=get&with_permissions=delete to be represented as array
+ :param with_permissions:
:type with_permissions: List[str]
- :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
+ :param with_member_count:
+ :type with_member_count: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_projects_by_current_user_serialize(
- org_id=org_id,
- with_permissions=with_permissions,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListProjectsByCurrentUserResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_projects_by_current_user_with_http_info(
- self,
- org_id: Annotated[Optional[StrictStr], Field(description="org_id is optional and filter projects by org")] = None,
- with_permissions: Annotated[Optional[List[StrictStr]], Field(description="list of permissions needs to be checked against each project query params are set as with_permissions=get&with_permissions=delete to be represented as array")] = None,
- _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[V1beta1ListProjectsByCurrentUserResponse]:
- """Get my projects
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListCurrentUserGroupsResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_current_user_groups_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_current_user_groups_with_http_info(org_id, with_permissions, with_member_count, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_current_user_groups_with_http_info(self, org_id : Annotated[Optional[StrictStr], Field(description="org_id is optional filter over an organization")] = None, with_permissions : Optional[conlist(StrictStr)] = None, with_member_count : Optional[StrictBool] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """List my groups # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_current_user_groups_with_http_info(org_id, with_permissions, with_member_count, async_req=True)
+ >>> result = thread.get()
- Get all projects the current user belongs to
-
- :param org_id: org_id is optional and filter projects by org
+ :param org_id: org_id is optional filter over an organization
:type org_id: str
- :param with_permissions: list of permissions needs to be checked against each project query params are set as with_permissions=get&with_permissions=delete to be represented as array
+ :param with_permissions:
:type with_permissions: List[str]
+ :param with_member_count:
+ :type with_member_count: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_projects_by_current_user_serialize(
- org_id=org_id,
- with_permissions=with_permissions,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListProjectsByCurrentUserResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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,
- )
-
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListCurrentUserGroupsResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- @validate_call
- def frontier_service_list_projects_by_current_user_without_preload_content(
- self,
- org_id: Annotated[Optional[StrictStr], Field(description="org_id is optional and filter projects by org")] = None,
- with_permissions: Annotated[Optional[List[StrictStr]], Field(description="list of permissions needs to be checked against each project query params are set as with_permissions=get&with_permissions=delete to be represented as array")] = None,
- _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:
- """Get my projects
-
- Get all projects the current user belongs to
-
- :param org_id: org_id is optional and filter projects by org
- :type org_id: str
- :param with_permissions: list of permissions needs to be checked against each project query params are set as with_permissions=get&with_permissions=delete to be represented as array
- :type with_permissions: List[str]
- :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._frontier_service_list_projects_by_current_user_serialize(
- org_id=org_id,
- with_permissions=with_permissions,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ _params = locals()
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListProjectsByCurrentUserResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ _all_params = [
+ 'org_id',
+ 'with_permissions',
+ 'with_member_count'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_current_user_groups" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+ _collection_formats = {}
- def _frontier_service_list_projects_by_current_user_serialize(
- self,
- org_id,
- with_permissions,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # process the path parameters
+ _path_params = {}
- _host = None
+ # process the query parameters
+ _query_params = []
+ if _params.get('org_id') is not None: # noqa: E501
+ _query_params.append(('orgId', _params['org_id']))
- _collection_formats: Dict[str, str] = {
-
- 'withPermissions': 'multi',
- }
+ if _params.get('with_permissions') is not None: # noqa: E501
+ _query_params.append(('withPermissions', _params['with_permissions']))
+ _collection_formats['withPermissions'] = 'multi'
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ if _params.get('with_member_count') is not None: # noqa: E501
+ _query_params.append(('withMemberCount', _params['with_member_count']))
- # process the path parameters
- # process the query parameters
- if org_id is not None:
-
- _query_params.append(('orgId', org_id))
-
- if with_permissions is not None:
-
- _query_params.append(('withPermissions', with_permissions))
-
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListCurrentUserGroupsResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/users/self/projects',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/users/self/groups', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_current_user_invitations(self, **kwargs) -> V1beta1ListCurrentUserInvitationsResponse: # noqa: E501
+ """List user invitations # noqa: E501
+ List all the invitations sent to current user. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.frontier_service_list_current_user_invitations(async_req=True)
+ >>> result = thread.get()
- @validate_call
- def frontier_service_list_projects_by_user(
- self,
- id: StrictStr,
- _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,
- ) -> V1beta1ListProjectsByUserResponse:
- """Get user projects
-
- Get all the projects a user belongs to.
-
- :param id: (required)
- :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListCurrentUserInvitationsResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_current_user_invitations_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_current_user_invitations_with_http_info(**kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_current_user_invitations_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
+ """List user invitations # noqa: E501
+
+ List all the invitations sent to current user. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_current_user_invitations_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_projects_by_user_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListCurrentUserInvitationsResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListProjectsByUserResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_projects_by_user_with_http_info(
- self,
- id: StrictStr,
- _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[V1beta1ListProjectsByUserResponse]:
- """Get user projects
+ _params = locals()
- Get all the projects a user belongs to.
+ _all_params = [
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_current_user_invitations" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- :param id: (required)
- :type id: str
- :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._frontier_service_list_projects_by_user_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ _collection_formats = {}
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListProjectsByUserResponse",
+ # process the path parameters
+ _path_params = {}
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListCurrentUserInvitationsResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/users/self/invitations', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_organizations_by_current_user(self, state : Optional[StrictStr] = None, **kwargs) -> V1beta1ListOrganizationsByCurrentUserResponse: # noqa: E501
+ """Get my organizations # noqa: E501
- @validate_call
- def frontier_service_list_projects_by_user_without_preload_content(
- self,
- id: StrictStr,
- _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:
- """Get user projects
+ This API returns two list of organizations for the current logged in user. i) The list of orgs which the current user is already a part of ii) The list of organizations the user can join directly (based on domain whitelisted and verified by the org). This list will also contain orgs of which user is already a part of. Note: the domain needs to be verified by the org before the it is returned as one of the joinable orgs by domain # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Get all the projects a user belongs to.
+ >>> thread = api.frontier_service_list_organizations_by_current_user(state, async_req=True)
+ >>> result = thread.get()
- :param id: (required)
- :type id: str
+ :param state:
+ :type state: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListOrganizationsByCurrentUserResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_organizations_by_current_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_organizations_by_current_user_with_http_info(state, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_organizations_by_current_user_with_http_info(self, state : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """Get my organizations # noqa: E501
+
+ This API returns two list of organizations for the current logged in user. i) The list of orgs which the current user is already a part of ii) The list of organizations the user can join directly (based on domain whitelisted and verified by the org). This list will also contain orgs of which user is already a part of. Note: the domain needs to be verified by the org before the it is returned as one of the joinable orgs by domain # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_organizations_by_current_user_with_http_info(state, async_req=True)
+ >>> result = thread.get()
+
+ :param state:
+ :type state: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_projects_by_user_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListProjectsByUserResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_list_projects_by_user_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListOrganizationsByCurrentUserResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _host = None
+ _params = locals()
- _collection_formats: Dict[str, str] = {
-
- }
+ _all_params = [
+ 'state'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_organizations_by_current_user" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
- if id is not None:
- _path_params['id'] = id
+ _path_params = {}
+
# process the query parameters
+ _query_params = []
+ if _params.get('state') is not None: # noqa: E501
+ _query_params.append(('state', _params['state']))
+
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListOrganizationsByCurrentUserResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/users/{id}/projects',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/users/self/organizations', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_organizations_by_user(self, id : StrictStr, **kwargs) -> V1beta1ListOrganizationsByUserResponse: # noqa: E501
+ """Get user organizations # noqa: E501
+ This API returns two list of organizations for the user. i) The list of orgs which the current user is already a part of ii) The list of organizations the user can join directly (based on domain whitelisted and verified by the org). This list will also contain orgs of which user is already a part of. Note: the domain needs to be verified by the org before the it is returned as one of the joinable orgs by domain # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_list_user_groups(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the user to get groups for.")],
- org_id: Annotated[Optional[StrictStr], Field(description="The organization ID to filter groups by. If not provided, groups from all organizations are returned.")] = None,
- _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,
- ) -> V1beta1ListUserGroupsResponse:
- """List user groups
+ >>> thread = api.frontier_service_list_organizations_by_user(id, async_req=True)
+ >>> result = thread.get()
- Lists all the groups a user belongs to across all organization in Frontier. To get the groups of a user in a specific organization, use the org_id filter in the query parameter.
+ :param id: (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListOrganizationsByUserResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_organizations_by_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_organizations_by_user_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_organizations_by_user_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """Get user organizations # noqa: E501
+
+ This API returns two list of organizations for the user. i) The list of orgs which the current user is already a part of ii) The list of organizations the user can join directly (based on domain whitelisted and verified by the org). This list will also contain orgs of which user is already a part of. Note: the domain needs to be verified by the org before the it is returned as one of the joinable orgs by domain # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_organizations_by_user_with_http_info(id, async_req=True)
+ >>> result = thread.get()
- :param id: The unique ID of the user to get groups for. (required)
+ :param id: (required)
:type id: str
- :param org_id: The organization ID to filter groups by. If not provided, groups from all organizations are returned.
- :type org_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_user_groups_serialize(
- id=id,
- org_id=org_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListOrganizationsByUserResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListUserGroupsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_user_groups_with_http_info(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the user to get groups for.")],
- org_id: Annotated[Optional[StrictStr], Field(description="The organization ID to filter groups by. If not provided, groups from all organizations are returned.")] = None,
- _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[V1beta1ListUserGroupsResponse]:
- """List user groups
+ _params = locals()
- Lists all the groups a user belongs to across all organization in Frontier. To get the groups of a user in a specific organization, use the org_id filter in the query parameter.
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_organizations_by_user" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- :param id: The unique ID of the user to get groups for. (required)
- :type id: str
- :param org_id: The organization ID to filter groups by. If not provided, groups from all organizations are returned.
- :type org_id: str
- :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._frontier_service_list_user_groups_serialize(
- id=id,
- org_id=org_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ _collection_formats = {}
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListUserGroupsResponse",
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
+
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListOrganizationsByUserResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/users/{id}/organizations', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_projects_by_current_user(self, org_id : Annotated[Optional[StrictStr], Field(description="org_id is optional and filter projects by org")] = None, with_permissions : Annotated[Optional[conlist(StrictStr)], Field(description="list of permissions needs to be checked against each project query params are set as with_permissions=get&with_permissions=delete to be represented as array")] = None, non_inherited : Annotated[Optional[StrictBool], Field(description="Note: this is a bad design and would recommend against using this filter It is used to list only projects which are explicitly given permission to user. A user could get permission to access a project either via getting access from organization level role or a group. But for some reason we want only users who could have inherited these permissions from top but we only want explictly added ones.")] = None, with_member_count : Optional[StrictBool] = None, **kwargs) -> V1beta1ListProjectsByCurrentUserResponse: # noqa: E501
+ """Get my projects # noqa: E501
- @validate_call
- def frontier_service_list_user_groups_without_preload_content(
- self,
- id: Annotated[StrictStr, Field(description="The unique ID of the user to get groups for.")],
- org_id: Annotated[Optional[StrictStr], Field(description="The organization ID to filter groups by. If not provided, groups from all organizations are returned.")] = None,
- _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:
- """List user groups
+ Get all projects the current user belongs to # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- Lists all the groups a user belongs to across all organization in Frontier. To get the groups of a user in a specific organization, use the org_id filter in the query parameter.
+ >>> thread = api.frontier_service_list_projects_by_current_user(org_id, with_permissions, non_inherited, with_member_count, async_req=True)
+ >>> result = thread.get()
- :param id: The unique ID of the user to get groups for. (required)
- :type id: str
- :param org_id: The organization ID to filter groups by. If not provided, groups from all organizations are returned.
+ :param org_id: org_id is optional and filter projects by org
+ :type org_id: str
+ :param with_permissions: list of permissions needs to be checked against each project query params are set as with_permissions=get&with_permissions=delete to be represented as array
+ :type with_permissions: List[str]
+ :param non_inherited: Note: this is a bad design and would recommend against using this filter It is used to list only projects which are explicitly given permission to user. A user could get permission to access a project either via getting access from organization level role or a group. But for some reason we want only users who could have inherited these permissions from top but we only want explictly added ones.
+ :type non_inherited: bool
+ :param with_member_count:
+ :type with_member_count: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListProjectsByCurrentUserResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_projects_by_current_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_projects_by_current_user_with_http_info(org_id, with_permissions, non_inherited, with_member_count, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_projects_by_current_user_with_http_info(self, org_id : Annotated[Optional[StrictStr], Field(description="org_id is optional and filter projects by org")] = None, with_permissions : Annotated[Optional[conlist(StrictStr)], Field(description="list of permissions needs to be checked against each project query params are set as with_permissions=get&with_permissions=delete to be represented as array")] = None, non_inherited : Annotated[Optional[StrictBool], Field(description="Note: this is a bad design and would recommend against using this filter It is used to list only projects which are explicitly given permission to user. A user could get permission to access a project either via getting access from organization level role or a group. But for some reason we want only users who could have inherited these permissions from top but we only want explictly added ones.")] = None, with_member_count : Optional[StrictBool] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """Get my projects # noqa: E501
+
+ Get all projects the current user belongs to # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_projects_by_current_user_with_http_info(org_id, with_permissions, non_inherited, with_member_count, async_req=True)
+ >>> result = thread.get()
+
+ :param org_id: org_id is optional and filter projects by org
:type org_id: str
+ :param with_permissions: list of permissions needs to be checked against each project query params are set as with_permissions=get&with_permissions=delete to be represented as array
+ :type with_permissions: List[str]
+ :param non_inherited: Note: this is a bad design and would recommend against using this filter It is used to list only projects which are explicitly given permission to user. A user could get permission to access a project either via getting access from organization level role or a group. But for some reason we want only users who could have inherited these permissions from top but we only want explictly added ones.
+ :type non_inherited: bool
+ :param with_member_count:
+ :type with_member_count: bool
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_user_groups_serialize(
- id=id,
- org_id=org_id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListProjectsByCurrentUserResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'org_id',
+ 'with_permissions',
+ 'non_inherited',
+ 'with_member_count'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_projects_by_current_user" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListUserGroupsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ _collection_formats = {}
+ # process the path parameters
+ _path_params = {}
- def _frontier_service_list_user_groups_serialize(
- self,
- id,
- org_id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ # process the query parameters
+ _query_params = []
+ if _params.get('org_id') is not None: # noqa: E501
+ _query_params.append(('orgId', _params['org_id']))
- _host = None
+ if _params.get('with_permissions') is not None: # noqa: E501
+ _query_params.append(('withPermissions', _params['with_permissions']))
+ _collection_formats['withPermissions'] = 'multi'
- _collection_formats: Dict[str, str] = {
-
- }
+ if _params.get('non_inherited') is not None: # noqa: E501
+ _query_params.append(('nonInherited', _params['non_inherited']))
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ if _params.get('with_member_count') is not None: # noqa: E501
+ _query_params.append(('withMemberCount', _params['with_member_count']))
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
- # process the query parameters
- if org_id is not None:
-
- _query_params.append(('orgId', org_id))
-
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListProjectsByCurrentUserResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/users/{id}/groups',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/users/self/projects', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_projects_by_user(self, id : StrictStr, **kwargs) -> V1beta1ListProjectsByUserResponse: # noqa: E501
+ """Get user projects # noqa: E501
+ Get all the projects a user belongs to. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_list_user_invitations(
- self,
- id: Annotated[StrictStr, Field(description="The user email to list the invitations for.")],
- _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,
- ) -> V1beta1ListUserInvitationsResponse:
- """List user invitations
+ >>> thread = api.frontier_service_list_projects_by_user(id, async_req=True)
+ >>> result = thread.get()
- List all the invitations sent to a user.
+ :param id: (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListProjectsByUserResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_projects_by_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_projects_by_user_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_projects_by_user_with_http_info(self, id : StrictStr, **kwargs) -> ApiResponse: # noqa: E501
+ """Get user projects # noqa: E501
+
+ Get all the projects a user belongs to. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_projects_by_user_with_http_info(id, async_req=True)
+ >>> result = thread.get()
- :param id: The user email to list the invitations for. (required)
+ :param id: (required)
:type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_user_invitations_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListProjectsByUserResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListUserInvitationsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_user_invitations_with_http_info(
- self,
- id: Annotated[StrictStr, Field(description="The user email to list the invitations for.")],
- _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[V1beta1ListUserInvitationsResponse]:
- """List user invitations
+ _params = locals()
+
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_projects_by_user" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- List all the invitations sent to a user.
+ _collection_formats = {}
- :param id: The user email to list the invitations for. (required)
- :type id: str
- :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._frontier_service_list_user_invitations_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListUserInvitationsResponse",
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListProjectsByUserResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/users/{id}/projects', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- )
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_user_groups(self, id : Annotated[StrictStr, Field(..., description="The unique ID of the user to get groups for.")], org_id : Annotated[Optional[StrictStr], Field(description="The organization ID to filter groups by. If not provided, groups from all organizations are returned.")] = None, **kwargs) -> V1beta1ListUserGroupsResponse: # noqa: E501
+ """List user groups # noqa: E501
- @validate_call
- def frontier_service_list_user_invitations_without_preload_content(
- self,
- id: Annotated[StrictStr, Field(description="The user email to list the invitations for.")],
- _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:
- """List user invitations
+ Lists all the groups a user belongs to across all organization in Frontier. To get the groups of a user in a specific organization, use the org_id filter in the query parameter. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- List all the invitations sent to a user.
+ >>> thread = api.frontier_service_list_user_groups(id, org_id, async_req=True)
+ >>> result = thread.get()
- :param id: The user email to list the invitations for. (required)
+ :param id: The unique ID of the user to get groups for. (required)
+ :type id: str
+ :param org_id: The organization ID to filter groups by. If not provided, groups from all organizations are returned.
+ :type org_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListUserGroupsResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_user_groups_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_user_groups_with_http_info(id, org_id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_user_groups_with_http_info(self, id : Annotated[StrictStr, Field(..., description="The unique ID of the user to get groups for.")], org_id : Annotated[Optional[StrictStr], Field(description="The organization ID to filter groups by. If not provided, groups from all organizations are returned.")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """List user groups # noqa: E501
+
+ Lists all the groups a user belongs to across all organization in Frontier. To get the groups of a user in a specific organization, use the org_id filter in the query parameter. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_user_groups_with_http_info(id, org_id, async_req=True)
+ >>> result = thread.get()
+
+ :param id: The unique ID of the user to get groups for. (required)
:type id: str
+ :param org_id: The organization ID to filter groups by. If not provided, groups from all organizations are returned.
+ :type org_id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_user_invitations_serialize(
- id=id,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListUserInvitationsResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListUserGroupsResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- def _frontier_service_list_user_invitations_serialize(
- self,
- id,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _all_params = [
+ 'id',
+ 'org_id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_user_groups" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
+ if _params.get('org_id') is not None: # noqa: E501
+ _query_params.append(('orgId', _params['org_id']))
+
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
-
-
+ _body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
+ ['application/json']) # noqa: E501
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListUserGroupsResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/users/{id}/invitations',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/users/{id}/groups', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
+ _request_auth=_params.get('_request_auth'))
+ @validate_arguments
+ def frontier_service_list_user_invitations(self, id : Annotated[StrictStr, Field(..., description="The user email to list the invitations for.")], **kwargs) -> V1beta1ListUserInvitationsResponse: # noqa: E501
+ """List user invitations # noqa: E501
+ List all the invitations sent to a user. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
- @validate_call
- def frontier_service_list_users(
- self,
- page_size: Annotated[Optional[StrictInt], Field(description="The maximum number of users to return per page. The default is 50.")] = None,
- page_num: Annotated[Optional[StrictInt], Field(description="The page number to return. The default is 1.")] = None,
- keyword: Annotated[Optional[StrictStr], Field(description="The keyword to search for in name or email.")] = None,
- org_id: Annotated[Optional[StrictStr], Field(description="The organization ID to filter users by.")] = None,
- group_id: Annotated[Optional[StrictStr], Field(description="The group id to filter by.")] = None,
- state: Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None,
- _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,
- ) -> V1beta1ListUsersResponse:
- """List public users
+ >>> thread = api.frontier_service_list_user_invitations(id, async_req=True)
+ >>> result = thread.get()
- Returns the users from all the organizations in a Frontier instance. It can be filtered by keyword, organization, group and state. Additionally you can include page number and page size for pagination.
+ :param id: The user email to list the invitations for. (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListUserInvitationsResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_user_invitations_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_user_invitations_with_http_info(id, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_user_invitations_with_http_info(self, id : Annotated[StrictStr, Field(..., description="The user email to list the invitations for.")], **kwargs) -> ApiResponse: # noqa: E501
+ """List user invitations # noqa: E501
+
+ List all the invitations sent to a user. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_user_invitations_with_http_info(id, async_req=True)
+ >>> result = thread.get()
- :param page_size: The maximum number of users to return per page. The default is 50.
- :type page_size: int
- :param page_num: The page number to return. The default is 1.
- :type page_num: int
- :param keyword: The keyword to search for in name or email.
- :type keyword: str
- :param org_id: The organization ID to filter users by.
- :type org_id: str
- :param group_id: The group id to filter by.
- :type group_id: str
- :param state: The state to filter by. It can be enabled or disabled.
- :type state: str
+ :param id: The user email to list the invitations for. (required)
+ :type id: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_users_serialize(
- page_size=page_size,
- page_num=page_num,
- keyword=keyword,
- org_id=org_id,
- group_id=group_id,
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListUserInvitationsResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListUsersResponse",
+ _params = locals()
+
+ _all_params = [
+ 'id'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_user_invitations" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
+
+
+ # process the query parameters
+ _query_params = []
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1ListUserInvitationsResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/users/{id}/invitations', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- ).data
-
-
- @validate_call
- def frontier_service_list_users_with_http_info(
- self,
- page_size: Annotated[Optional[StrictInt], Field(description="The maximum number of users to return per page. The default is 50.")] = None,
- page_num: Annotated[Optional[StrictInt], Field(description="The page number to return. The default is 1.")] = None,
- keyword: Annotated[Optional[StrictStr], Field(description="The keyword to search for in name or email.")] = None,
- org_id: Annotated[Optional[StrictStr], Field(description="The organization ID to filter users by.")] = None,
- group_id: Annotated[Optional[StrictStr], Field(description="The group id to filter by.")] = None,
- state: Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None,
- _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[V1beta1ListUsersResponse]:
- """List public users
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+
+ @validate_arguments
+ def frontier_service_list_users(self, page_size : Annotated[Optional[StrictInt], Field(description="The maximum number of users to return per page. The default is 50.")] = None, page_num : Annotated[Optional[StrictInt], Field(description="The page number to return. The default is 1.")] = None, keyword : Annotated[Optional[StrictStr], Field(description="The keyword to search for in name or email.")] = None, org_id : Annotated[Optional[StrictStr], Field(description="The organization ID to filter users by.")] = None, group_id : Annotated[Optional[StrictStr], Field(description="The group id to filter by.")] = None, state : Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None, **kwargs) -> V1beta1ListUsersResponse: # noqa: E501
+ """List public users # noqa: E501
- Returns the users from all the organizations in a Frontier instance. It can be filtered by keyword, organization, group and state. Additionally you can include page number and page size for pagination.
+ Returns the users from all the organizations in a Frontier instance. It can be filtered by keyword, organization, group and state. Additionally you can include page number and page size for pagination. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_users(page_size, page_num, keyword, org_id, group_id, state, async_req=True)
+ >>> result = thread.get()
:param page_size: The maximum number of users to return per page. The default is 50.
:type page_size: int
@@ -4575,87 +2366,33 @@ def frontier_service_list_users_with_http_info(
:type group_id: str
:param state: The state to filter by. It can be enabled or disabled.
:type state: str
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_users_serialize(
- page_size=page_size,
- page_num=page_num,
- keyword=keyword,
- org_id=org_id,
- group_id=group_id,
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListUsersResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_list_users_without_preload_content(
- self,
- page_size: Annotated[Optional[StrictInt], Field(description="The maximum number of users to return per page. The default is 50.")] = None,
- page_num: Annotated[Optional[StrictInt], Field(description="The page number to return. The default is 1.")] = None,
- keyword: Annotated[Optional[StrictStr], Field(description="The keyword to search for in name or email.")] = None,
- org_id: Annotated[Optional[StrictStr], Field(description="The organization ID to filter users by.")] = None,
- group_id: Annotated[Optional[StrictStr], Field(description="The group id to filter by.")] = None,
- state: Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None,
- _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:
- """List public users
-
- Returns the users from all the organizations in a Frontier instance. It can be filtered by keyword, organization, group and state. Additionally you can include page number and page size for pagination.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1ListUsersResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_list_users_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_list_users_with_http_info(page_size, page_num, keyword, org_id, group_id, state, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_list_users_with_http_info(self, page_size : Annotated[Optional[StrictInt], Field(description="The maximum number of users to return per page. The default is 50.")] = None, page_num : Annotated[Optional[StrictInt], Field(description="The page number to return. The default is 1.")] = None, keyword : Annotated[Optional[StrictStr], Field(description="The keyword to search for in name or email.")] = None, org_id : Annotated[Optional[StrictStr], Field(description="The organization ID to filter users by.")] = None, group_id : Annotated[Optional[StrictStr], Field(description="The group id to filter by.")] = None, state : Annotated[Optional[StrictStr], Field(description="The state to filter by. It can be enabled or disabled.")] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """List public users # noqa: E501
+
+ Returns the users from all the organizations in a Frontier instance. It can be filtered by keyword, organization, group and state. Additionally you can include page number and page size for pagination. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_list_users_with_http_info(page_size, page_num, keyword, org_id, group_id, state, async_req=True)
+ >>> result = thread.get()
:param page_size: The maximum number of users to return per page. The default is 50.
:type page_size: int
@@ -4669,737 +2406,432 @@ def frontier_service_list_users_without_preload_content(
:type group_id: str
:param state: The state to filter by. It can be enabled or disabled.
:type state: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_list_users_serialize(
- page_size=page_size,
- page_num=page_num,
- keyword=keyword,
- org_id=org_id,
- group_id=group_id,
- state=state,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1ListUsersResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _frontier_service_list_users_serialize(
- self,
- page_size,
- page_num,
- keyword,
- org_id,
- group_id,
- state,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
-
- _host = None
-
- _collection_formats: Dict[str, str] = {
-
- }
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1ListUsersResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'page_size',
+ 'page_num',
+ 'keyword',
+ 'org_id',
+ 'group_id',
+ 'state'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_list_users" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
- # process the query parameters
- if page_size is not None:
-
- _query_params.append(('pageSize', page_size))
-
- if page_num is not None:
-
- _query_params.append(('pageNum', page_num))
-
- if keyword is not None:
-
- _query_params.append(('keyword', keyword))
-
- if org_id is not None:
-
- _query_params.append(('orgId', org_id))
-
- if group_id is not None:
-
- _query_params.append(('groupId', group_id))
-
- if state is not None:
-
- _query_params.append(('state', state))
-
- # process the header parameters
- # process the form parameters
- # process the body parameter
-
+ _path_params = {}
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ # process the query parameters
+ _query_params = []
+ if _params.get('page_size') is not None: # noqa: E501
+ _query_params.append(('pageSize', _params['page_size']))
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/v1beta1/users',
- 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
- )
+ if _params.get('page_num') is not None: # noqa: E501
+ _query_params.append(('pageNum', _params['page_num']))
+ if _params.get('keyword') is not None: # noqa: E501
+ _query_params.append(('keyword', _params['keyword']))
+ if _params.get('org_id') is not None: # noqa: E501
+ _query_params.append(('orgId', _params['org_id']))
+ if _params.get('group_id') is not None: # noqa: E501
+ _query_params.append(('groupId', _params['group_id']))
- @validate_call
- def frontier_service_update_current_user(
- self,
- body: V1beta1UserRequestBody,
- _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,
- ) -> V1beta1UpdateCurrentUserResponse:
- """Update current user
+ if _params.get('state') is not None: # noqa: E501
+ _query_params.append(('state', _params['state']))
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
- :param body: (required)
- :type body: V1beta1UserRequestBody
- :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._frontier_service_update_current_user_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ # authentication setting
+ _auth_settings = ['Basic'] # noqa: E501
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateCurrentUserResponse",
+ _response_types_map = {
+ '200': "V1beta1ListUsersResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/users', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- ).data
-
-
- @validate_call
- def frontier_service_update_current_user_with_http_info(
- self,
- body: V1beta1UserRequestBody,
- _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[V1beta1UpdateCurrentUserResponse]:
- """Update current user
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+
+ @validate_arguments
+ def frontier_service_update_current_user(self, body : V1beta1UserRequestBody, **kwargs) -> V1beta1UpdateCurrentUserResponse: # noqa: E501
+ """Update current user # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_update_current_user(body, async_req=True)
+ >>> result = thread.get()
:param body: (required)
:type body: V1beta1UserRequestBody
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_update_current_user_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateCurrentUserResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_update_current_user_without_preload_content(
- self,
- body: V1beta1UserRequestBody,
- _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:
- """Update current user
-
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1UpdateCurrentUserResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_update_current_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_update_current_user_with_http_info(body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_update_current_user_with_http_info(self, body : V1beta1UserRequestBody, **kwargs) -> ApiResponse: # noqa: E501
+ """Update current user # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_update_current_user_with_http_info(body, async_req=True)
+ >>> result = thread.get()
:param body: (required)
:type body: V1beta1UserRequestBody
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_update_current_user_serialize(
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateCurrentUserResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1UpdateCurrentUserResponse, status_code(int), headers(HTTPHeaderDict))
+ """
- def _frontier_service_update_current_user_serialize(
- self,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _params = locals()
- _host = None
-
- _collection_formats: Dict[str, str] = {
-
- }
+ _all_params = [
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_update_current_user" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _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, str] = {}
- _body_params: Optional[bytes] = None
+ _collection_formats = {}
# process the path parameters
+ _path_params = {}
+
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
-
- return self.api_client.param_serialize(
- method='PUT',
- resource_path='/v1beta1/users/self',
- 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
- )
-
-
-
-
- @validate_call
- def frontier_service_update_user(
- self,
- id: StrictStr,
- body: V1beta1UserRequestBody,
- _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,
- ) -> V1beta1UpdateUserResponse:
- """Update user
-
-
- :param id: (required)
- :type id: str
- :param body: (required)
- :type body: V1beta1UserRequestBody
- :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._frontier_service_update_user_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
+ _auth_settings = ['Basic'] # noqa: E501
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateUserResponse",
+ _response_types_map = {
+ '200': "V1beta1UpdateCurrentUserResponse",
'400': "RpcStatus",
'401': "RpcStatus",
'403': "RpcStatus",
'404': "RpcStatus",
'500': "RpcStatus",
-
-
}
- 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,
+
+ return self.api_client.call_api(
+ '/v1beta1/users/self', 'PUT',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
response_types_map=_response_types_map,
- ).data
-
-
- @validate_call
- def frontier_service_update_user_with_http_info(
- self,
- id: StrictStr,
- body: V1beta1UserRequestBody,
- _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[V1beta1UpdateUserResponse]:
- """Update user
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+
+ @validate_arguments
+ def frontier_service_update_user(self, id : StrictStr, body : V1beta1UserRequestBody, **kwargs) -> V1beta1UpdateUserResponse: # noqa: E501
+ """Update user # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.frontier_service_update_user(id, body, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
:param body: (required)
:type body: V1beta1UserRequestBody
- :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
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :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.
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_update_user_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateUserResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- 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 frontier_service_update_user_without_preload_content(
- self,
- id: StrictStr,
- body: V1beta1UserRequestBody,
- _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:
- """Update user
-
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: V1beta1UpdateUserResponse
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the frontier_service_update_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.frontier_service_update_user_with_http_info(id, body, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def frontier_service_update_user_with_http_info(self, id : StrictStr, body : V1beta1UserRequestBody, **kwargs) -> ApiResponse: # noqa: E501
+ """Update user # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.frontier_service_update_user_with_http_info(id, body, async_req=True)
+ >>> result = thread.get()
:param id: (required)
:type id: str
:param body: (required)
:type body: V1beta1UserRequestBody
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
: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.
+ 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
+ :type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
- """ # noqa: E501
-
- _param = self._frontier_service_update_user_serialize(
- id=id,
- body=body,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "V1beta1UpdateUserResponse",
- '400': "RpcStatus",
- '401': "RpcStatus",
- '403': "RpcStatus",
- '404': "RpcStatus",
- '500': "RpcStatus",
-
-
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(V1beta1UpdateUserResponse, status_code(int), headers(HTTPHeaderDict))
+ """
+ _params = locals()
- def _frontier_service_update_user_serialize(
- self,
- id,
- body,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> Tuple:
+ _all_params = [
+ 'id',
+ 'body'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method frontier_service_update_user" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
- _host = None
+ _collection_formats = {}
- _collection_formats: Dict[str, str] = {
-
- }
+ # process the path parameters
+ _path_params = {}
+ if _params['id']:
+ _path_params['id'] = _params['id']
- _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, str] = {}
- _body_params: Optional[bytes] = None
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
# process the query parameters
+ _query_params = []
# process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
# process the form parameters
+ _form_params = []
+ _files = {}
# process the body parameter
- if body is not None:
- _body_params = body
-
+ _body_params = None
+ if _params['body'] is not None:
+ _body_params = _params['body']
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json'
- ]
- )
+ ['application/json']) # noqa: E501
# 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
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
# authentication setting
- _auth_settings: List[str] = [
- 'Basic'
- ]
+ _auth_settings = ['Basic'] # noqa: E501
+
+ _response_types_map = {
+ '200': "V1beta1UpdateUserResponse",
+ '400': "RpcStatus",
+ '401': "RpcStatus",
+ '403': "RpcStatus",
+ '404': "RpcStatus",
+ '500': "RpcStatus",
+ }
- return self.api_client.param_serialize(
- method='PUT',
- resource_path='/v1beta1/users/{id}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
+ return self.api_client.call_api(
+ '/v1beta1/users/{id}', 'PUT',
+ _path_params,
+ _query_params,
+ _header_params,
body=_body_params,
post_params=_form_params,
files=_files,
+ response_types_map=_response_types_map,
auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
+ _request_auth=_params.get('_request_auth'))
diff --git a/frontier_api/api_client.py b/frontier_api/api_client.py
index a8c1250..170c6fe 100644
--- a/frontier_api/api_client.py
+++ b/frontier_api/api_client.py
@@ -18,26 +18,18 @@
from dateutil.parser import parse
import json
import mimetypes
+from multiprocessing.pool import ThreadPool
import os
import re
import tempfile
from urllib.parse import quote
-from typing import Tuple, Optional, List
from frontier_api.configuration import Configuration
from frontier_api.api_response import ApiResponse
import frontier_api.models
from frontier_api import rest
-from frontier_api.exceptions import (
- ApiValueError,
- ApiException,
- BadRequestException,
- UnauthorizedException,
- ForbiddenException,
- NotFoundException,
- ServiceException
-)
+from frontier_api.exceptions import ApiValueError, ApiException
class ApiClient:
@@ -54,6 +46,8 @@ class ApiClient:
the API.
:param cookie: a cookie to include in the header when making calls
to the API
+ :param pool_threads: The number of threads to use for async requests
+ to the API. More threads means more concurrent API requests.
"""
PRIMITIVE_TYPES = (float, bool, bytes, str, int)
@@ -69,17 +63,13 @@ class ApiClient:
}
_pool = None
- def __init__(
- self,
- configuration=None,
- header_name=None,
- header_value=None,
- cookie=None
- ) -> None:
+ def __init__(self, configuration=None, header_name=None, header_value=None,
+ cookie=None, pool_threads=1) -> None:
# use default configuration if none is provided
if configuration is None:
configuration = Configuration.get_default()
self.configuration = configuration
+ self.pool_threads = pool_threads
self.rest_client = rest.RESTClientObject(configuration)
self.default_headers = {}
@@ -94,7 +84,25 @@ def __enter__(self):
return self
def __exit__(self, exc_type, exc_value, traceback):
- pass
+ self.close()
+
+ def close(self):
+ if self._pool:
+ self._pool.close()
+ self._pool.join()
+ self._pool = None
+ if hasattr(atexit, 'unregister'):
+ atexit.unregister(self.close)
+
+ @property
+ def pool(self):
+ """Create thread pool on first request
+ avoids instantiating unused threadpool for blocking clients.
+ """
+ if self._pool is None:
+ atexit.register(self.close)
+ self._pool = ThreadPool(self.pool_threads)
+ return self._pool
@property
def user_agent(self):
@@ -135,42 +143,13 @@ def set_default(cls, default):
"""
cls._default = default
- def param_serialize(
- self,
- method,
- resource_path,
- path_params=None,
- query_params=None,
- header_params=None,
- body=None,
- post_params=None,
- files=None, auth_settings=None,
- collection_formats=None,
- _host=None,
- _request_auth=None
- ) -> Tuple:
-
- """Builds the HTTP request params needed by the request.
- :param method: Method to call.
- :param resource_path: Path to method endpoint.
- :param path_params: Path parameters in the url.
- :param query_params: Query parameters in the url.
- :param header_params: Header parameters to be
- placed in the request header.
- :param body: Request body.
- :param post_params dict: Request post form parameters,
- for `application/x-www-form-urlencoded`, `multipart/form-data`.
- :param auth_settings list: Auth Settings names for the request.
- :param files dict: key -> filename, value -> filepath,
- for `multipart/form-data`.
- :param collection_formats: dict of collection formats for path, query,
- header, and post parameters.
- :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.
- :return: tuple of form (path, http_method, query_params, header_params,
- body, post_params, files)
- """
+ def __call_api(
+ self, resource_path, method, path_params=None,
+ query_params=None, header_params=None, body=None, post_params=None,
+ files=None, response_types_map=None, auth_settings=None,
+ _return_http_data_only=None, collection_formats=None,
+ _preload_content=True, _request_timeout=None, _host=None,
+ _request_auth=None):
config = self.configuration
@@ -181,17 +160,14 @@ def param_serialize(
header_params['Cookie'] = self.cookie
if header_params:
header_params = self.sanitize_for_serialization(header_params)
- header_params = dict(
- self.parameters_to_tuples(header_params,collection_formats)
- )
+ header_params = dict(self.parameters_to_tuples(header_params,
+ collection_formats))
# path parameters
if path_params:
path_params = self.sanitize_for_serialization(path_params)
- path_params = self.parameters_to_tuples(
- path_params,
- collection_formats
- )
+ path_params = self.parameters_to_tuples(path_params,
+ collection_formats)
for k, v in path_params:
# specified safe chars, encode everything
resource_path = resource_path.replace(
@@ -203,22 +179,15 @@ def param_serialize(
if post_params or files:
post_params = post_params if post_params else []
post_params = self.sanitize_for_serialization(post_params)
- post_params = self.parameters_to_tuples(
- post_params,
- collection_formats
- )
+ post_params = self.parameters_to_tuples(post_params,
+ collection_formats)
post_params.extend(self.files_parameters(files))
# auth setting
self.update_params_for_auth(
- header_params,
- query_params,
- auth_settings,
- resource_path,
- method,
- body,
- request_auth=_request_auth
- )
+ header_params, query_params, auth_settings,
+ resource_path, method, body,
+ request_auth=_request_auth)
# body
if body:
@@ -234,109 +203,59 @@ def param_serialize(
# query parameters
if query_params:
query_params = self.sanitize_for_serialization(query_params)
- url_query = self.parameters_to_url_query(
- query_params,
- collection_formats
- )
+ url_query = self.parameters_to_url_query(query_params,
+ collection_formats)
url += "?" + url_query
- return method, url, header_params, body, post_params
-
-
- def call_api(
- self,
- method,
- url,
- header_params=None,
- body=None,
- post_params=None,
- _request_timeout=None
- ) -> rest.RESTResponse:
- """Makes the HTTP request (synchronous)
- :param method: Method to call.
- :param url: Path to method endpoint.
- :param header_params: Header parameters to be
- placed in the request header.
- :param body: Request body.
- :param post_params dict: Request post form parameters,
- for `application/x-www-form-urlencoded`, `multipart/form-data`.
- :param _request_timeout: timeout setting for this request.
- :return: RESTResponse
- """
-
try:
# perform request and return response
- response_data = self.rest_client.request(
+ response_data = self.request(
method, url,
+ query_params=query_params,
headers=header_params,
- body=body, post_params=post_params,
- _request_timeout=_request_timeout
- )
-
+ post_params=post_params, body=body,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout)
except ApiException as e:
if e.body:
e.body = e.body.decode('utf-8')
raise e
- return response_data
-
- def response_deserialize(
- self,
- response_data=None,
- response_types_map=None
- ) -> ApiResponse:
- """Deserializes response into an object.
- :param response_data: RESTResponse object to be deserialized.
- :param response_types_map: dict of response types.
- :return: ApiResponse
- """
-
-
- response_type = response_types_map.get(str(response_data.status), None)
- if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599:
- # if not found, look for '1XX', '2XX', etc.
- response_type = response_types_map.get(str(response_data.status)[0] + "XX", None)
-
- if not 200 <= response_data.status <= 299:
- if response_data.status == 400:
- raise BadRequestException(http_resp=response_data)
-
- if response_data.status == 401:
- raise UnauthorizedException(http_resp=response_data)
-
- if response_data.status == 403:
- raise ForbiddenException(http_resp=response_data)
-
- if response_data.status == 404:
- raise NotFoundException(http_resp=response_data)
-
- if 500 <= response_data.status <= 599:
- raise ServiceException(http_resp=response_data)
- raise ApiException(http_resp=response_data)
-
- # deserialize response data
-
- if response_type == "bytearray":
- return_data = response_data.data
- elif response_type is None:
- return_data = None
- elif response_type == "file":
- return_data = self.__deserialize_file(response_data)
+ self.last_response = response_data
+
+ return_data = None # assuming derialization is not needed
+ # data needs deserialization or returns HTTP data (deserialized) only
+ if _preload_content or _return_http_data_only:
+ response_type = response_types_map.get(str(response_data.status), None)
+ if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599:
+ # if not found, look for '1XX', '2XX', etc.
+ response_type = response_types_map.get(str(response_data.status)[0] + "XX", None)
+
+ if response_type == "bytearray":
+ response_data.data = response_data.data
+ else:
+ match = None
+ content_type = response_data.getheader('content-type')
+ if content_type is not None:
+ match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type)
+ encoding = match.group(1) if match else "utf-8"
+ response_data.data = response_data.data.decode(encoding)
+
+ # deserialize response data
+ if response_type == "bytearray":
+ return_data = response_data.data
+ elif response_type:
+ return_data = self.deserialize(response_data, response_type)
+ else:
+ return_data = None
+
+ if _return_http_data_only:
+ return return_data
else:
- match = None
- content_type = response_data.getheader('content-type')
- if content_type is not None:
- match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type)
- encoding = match.group(1) if match else "utf-8"
- response_text = response_data.data.decode(encoding)
- return_data = self.deserialize(response_text, response_type)
-
- return ApiResponse(
- status_code = response_data.status,
- data = return_data,
- headers = response_data.getheaders(),
- raw_data = response_data.data
- )
+ return ApiResponse(status_code = response_data.status,
+ data = return_data,
+ headers = response_data.getheaders(),
+ raw_data = response_data.data)
def sanitize_for_serialization(self, obj):
"""Builds a JSON POST object.
@@ -357,17 +276,15 @@ def sanitize_for_serialization(self, obj):
elif isinstance(obj, self.PRIMITIVE_TYPES):
return obj
elif isinstance(obj, list):
- return [
- self.sanitize_for_serialization(sub_obj) for sub_obj in obj
- ]
+ return [self.sanitize_for_serialization(sub_obj)
+ for sub_obj in obj]
elif isinstance(obj, tuple):
- return tuple(
- self.sanitize_for_serialization(sub_obj) for sub_obj in obj
- )
+ return tuple(self.sanitize_for_serialization(sub_obj)
+ for sub_obj in obj)
elif isinstance(obj, (datetime.datetime, datetime.date)):
return obj.isoformat()
- elif isinstance(obj, dict):
+ if isinstance(obj, dict):
obj_dict = obj
else:
# Convert model obj to dict except
@@ -377,12 +294,10 @@ def sanitize_for_serialization(self, obj):
# model definition for request.
obj_dict = obj.to_dict()
- return {
- key: self.sanitize_for_serialization(val)
- for key, val in obj_dict.items()
- }
+ return {key: self.sanitize_for_serialization(val)
+ for key, val in obj_dict.items()}
- def deserialize(self, response_text, response_type):
+ def deserialize(self, response, response_type):
"""Deserializes response into an object.
:param response: RESTResponse object to be deserialized.
@@ -391,12 +306,16 @@ def deserialize(self, response_text, response_type):
:return: deserialized object.
"""
+ # handle file downloading
+ # save response body into a tmp file and return the instance
+ if response_type == "file":
+ return self.__deserialize_file(response)
# fetch data from response object
try:
- data = json.loads(response_text)
+ data = json.loads(response.data)
except ValueError:
- data = response_text
+ data = response.data
return self.__deserialize(data, response_type)
@@ -439,6 +358,135 @@ def __deserialize(self, data, klass):
else:
return self.__deserialize_model(data, klass)
+ def call_api(self, resource_path, method,
+ path_params=None, query_params=None, header_params=None,
+ body=None, post_params=None, files=None,
+ response_types_map=None, auth_settings=None,
+ async_req=None, _return_http_data_only=None,
+ collection_formats=None, _preload_content=True,
+ _request_timeout=None, _host=None, _request_auth=None):
+ """Makes the HTTP request (synchronous) and returns deserialized data.
+
+ To make an async_req request, set the async_req parameter.
+
+ :param resource_path: Path to method endpoint.
+ :param method: Method to call.
+ :param path_params: Path parameters in the url.
+ :param query_params: Query parameters in the url.
+ :param header_params: Header parameters to be
+ placed in the request header.
+ :param body: Request body.
+ :param post_params dict: Request post form parameters,
+ for `application/x-www-form-urlencoded`, `multipart/form-data`.
+ :param auth_settings list: Auth Settings names for the request.
+ :param response: Response data type.
+ :param files dict: key -> filename, value -> filepath,
+ for `multipart/form-data`.
+ :param async_req bool: execute request asynchronously
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :param collection_formats: dict of collection formats for path, query,
+ header, and post parameters.
+ :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.
+ :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_token: dict, optional
+ :return:
+ If async_req parameter is True,
+ the request will be called asynchronously.
+ The method will return the request thread.
+ If parameter async_req is False or missing,
+ then the method will return the response directly.
+ """
+ if not async_req:
+ return self.__call_api(resource_path, method,
+ path_params, query_params, header_params,
+ body, post_params, files,
+ response_types_map, auth_settings,
+ _return_http_data_only, collection_formats,
+ _preload_content, _request_timeout, _host,
+ _request_auth)
+
+ return self.pool.apply_async(self.__call_api, (resource_path,
+ method, path_params,
+ query_params,
+ header_params, body,
+ post_params, files,
+ response_types_map,
+ auth_settings,
+ _return_http_data_only,
+ collection_formats,
+ _preload_content,
+ _request_timeout,
+ _host, _request_auth))
+
+ def request(self, method, url, query_params=None, headers=None,
+ post_params=None, body=None, _preload_content=True,
+ _request_timeout=None):
+ """Makes the HTTP request using RESTClient."""
+ if method == "GET":
+ return self.rest_client.get_request(url,
+ query_params=query_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ headers=headers)
+ elif method == "HEAD":
+ return self.rest_client.head_request(url,
+ query_params=query_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ headers=headers)
+ elif method == "OPTIONS":
+ return self.rest_client.options_request(url,
+ query_params=query_params,
+ headers=headers,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout)
+ elif method == "POST":
+ return self.rest_client.post_request(url,
+ query_params=query_params,
+ headers=headers,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+ elif method == "PUT":
+ return self.rest_client.put_request(url,
+ query_params=query_params,
+ headers=headers,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+ elif method == "PATCH":
+ return self.rest_client.patch_request(url,
+ query_params=query_params,
+ headers=headers,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+ elif method == "DELETE":
+ return self.rest_client.delete_request(url,
+ query_params=query_params,
+ headers=headers,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+ else:
+ raise ApiValueError(
+ "http method must be `GET`, `HEAD`, `OPTIONS`,"
+ " `POST`, `PATCH`, `PUT` or `DELETE`."
+ )
+
def parameters_to_tuples(self, params, collection_formats):
"""Get parameters as list of tuples, formatting collections.
@@ -449,7 +497,7 @@ def parameters_to_tuples(self, params, collection_formats):
new_params = []
if collection_formats is None:
collection_formats = {}
- for k, v in params.items() if isinstance(params, dict) else params:
+ for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501
if k in collection_formats:
collection_format = collection_formats[k]
if collection_format == 'multi':
@@ -479,11 +527,11 @@ def parameters_to_url_query(self, params, collection_formats):
new_params = []
if collection_formats is None:
collection_formats = {}
- for k, v in params.items() if isinstance(params, dict) else params:
- if isinstance(v, bool):
- v = str(v).lower()
+ for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501
if isinstance(v, (int, float)):
v = str(v)
+ if isinstance(v, bool):
+ v = str(v).lower()
if isinstance(v, dict):
v = json.dumps(v)
@@ -501,8 +549,7 @@ def parameters_to_url_query(self, params, collection_formats):
else: # csv is the default
delimiter = ','
new_params.append(
- (k, delimiter.join(quote(str(value)) for value in v))
- )
+ (k, delimiter.join(quote(str(value)) for value in v)))
else:
new_params.append((k, quote(str(v))))
@@ -525,24 +572,21 @@ def files_parameters(self, files=None):
with open(n, 'rb') as f:
filename = os.path.basename(f.name)
filedata = f.read()
- mimetype = (
- mimetypes.guess_type(filename)[0]
- or 'application/octet-stream'
- )
+ mimetype = (mimetypes.guess_type(filename)[0] or
+ 'application/octet-stream')
params.append(
- tuple([k, tuple([filename, filedata, mimetype])])
- )
+ tuple([k, tuple([filename, filedata, mimetype])]))
return params
- def select_header_accept(self, accepts: List[str]) -> Optional[str]:
+ def select_header_accept(self, accepts):
"""Returns `Accept` based on an array of accepts provided.
:param accepts: List of headers.
:return: Accept (e.g. application/json).
"""
if not accepts:
- return None
+ return
for accept in accepts:
if re.search('json', accept, re.IGNORECASE):
@@ -565,16 +609,9 @@ def select_header_content_type(self, content_types):
return content_types[0]
- def update_params_for_auth(
- self,
- headers,
- queries,
- auth_settings,
- resource_path,
- method,
- body,
- request_auth=None
- ) -> None:
+ def update_params_for_auth(self, headers, queries, auth_settings,
+ resource_path, method, body,
+ request_auth=None):
"""Updates header and query params based on authentication setting.
:param headers: Header parameters dict to be updated.
@@ -591,36 +628,21 @@ def update_params_for_auth(
return
if request_auth:
- self._apply_auth_params(
- headers,
- queries,
- resource_path,
- method,
- body,
- request_auth
- )
- else:
- for auth in auth_settings:
- auth_setting = self.configuration.auth_settings().get(auth)
- if auth_setting:
- self._apply_auth_params(
- headers,
- queries,
- resource_path,
- method,
- body,
- auth_setting
- )
-
- def _apply_auth_params(
- self,
- headers,
- queries,
- resource_path,
- method,
- body,
- auth_setting
- ) -> None:
+ self._apply_auth_params(headers, queries,
+ resource_path, method, body,
+ request_auth)
+ return
+
+ for auth in auth_settings:
+ auth_setting = self.configuration.auth_settings().get(auth)
+ if auth_setting:
+ self._apply_auth_params(headers, queries,
+ resource_path, method, body,
+ auth_setting)
+
+ def _apply_auth_params(self, headers, queries,
+ resource_path, method, body,
+ auth_setting):
"""Updates the request parameters based on a single auth_setting
:param headers: Header parameters dict to be updated.
@@ -649,9 +671,6 @@ def __deserialize_file(self, response):
Saves response body into a file in a temporary folder,
using the filename from the `Content-Disposition` header if provided.
- handle file downloading
- save response body into a tmp file and return the instance
-
:param response: RESTResponse.
:return: file path.
"""
@@ -661,10 +680,8 @@ def __deserialize_file(self, response):
content_disposition = response.getheader("Content-Disposition")
if content_disposition:
- filename = re.search(
- r'filename=[\'"]?([^\'"\s]+)[\'"]?',
- content_disposition
- ).group(1)
+ filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?',
+ content_disposition).group(1)
path = os.path.join(os.path.dirname(path), filename)
with open(path, "wb") as f:
diff --git a/frontier_api/api_response.py b/frontier_api/api_response.py
index 2ac1ada..a0b62b9 100644
--- a/frontier_api/api_response.py
+++ b/frontier_api/api_response.py
@@ -1,21 +1,25 @@
"""API response object."""
from __future__ import annotations
-from typing import Any, Dict, Optional, Generic, TypeVar
-from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel
+from typing import Any, Dict, Optional
+from pydantic import Field, StrictInt, StrictStr
-T = TypeVar("T")
-
-class ApiResponse(BaseModel, Generic[T]):
+class ApiResponse:
"""
API response object
"""
- status_code: StrictInt = Field(description="HTTP status code")
+ status_code: Optional[StrictInt] = Field(None, description="HTTP status code")
headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers")
- data: T = Field(description="Deserialized data given the data type")
- raw_data: StrictBytes = Field(description="Raw data (HTTP response body)")
+ data: Optional[Any] = Field(None, description="Deserialized data given the data type")
+ raw_data: Optional[Any] = Field(None, description="Raw data (HTTP response body)")
- model_config = {
- "arbitrary_types_allowed": True
- }
+ def __init__(self,
+ status_code=None,
+ headers=None,
+ data=None,
+ raw_data=None) -> None:
+ self.status_code = status_code
+ self.headers = headers
+ self.data = data
+ self.raw_data = raw_data
diff --git a/frontier_api/configuration.py b/frontier_api/configuration.py
index 9d0d597..ba76e6c 100644
--- a/frontier_api/configuration.py
+++ b/frontier_api/configuration.py
@@ -15,6 +15,7 @@
import copy
import logging
+import multiprocessing
import sys
import urllib3
@@ -164,6 +165,13 @@ def __init__(self, host=None,
Set this to the SNI value expected by the server.
"""
+ self.connection_pool_maxsize = multiprocessing.cpu_count() * 5
+ """urllib3 connection pool's maximum number of connections saved
+ per pool. urllib3 uses 1 connection as default value, but this is
+ not the best value when you are making a lot of possibly parallel
+ requests to the same host, which is often the case here.
+ cpu_count * 5 is used as default value to increase performance.
+ """
self.proxy = None
"""Proxy URL
diff --git a/frontier_api/exceptions.py b/frontier_api/exceptions.py
index 17c6e46..48c88d0 100644
--- a/frontier_api/exceptions.py
+++ b/frontier_api/exceptions.py
@@ -106,7 +106,7 @@ def __init__(self, status=None, reason=None, http_resp=None) -> None:
if http_resp:
self.status = http_resp.status
self.reason = http_resp.reason
- self.body = http_resp.data.decode('utf-8')
+ self.body = http_resp.data
self.headers = http_resp.getheaders()
else:
self.status = status
diff --git a/frontier_api/models/__init__.py b/frontier_api/models/__init__.py
index 4f3e8e2..9ee5796 100644
--- a/frontier_api/models/__init__.py
+++ b/frontier_api/models/__init__.py
@@ -15,6 +15,7 @@
# import models into model package
+from frontier_api.models.admin_service_delegated_checkout_request import AdminServiceDelegatedCheckoutRequest
from frontier_api.models.billing_account_address import BillingAccountAddress
from frontier_api.models.billing_account_balance import BillingAccountBalance
from frontier_api.models.frontier_service_add_group_users_request import FrontierServiceAddGroupUsersRequest
@@ -91,6 +92,7 @@
from frontier_api.models.v1beta1_create_service_user_secret_response import V1beta1CreateServiceUserSecretResponse
from frontier_api.models.v1beta1_create_user_preferences_response import V1beta1CreateUserPreferencesResponse
from frontier_api.models.v1beta1_create_user_response import V1beta1CreateUserResponse
+from frontier_api.models.v1beta1_delegated_checkout_response import V1beta1DelegatedCheckoutResponse
from frontier_api.models.v1beta1_describe_preferences_response import V1beta1DescribePreferencesResponse
from frontier_api.models.v1beta1_domain import V1beta1Domain
from frontier_api.models.v1beta1_feature import V1beta1Feature
@@ -156,6 +158,7 @@
from frontier_api.models.v1beta1_list_organizations_response import V1beta1ListOrganizationsResponse
from frontier_api.models.v1beta1_list_permissions_response import V1beta1ListPermissionsResponse
from frontier_api.models.v1beta1_list_plans_response import V1beta1ListPlansResponse
+from frontier_api.models.v1beta1_list_platform_users_response import V1beta1ListPlatformUsersResponse
from frontier_api.models.v1beta1_list_policies_response import V1beta1ListPoliciesResponse
from frontier_api.models.v1beta1_list_preferences_response import V1beta1ListPreferencesResponse
from frontier_api.models.v1beta1_list_project_admins_response import V1beta1ListProjectAdminsResponse
diff --git a/frontier_api/models/admin_service_delegated_checkout_request.py b/frontier_api/models/admin_service_delegated_checkout_request.py
new file mode 100644
index 0000000..4874e26
--- /dev/null
+++ b/frontier_api/models/admin_service_delegated_checkout_request.py
@@ -0,0 +1,82 @@
+# coding: utf-8
+
+"""
+ Frontier Administration API
+
+ The Frontier APIs adhere to the OpenAPI specification, also known as Swagger, which provides a standardized approach for designing, documenting, and consuming RESTful APIs. With OpenAPI, you gain a clear understanding of the API endpoints, request/response structures, and authentication mechanisms supported by the Frontier APIs. By leveraging the OpenAPI specification, developers can easily explore and interact with the Frontier APIs using a variety of tools and libraries. The OpenAPI specification enables automatic code generation, interactive API documentation, and seamless integration with API testing frameworks, making it easier than ever to integrate Frontier into your existing applications and workflows.
+
+ The version of the OpenAPI document: 0.2.0
+ Contact: hello@raystack.org
+ 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 typing import Optional
+from pydantic import BaseModel, Field
+from frontier_api.models.v1beta1_checkout_feature_body import V1beta1CheckoutFeatureBody
+from frontier_api.models.v1beta1_checkout_subscription_body import V1beta1CheckoutSubscriptionBody
+
+class AdminServiceDelegatedCheckoutRequest(BaseModel):
+ """
+ AdminServiceDelegatedCheckoutRequest
+ """
+ subscription_body: Optional[V1beta1CheckoutSubscriptionBody] = Field(None, alias="subscriptionBody")
+ feature_body: Optional[V1beta1CheckoutFeatureBody] = Field(None, alias="featureBody")
+ __properties = ["subscriptionBody", "featureBody"]
+
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.dict(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> AdminServiceDelegatedCheckoutRequest:
+ """Create an instance of AdminServiceDelegatedCheckoutRequest from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
+ # override the default output from pydantic by calling `to_dict()` of subscription_body
+ if self.subscription_body:
+ _dict['subscriptionBody'] = self.subscription_body.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of feature_body
+ if self.feature_body:
+ _dict['featureBody'] = self.feature_body.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: dict) -> AdminServiceDelegatedCheckoutRequest:
+ """Create an instance of AdminServiceDelegatedCheckoutRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return AdminServiceDelegatedCheckoutRequest.parse_obj(obj)
+
+ _obj = AdminServiceDelegatedCheckoutRequest.parse_obj({
+ "subscription_body": V1beta1CheckoutSubscriptionBody.from_dict(obj.get("subscriptionBody")) if obj.get("subscriptionBody") is not None else None,
+ "feature_body": V1beta1CheckoutFeatureBody.from_dict(obj.get("featureBody")) if obj.get("featureBody") is not None else None
+ })
+ return _obj
+
+
diff --git a/frontier_api/models/billing_account_address.py b/frontier_api/models/billing_account_address.py
index 6d8c668..64303a1 100644
--- a/frontier_api/models/billing_account_address.py
+++ b/frontier_api/models/billing_account_address.py
@@ -19,79 +19,62 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Optional
+from pydantic import BaseModel, Field, StrictStr
class BillingAccountAddress(BaseModel):
"""
BillingAccountAddress
- """ # noqa: E501
+ """
line1: Optional[StrictStr] = None
line2: Optional[StrictStr] = None
city: Optional[StrictStr] = None
state: Optional[StrictStr] = None
- postal_code: Optional[StrictStr] = Field(default=None, alias="postalCode")
+ postal_code: Optional[StrictStr] = Field(None, alias="postalCode")
country: Optional[StrictStr] = None
- __properties: ClassVar[List[str]] = ["line1", "line2", "city", "state", "postalCode", "country"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["line1", "line2", "city", "state", "postalCode", "country"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> BillingAccountAddress:
"""Create an instance of BillingAccountAddress 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> BillingAccountAddress:
"""Create an instance of BillingAccountAddress from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return BillingAccountAddress.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = BillingAccountAddress.parse_obj({
"line1": obj.get("line1"),
"line2": obj.get("line2"),
"city": obj.get("city"),
"state": obj.get("state"),
- "postalCode": obj.get("postalCode"),
+ "postal_code": obj.get("postalCode"),
"country": obj.get("country")
})
return _obj
diff --git a/frontier_api/models/billing_account_balance.py b/frontier_api/models/billing_account_balance.py
index 3161b03..842a484 100644
--- a/frontier_api/models/billing_account_balance.py
+++ b/frontier_api/models/billing_account_balance.py
@@ -19,74 +19,57 @@
import json
from datetime import datetime
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Optional
+from pydantic import BaseModel, Field, StrictStr
class BillingAccountBalance(BaseModel):
"""
BillingAccountBalance
- """ # noqa: E501
+ """
amount: Optional[StrictStr] = None
currency: Optional[StrictStr] = None
- updated_at: Optional[datetime] = Field(default=None, alias="updatedAt")
- __properties: ClassVar[List[str]] = ["amount", "currency", "updatedAt"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ updated_at: Optional[datetime] = Field(None, alias="updatedAt")
+ __properties = ["amount", "currency", "updatedAt"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> BillingAccountBalance:
"""Create an instance of BillingAccountBalance 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> BillingAccountBalance:
"""Create an instance of BillingAccountBalance from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return BillingAccountBalance.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = BillingAccountBalance.parse_obj({
"amount": obj.get("amount"),
"currency": obj.get("currency"),
- "updatedAt": obj.get("updatedAt")
+ "updated_at": obj.get("updatedAt")
})
return _obj
diff --git a/frontier_api/models/frontier_service_add_group_users_request.py b/frontier_api/models/frontier_service_add_group_users_request.py
index a135e41..a1a07c9 100644
--- a/frontier_api/models/frontier_service_add_group_users_request.py
+++ b/frontier_api/models/frontier_service_add_group_users_request.py
@@ -19,70 +19,53 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import List, Optional
+from pydantic import BaseModel, Field, StrictStr, conlist
class FrontierServiceAddGroupUsersRequest(BaseModel):
"""
FrontierServiceAddGroupUsersRequest
- """ # noqa: E501
- user_ids: Optional[List[StrictStr]] = Field(default=None, alias="userIds")
- __properties: ClassVar[List[str]] = ["userIds"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ user_ids: Optional[conlist(StrictStr)] = Field(None, alias="userIds")
+ __properties = ["userIds"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> FrontierServiceAddGroupUsersRequest:
"""Create an instance of FrontierServiceAddGroupUsersRequest 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> FrontierServiceAddGroupUsersRequest:
"""Create an instance of FrontierServiceAddGroupUsersRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return FrontierServiceAddGroupUsersRequest.parse_obj(obj)
- _obj = cls.model_validate({
- "userIds": obj.get("userIds")
+ _obj = FrontierServiceAddGroupUsersRequest.parse_obj({
+ "user_ids": obj.get("userIds")
})
return _obj
diff --git a/frontier_api/models/frontier_service_add_organization_users_request.py b/frontier_api/models/frontier_service_add_organization_users_request.py
index bab2865..3b270a7 100644
--- a/frontier_api/models/frontier_service_add_organization_users_request.py
+++ b/frontier_api/models/frontier_service_add_organization_users_request.py
@@ -19,70 +19,53 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import List, Optional
+from pydantic import BaseModel, Field, StrictStr, conlist
class FrontierServiceAddOrganizationUsersRequest(BaseModel):
"""
FrontierServiceAddOrganizationUsersRequest
- """ # noqa: E501
- user_ids: Optional[List[StrictStr]] = Field(default=None, description="List of user IDs to be added to the organization.", alias="userIds")
- __properties: ClassVar[List[str]] = ["userIds"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ user_ids: Optional[conlist(StrictStr)] = Field(None, alias="userIds", description="List of user IDs to be added to the organization.")
+ __properties = ["userIds"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> FrontierServiceAddOrganizationUsersRequest:
"""Create an instance of FrontierServiceAddOrganizationUsersRequest 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> FrontierServiceAddOrganizationUsersRequest:
"""Create an instance of FrontierServiceAddOrganizationUsersRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return FrontierServiceAddOrganizationUsersRequest.parse_obj(obj)
- _obj = cls.model_validate({
- "userIds": obj.get("userIds")
+ _obj = FrontierServiceAddOrganizationUsersRequest.parse_obj({
+ "user_ids": obj.get("userIds")
})
return _obj
diff --git a/frontier_api/models/frontier_service_authenticate2_request.py b/frontier_api/models/frontier_service_authenticate2_request.py
index d6b95ad..94de822 100644
--- a/frontier_api/models/frontier_service_authenticate2_request.py
+++ b/frontier_api/models/frontier_service_authenticate2_request.py
@@ -19,76 +19,59 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictBool, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Optional
+from pydantic import BaseModel, Field, StrictBool, StrictStr
class FrontierServiceAuthenticate2Request(BaseModel):
"""
FrontierServiceAuthenticate2Request
- """ # noqa: E501
- redirect_onstart: Optional[StrictBool] = Field(default=None, description="If set to true, location header will be set for redirect to start auth flow", alias="redirectOnstart")
- return_to: Optional[StrictStr] = Field(default=None, description="URL to redirect after successful authentication.
*Example:*`\"https://frontier.example.com\"`", alias="returnTo")
- email: Optional[StrictStr] = Field(default=None, description="Email of the user to authenticate. Used for magic links.
*Example:*`example@acme.org`")
- callback_url: Optional[StrictStr] = Field(default=None, description="Host which should handle the call to finish authentication flow, for most cases it could be host of frontier but in case of proxies, this will be proxy public endpoint.
*Example:*`https://frontier.example.com/v1beta1/auth/callback`", alias="callbackUrl")
- __properties: ClassVar[List[str]] = ["redirectOnstart", "returnTo", "email", "callbackUrl"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ redirect_onstart: Optional[StrictBool] = Field(None, alias="redirectOnstart", description="If set to true, location header will be set for redirect to start auth flow")
+ return_to: Optional[StrictStr] = Field(None, alias="returnTo", description="URL to redirect after successful authentication.
*Example:*`\"https://frontier.example.com\"`")
+ email: Optional[StrictStr] = Field(None, description="Email of the user to authenticate. Used for magic links.
*Example:*`example@acme.org`")
+ callback_url: Optional[StrictStr] = Field(None, alias="callbackUrl", description="Host which should handle the call to finish authentication flow, for most cases it could be host of frontier but in case of proxies, this will be proxy public endpoint.
*Example:*`https://frontier.example.com/v1beta1/auth/callback`")
+ __properties = ["redirectOnstart", "returnTo", "email", "callbackUrl"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> FrontierServiceAuthenticate2Request:
"""Create an instance of FrontierServiceAuthenticate2Request 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> FrontierServiceAuthenticate2Request:
"""Create an instance of FrontierServiceAuthenticate2Request from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return FrontierServiceAuthenticate2Request.parse_obj(obj)
- _obj = cls.model_validate({
- "redirectOnstart": obj.get("redirectOnstart"),
- "returnTo": obj.get("returnTo"),
+ _obj = FrontierServiceAuthenticate2Request.parse_obj({
+ "redirect_onstart": obj.get("redirectOnstart"),
+ "return_to": obj.get("returnTo"),
"email": obj.get("email"),
- "callbackUrl": obj.get("callbackUrl")
+ "callback_url": obj.get("callbackUrl")
})
return _obj
diff --git a/frontier_api/models/frontier_service_check_feature_entitlement_request.py b/frontier_api/models/frontier_service_check_feature_entitlement_request.py
index 53e6202..e9bf03c 100644
--- a/frontier_api/models/frontier_service_check_feature_entitlement_request.py
+++ b/frontier_api/models/frontier_service_check_feature_entitlement_request.py
@@ -19,68 +19,52 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel, StrictStr
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class FrontierServiceCheckFeatureEntitlementRequest(BaseModel):
"""
FrontierServiceCheckFeatureEntitlementRequest
- """ # noqa: E501
+ """
feature: Optional[StrictStr] = None
- __properties: ClassVar[List[str]] = ["feature"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["feature"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> FrontierServiceCheckFeatureEntitlementRequest:
"""Create an instance of FrontierServiceCheckFeatureEntitlementRequest 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> FrontierServiceCheckFeatureEntitlementRequest:
"""Create an instance of FrontierServiceCheckFeatureEntitlementRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return FrontierServiceCheckFeatureEntitlementRequest.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = FrontierServiceCheckFeatureEntitlementRequest.parse_obj({
"feature": obj.get("feature")
})
return _obj
diff --git a/frontier_api/models/frontier_service_create_billing_account_request.py b/frontier_api/models/frontier_service_create_billing_account_request.py
index 06c08bc..e28503b 100644
--- a/frontier_api/models/frontier_service_create_billing_account_request.py
+++ b/frontier_api/models/frontier_service_create_billing_account_request.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_billing_account_request_body import V1beta1BillingAccountRequestBody
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class FrontierServiceCreateBillingAccountRequest(BaseModel):
"""
FrontierServiceCreateBillingAccountRequest
- """ # noqa: E501
+ """
body: Optional[V1beta1BillingAccountRequestBody] = None
- __properties: ClassVar[List[str]] = ["body"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["body"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> FrontierServiceCreateBillingAccountRequest:
"""Create an instance of FrontierServiceCreateBillingAccountRequest 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of body
if self.body:
_dict['body'] = self.body.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> FrontierServiceCreateBillingAccountRequest:
"""Create an instance of FrontierServiceCreateBillingAccountRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return FrontierServiceCreateBillingAccountRequest.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = FrontierServiceCreateBillingAccountRequest.parse_obj({
"body": V1beta1BillingAccountRequestBody.from_dict(obj.get("body")) if obj.get("body") is not None else None
})
return _obj
diff --git a/frontier_api/models/frontier_service_create_billing_usage_request.py b/frontier_api/models/frontier_service_create_billing_usage_request.py
index 6d1bde1..112ec2a 100644
--- a/frontier_api/models/frontier_service_create_billing_usage_request.py
+++ b/frontier_api/models/frontier_service_create_billing_usage_request.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_usage import V1beta1Usage
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class FrontierServiceCreateBillingUsageRequest(BaseModel):
"""
FrontierServiceCreateBillingUsageRequest
- """ # noqa: E501
- usages: Optional[List[V1beta1Usage]] = None
- __properties: ClassVar[List[str]] = ["usages"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ usages: Optional[conlist(V1beta1Usage)] = None
+ __properties = ["usages"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> FrontierServiceCreateBillingUsageRequest:
"""Create an instance of FrontierServiceCreateBillingUsageRequest 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in usages (list)
_items = []
if self.usages:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> FrontierServiceCreateBillingUsageRequest:
"""Create an instance of FrontierServiceCreateBillingUsageRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return FrontierServiceCreateBillingUsageRequest.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = FrontierServiceCreateBillingUsageRequest.parse_obj({
"usages": [V1beta1Usage.from_dict(_item) for _item in obj.get("usages")] if obj.get("usages") is not None else None
})
return _obj
diff --git a/frontier_api/models/frontier_service_create_checkout_request.py b/frontier_api/models/frontier_service_create_checkout_request.py
index 8e8bdd5..c8fc7d5 100644
--- a/frontier_api/models/frontier_service_create_checkout_request.py
+++ b/frontier_api/models/frontier_service_create_checkout_request.py
@@ -19,62 +19,45 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
+from typing import Optional
+from pydantic import BaseModel, Field, StrictStr
from frontier_api.models.v1beta1_checkout_feature_body import V1beta1CheckoutFeatureBody
from frontier_api.models.v1beta1_checkout_subscription_body import V1beta1CheckoutSubscriptionBody
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class FrontierServiceCreateCheckoutRequest(BaseModel):
"""
FrontierServiceCreateCheckoutRequest
- """ # noqa: E501
- success_url: Optional[StrictStr] = Field(default=None, alias="successUrl")
- cancel_url: Optional[StrictStr] = Field(default=None, alias="cancelUrl")
- subscription_body: Optional[V1beta1CheckoutSubscriptionBody] = Field(default=None, alias="subscriptionBody")
- feature_body: Optional[V1beta1CheckoutFeatureBody] = Field(default=None, alias="featureBody")
- __properties: ClassVar[List[str]] = ["successUrl", "cancelUrl", "subscriptionBody", "featureBody"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ success_url: Optional[StrictStr] = Field(None, alias="successUrl")
+ cancel_url: Optional[StrictStr] = Field(None, alias="cancelUrl")
+ subscription_body: Optional[V1beta1CheckoutSubscriptionBody] = Field(None, alias="subscriptionBody")
+ feature_body: Optional[V1beta1CheckoutFeatureBody] = Field(None, alias="featureBody")
+ __properties = ["successUrl", "cancelUrl", "subscriptionBody", "featureBody"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> FrontierServiceCreateCheckoutRequest:
"""Create an instance of FrontierServiceCreateCheckoutRequest 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of subscription_body
if self.subscription_body:
_dict['subscriptionBody'] = self.subscription_body.to_dict()
@@ -84,19 +67,19 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> FrontierServiceCreateCheckoutRequest:
"""Create an instance of FrontierServiceCreateCheckoutRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return FrontierServiceCreateCheckoutRequest.parse_obj(obj)
- _obj = cls.model_validate({
- "successUrl": obj.get("successUrl"),
- "cancelUrl": obj.get("cancelUrl"),
- "subscriptionBody": V1beta1CheckoutSubscriptionBody.from_dict(obj.get("subscriptionBody")) if obj.get("subscriptionBody") is not None else None,
- "featureBody": V1beta1CheckoutFeatureBody.from_dict(obj.get("featureBody")) if obj.get("featureBody") is not None else None
+ _obj = FrontierServiceCreateCheckoutRequest.parse_obj({
+ "success_url": obj.get("successUrl"),
+ "cancel_url": obj.get("cancelUrl"),
+ "subscription_body": V1beta1CheckoutSubscriptionBody.from_dict(obj.get("subscriptionBody")) if obj.get("subscriptionBody") is not None else None,
+ "feature_body": V1beta1CheckoutFeatureBody.from_dict(obj.get("featureBody")) if obj.get("featureBody") is not None else None
})
return _obj
diff --git a/frontier_api/models/frontier_service_create_group_preferences_request.py b/frontier_api/models/frontier_service_create_group_preferences_request.py
index 00c3865..7095aa4 100644
--- a/frontier_api/models/frontier_service_create_group_preferences_request.py
+++ b/frontier_api/models/frontier_service_create_group_preferences_request.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_preference_request_body import V1beta1PreferenceRequestBody
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class FrontierServiceCreateGroupPreferencesRequest(BaseModel):
"""
FrontierServiceCreateGroupPreferencesRequest
- """ # noqa: E501
- bodies: Optional[List[V1beta1PreferenceRequestBody]] = None
- __properties: ClassVar[List[str]] = ["bodies"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ bodies: Optional[conlist(V1beta1PreferenceRequestBody)] = None
+ __properties = ["bodies"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> FrontierServiceCreateGroupPreferencesRequest:
"""Create an instance of FrontierServiceCreateGroupPreferencesRequest 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in bodies (list)
_items = []
if self.bodies:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> FrontierServiceCreateGroupPreferencesRequest:
"""Create an instance of FrontierServiceCreateGroupPreferencesRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return FrontierServiceCreateGroupPreferencesRequest.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = FrontierServiceCreateGroupPreferencesRequest.parse_obj({
"bodies": [V1beta1PreferenceRequestBody.from_dict(_item) for _item in obj.get("bodies")] if obj.get("bodies") is not None else None
})
return _obj
diff --git a/frontier_api/models/frontier_service_create_organization_audit_logs_request.py b/frontier_api/models/frontier_service_create_organization_audit_logs_request.py
index fe4c144..669eae8 100644
--- a/frontier_api/models/frontier_service_create_organization_audit_logs_request.py
+++ b/frontier_api/models/frontier_service_create_organization_audit_logs_request.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_audit_log import V1beta1AuditLog
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class FrontierServiceCreateOrganizationAuditLogsRequest(BaseModel):
"""
FrontierServiceCreateOrganizationAuditLogsRequest
- """ # noqa: E501
- logs: Optional[List[V1beta1AuditLog]] = None
- __properties: ClassVar[List[str]] = ["logs"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ logs: Optional[conlist(V1beta1AuditLog)] = None
+ __properties = ["logs"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> FrontierServiceCreateOrganizationAuditLogsRequest:
"""Create an instance of FrontierServiceCreateOrganizationAuditLogsRequest 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in logs (list)
_items = []
if self.logs:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> FrontierServiceCreateOrganizationAuditLogsRequest:
"""Create an instance of FrontierServiceCreateOrganizationAuditLogsRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return FrontierServiceCreateOrganizationAuditLogsRequest.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = FrontierServiceCreateOrganizationAuditLogsRequest.parse_obj({
"logs": [V1beta1AuditLog.from_dict(_item) for _item in obj.get("logs")] if obj.get("logs") is not None else None
})
return _obj
diff --git a/frontier_api/models/frontier_service_create_organization_domain_request.py b/frontier_api/models/frontier_service_create_organization_domain_request.py
index 8ffffa4..7026347 100644
--- a/frontier_api/models/frontier_service_create_organization_domain_request.py
+++ b/frontier_api/models/frontier_service_create_organization_domain_request.py
@@ -19,69 +19,52 @@
import json
-from typing import Any, ClassVar, Dict, List
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+
+from pydantic import BaseModel, Field, StrictStr
class FrontierServiceCreateOrganizationDomainRequest(BaseModel):
"""
FrontierServiceCreateOrganizationDomainRequest
- """ # noqa: E501
- domain: StrictStr = Field(description="domain name to be added to the trusted domain list")
- __properties: ClassVar[List[str]] = ["domain"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ domain: StrictStr = Field(..., description="domain name to be added to the trusted domain list")
+ __properties = ["domain"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> FrontierServiceCreateOrganizationDomainRequest:
"""Create an instance of FrontierServiceCreateOrganizationDomainRequest 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> FrontierServiceCreateOrganizationDomainRequest:
"""Create an instance of FrontierServiceCreateOrganizationDomainRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return FrontierServiceCreateOrganizationDomainRequest.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = FrontierServiceCreateOrganizationDomainRequest.parse_obj({
"domain": obj.get("domain")
})
return _obj
diff --git a/frontier_api/models/frontier_service_create_organization_invitation_request.py b/frontier_api/models/frontier_service_create_organization_invitation_request.py
index 37ede35..c4fae7f 100644
--- a/frontier_api/models/frontier_service_create_organization_invitation_request.py
+++ b/frontier_api/models/frontier_service_create_organization_invitation_request.py
@@ -19,74 +19,57 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import List, Optional
+from pydantic import BaseModel, Field, StrictStr, conlist
class FrontierServiceCreateOrganizationInvitationRequest(BaseModel):
"""
FrontierServiceCreateOrganizationInvitationRequest
- """ # noqa: E501
- user_ids: List[StrictStr] = Field(description="user_id is email id of user who are invited inside the organization. If user is not registered on the platform, it will be notified", alias="userIds")
- group_ids: Optional[List[StrictStr]] = Field(default=None, description="list of group ids to which user needs to be added as a member.", alias="groupIds")
- role_ids: Optional[List[StrictStr]] = Field(default=None, description="list of role ids to which user needs to be added as a member. Roles are binded at organization level by default.", alias="roleIds")
- __properties: ClassVar[List[str]] = ["userIds", "groupIds", "roleIds"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ user_ids: conlist(StrictStr) = Field(..., alias="userIds", description="user_id is email id of user who are invited inside the organization. If user is not registered on the platform, it will be notified")
+ group_ids: Optional[conlist(StrictStr)] = Field(None, alias="groupIds", description="list of group ids to which user needs to be added as a member.")
+ role_ids: Optional[conlist(StrictStr)] = Field(None, alias="roleIds", description="list of role ids to which user needs to be added as a member. Roles are binded at organization level by default.")
+ __properties = ["userIds", "groupIds", "roleIds"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> FrontierServiceCreateOrganizationInvitationRequest:
"""Create an instance of FrontierServiceCreateOrganizationInvitationRequest 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> FrontierServiceCreateOrganizationInvitationRequest:
"""Create an instance of FrontierServiceCreateOrganizationInvitationRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return FrontierServiceCreateOrganizationInvitationRequest.parse_obj(obj)
- _obj = cls.model_validate({
- "userIds": obj.get("userIds"),
- "groupIds": obj.get("groupIds"),
- "roleIds": obj.get("roleIds")
+ _obj = FrontierServiceCreateOrganizationInvitationRequest.parse_obj({
+ "user_ids": obj.get("userIds"),
+ "group_ids": obj.get("groupIds"),
+ "role_ids": obj.get("roleIds")
})
return _obj
diff --git a/frontier_api/models/frontier_service_create_service_user_key_request.py b/frontier_api/models/frontier_service_create_service_user_key_request.py
index 9fea74b..c6dd36a 100644
--- a/frontier_api/models/frontier_service_create_service_user_key_request.py
+++ b/frontier_api/models/frontier_service_create_service_user_key_request.py
@@ -19,68 +19,52 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel, StrictStr
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class FrontierServiceCreateServiceUserKeyRequest(BaseModel):
"""
FrontierServiceCreateServiceUserKeyRequest
- """ # noqa: E501
+ """
title: Optional[StrictStr] = None
- __properties: ClassVar[List[str]] = ["title"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["title"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> FrontierServiceCreateServiceUserKeyRequest:
"""Create an instance of FrontierServiceCreateServiceUserKeyRequest 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> FrontierServiceCreateServiceUserKeyRequest:
"""Create an instance of FrontierServiceCreateServiceUserKeyRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return FrontierServiceCreateServiceUserKeyRequest.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = FrontierServiceCreateServiceUserKeyRequest.parse_obj({
"title": obj.get("title")
})
return _obj
diff --git a/frontier_api/models/frontier_service_update_feature_request.py b/frontier_api/models/frontier_service_update_feature_request.py
index 222d81e..a90ff0f 100644
--- a/frontier_api/models/frontier_service_update_feature_request.py
+++ b/frontier_api/models/frontier_service_update_feature_request.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_feature_request_body import V1beta1FeatureRequestBody
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class FrontierServiceUpdateFeatureRequest(BaseModel):
"""
FrontierServiceUpdateFeatureRequest
- """ # noqa: E501
+ """
body: Optional[V1beta1FeatureRequestBody] = None
- __properties: ClassVar[List[str]] = ["body"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["body"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> FrontierServiceUpdateFeatureRequest:
"""Create an instance of FrontierServiceUpdateFeatureRequest 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of body
if self.body:
_dict['body'] = self.body.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> FrontierServiceUpdateFeatureRequest:
"""Create an instance of FrontierServiceUpdateFeatureRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return FrontierServiceUpdateFeatureRequest.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = FrontierServiceUpdateFeatureRequest.parse_obj({
"body": V1beta1FeatureRequestBody.from_dict(obj.get("body")) if obj.get("body") is not None else None
})
return _obj
diff --git a/frontier_api/models/frontier_service_update_plan_request.py b/frontier_api/models/frontier_service_update_plan_request.py
index 1e3049a..39f4f04 100644
--- a/frontier_api/models/frontier_service_update_plan_request.py
+++ b/frontier_api/models/frontier_service_update_plan_request.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_plan_request_body import V1beta1PlanRequestBody
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class FrontierServiceUpdatePlanRequest(BaseModel):
"""
FrontierServiceUpdatePlanRequest
- """ # noqa: E501
+ """
body: Optional[V1beta1PlanRequestBody] = None
- __properties: ClassVar[List[str]] = ["body"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["body"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> FrontierServiceUpdatePlanRequest:
"""Create an instance of FrontierServiceUpdatePlanRequest 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of body
if self.body:
_dict['body'] = self.body.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> FrontierServiceUpdatePlanRequest:
"""Create an instance of FrontierServiceUpdatePlanRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return FrontierServiceUpdatePlanRequest.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = FrontierServiceUpdatePlanRequest.parse_obj({
"body": V1beta1PlanRequestBody.from_dict(obj.get("body")) if obj.get("body") is not None else None
})
return _obj
diff --git a/frontier_api/models/frontier_service_update_subscription_request.py b/frontier_api/models/frontier_service_update_subscription_request.py
index 5993b7d..6315194 100644
--- a/frontier_api/models/frontier_service_update_subscription_request.py
+++ b/frontier_api/models/frontier_service_update_subscription_request.py
@@ -19,68 +19,52 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional, Union
+from typing import Any, Dict, Optional
from pydantic import BaseModel
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class FrontierServiceUpdateSubscriptionRequest(BaseModel):
"""
FrontierServiceUpdateSubscriptionRequest
- """ # noqa: E501
- metadata: Optional[Union[str, Any]] = None
- __properties: ClassVar[List[str]] = ["metadata"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ metadata: Optional[Dict[str, Any]] = None
+ __properties = ["metadata"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> FrontierServiceUpdateSubscriptionRequest:
"""Create an instance of FrontierServiceUpdateSubscriptionRequest 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> FrontierServiceUpdateSubscriptionRequest:
"""Create an instance of FrontierServiceUpdateSubscriptionRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return FrontierServiceUpdateSubscriptionRequest.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = FrontierServiceUpdateSubscriptionRequest.parse_obj({
"metadata": obj.get("metadata")
})
return _obj
diff --git a/frontier_api/models/protobuf_any.py b/frontier_api/models/protobuf_any.py
index 429cbcd..9e6f526 100644
--- a/frontier_api/models/protobuf_any.py
+++ b/frontier_api/models/protobuf_any.py
@@ -19,60 +19,42 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Optional
+from pydantic import BaseModel, Field, StrictStr
class ProtobufAny(BaseModel):
"""
ProtobufAny
- """ # noqa: E501
- type: Optional[StrictStr] = Field(default=None, alias="@type")
+ """
+ type: Optional[StrictStr] = Field(None, alias="@type")
additional_properties: Dict[str, Any] = {}
- __properties: ClassVar[List[str]] = ["@type"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["@type"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> ProtobufAny:
"""Create an instance of ProtobufAny 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.
- * Fields in `self.additional_properties` are added to the output dict.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- "additional_properties",
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ "additional_properties"
+ },
+ exclude_none=True)
# 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():
@@ -81,16 +63,16 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> ProtobufAny:
"""Create an instance of ProtobufAny from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return ProtobufAny.parse_obj(obj)
- _obj = cls.model_validate({
- "@type": obj.get("@type")
+ _obj = ProtobufAny.parse_obj({
+ "type": obj.get("@type")
})
# store additional fields in additional_properties
for _key in obj.keys():
diff --git a/frontier_api/models/protobuf_null_value.py b/frontier_api/models/protobuf_null_value.py
index ff8855a..3f315f2 100644
--- a/frontier_api/models/protobuf_null_value.py
+++ b/frontier_api/models/protobuf_null_value.py
@@ -13,18 +13,13 @@
""" # noqa: E501
-from __future__ import annotations
import json
import pprint
import re # noqa: F401
-from enum import Enum
+from aenum import Enum, no_arg
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class ProtobufNullValue(str, Enum):
@@ -38,8 +33,8 @@ class ProtobufNullValue(str, Enum):
NULL_VALUE = 'NULL_VALUE'
@classmethod
- def from_json(cls, json_str: str) -> Self:
+ def from_json(cls, json_str: str) -> ProtobufNullValue:
"""Create an instance of ProtobufNullValue from a JSON string"""
- return cls(json.loads(json_str))
+ return ProtobufNullValue(json.loads(json_str))
diff --git a/frontier_api/models/rpc_status.py b/frontier_api/models/rpc_status.py
index c36891a..6fdd575 100644
--- a/frontier_api/models/rpc_status.py
+++ b/frontier_api/models/rpc_status.py
@@ -19,59 +19,43 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictInt, StrictStr
+from typing import List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr, conlist
from frontier_api.models.protobuf_any import ProtobufAny
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class RpcStatus(BaseModel):
"""
RpcStatus
- """ # noqa: E501
+ """
code: Optional[StrictInt] = None
message: Optional[StrictStr] = None
- details: Optional[List[ProtobufAny]] = None
- __properties: ClassVar[List[str]] = ["code", "message", "details"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ details: Optional[conlist(ProtobufAny)] = None
+ __properties = ["code", "message", "details"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> RpcStatus:
"""Create an instance of RpcStatus 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in details (list)
_items = []
if self.details:
@@ -82,15 +66,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> RpcStatus:
"""Create an instance of RpcStatus from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return RpcStatus.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = RpcStatus.parse_obj({
"code": obj.get("code"),
"message": obj.get("message"),
"details": [ProtobufAny.from_dict(_item) for _item in obj.get("details")] if obj.get("details") is not None else None
diff --git a/frontier_api/models/v1beta1_add_platform_user_request.py b/frontier_api/models/v1beta1_add_platform_user_request.py
index d3afe22..4562f58 100644
--- a/frontier_api/models/v1beta1_add_platform_user_request.py
+++ b/frontier_api/models/v1beta1_add_platform_user_request.py
@@ -19,73 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1AddPlatformUserRequest(BaseModel):
"""
V1beta1AddPlatformUserRequest
- """ # noqa: E501
- user_id: Optional[StrictStr] = Field(default=None, description="The user id to add to the platform.", alias="userId")
- serviceuser_id: Optional[StrictStr] = Field(default=None, description="The service user id to add to the platform.", alias="serviceuserId")
- relation: StrictStr = Field(description="The relation to add as in the platform. It can be admin or member.")
- __properties: ClassVar[List[str]] = ["userId", "serviceuserId", "relation"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ user_id: Optional[StrictStr] = Field(None, alias="userId", description="The user id to add to the platform.")
+ serviceuser_id: Optional[StrictStr] = Field(None, alias="serviceuserId", description="The service user id to add to the platform.")
+ relation: StrictStr = Field(..., description="The relation to add as in the platform. It can be admin or member.")
+ __properties = ["userId", "serviceuserId", "relation"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1AddPlatformUserRequest:
"""Create an instance of V1beta1AddPlatformUserRequest 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1AddPlatformUserRequest:
"""Create an instance of V1beta1AddPlatformUserRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1AddPlatformUserRequest.parse_obj(obj)
- _obj = cls.model_validate({
- "userId": obj.get("userId"),
- "serviceuserId": obj.get("serviceuserId"),
+ _obj = V1beta1AddPlatformUserRequest.parse_obj({
+ "user_id": obj.get("userId"),
+ "serviceuser_id": obj.get("serviceuserId"),
"relation": obj.get("relation")
})
return _obj
diff --git a/frontier_api/models/v1beta1_audit_log.py b/frontier_api/models/v1beta1_audit_log.py
index 71abcf1..80a4141 100644
--- a/frontier_api/models/v1beta1_audit_log.py
+++ b/frontier_api/models/v1beta1_audit_log.py
@@ -19,65 +19,48 @@
import json
from datetime import datetime
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
+from typing import Dict, Optional
+from pydantic import BaseModel, Field, StrictStr
from frontier_api.models.v1beta1_audit_log_actor import V1beta1AuditLogActor
from frontier_api.models.v1beta1_audit_log_target import V1beta1AuditLogTarget
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1AuditLog(BaseModel):
"""
V1beta1AuditLog
- """ # noqa: E501
+ """
id: Optional[StrictStr] = None
- source: StrictStr = Field(description="The source service generating the event.")
- action: StrictStr
+ source: StrictStr = Field(..., description="The source service generating the event.")
+ action: StrictStr = Field(...)
actor: Optional[V1beta1AuditLogActor] = None
target: Optional[V1beta1AuditLogTarget] = None
context: Optional[Dict[str, StrictStr]] = None
- created_at: Optional[datetime] = Field(default=None, description="The time the log was created.", alias="createdAt")
- __properties: ClassVar[List[str]] = ["id", "source", "action", "actor", "target", "context", "createdAt"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ created_at: Optional[datetime] = Field(None, alias="createdAt", description="The time the log was created.")
+ __properties = ["id", "source", "action", "actor", "target", "context", "createdAt"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1AuditLog:
"""Create an instance of V1beta1AuditLog 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of actor
if self.actor:
_dict['actor'] = self.actor.to_dict()
@@ -87,22 +70,22 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1AuditLog:
"""Create an instance of V1beta1AuditLog from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1AuditLog.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1AuditLog.parse_obj({
"id": obj.get("id"),
"source": obj.get("source"),
"action": obj.get("action"),
"actor": V1beta1AuditLogActor.from_dict(obj.get("actor")) if obj.get("actor") is not None else None,
"target": V1beta1AuditLogTarget.from_dict(obj.get("target")) if obj.get("target") is not None else None,
"context": obj.get("context"),
- "createdAt": obj.get("createdAt")
+ "created_at": obj.get("createdAt")
})
return _obj
diff --git a/frontier_api/models/v1beta1_audit_log_actor.py b/frontier_api/models/v1beta1_audit_log_actor.py
index ca15c25..b8b7f69 100644
--- a/frontier_api/models/v1beta1_audit_log_actor.py
+++ b/frontier_api/models/v1beta1_audit_log_actor.py
@@ -19,70 +19,54 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel, StrictStr
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1AuditLogActor(BaseModel):
"""
V1beta1AuditLogActor
- """ # noqa: E501
+ """
id: Optional[StrictStr] = None
type: Optional[StrictStr] = None
name: Optional[StrictStr] = None
- __properties: ClassVar[List[str]] = ["id", "type", "name"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["id", "type", "name"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1AuditLogActor:
"""Create an instance of V1beta1AuditLogActor 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1AuditLogActor:
"""Create an instance of V1beta1AuditLogActor from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1AuditLogActor.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1AuditLogActor.parse_obj({
"id": obj.get("id"),
"type": obj.get("type"),
"name": obj.get("name")
diff --git a/frontier_api/models/v1beta1_audit_log_target.py b/frontier_api/models/v1beta1_audit_log_target.py
index 016fe31..c4a6a79 100644
--- a/frontier_api/models/v1beta1_audit_log_target.py
+++ b/frontier_api/models/v1beta1_audit_log_target.py
@@ -19,70 +19,54 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel, StrictStr
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1AuditLogTarget(BaseModel):
"""
V1beta1AuditLogTarget
- """ # noqa: E501
+ """
id: Optional[StrictStr] = None
type: Optional[StrictStr] = None
name: Optional[StrictStr] = None
- __properties: ClassVar[List[str]] = ["id", "type", "name"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["id", "type", "name"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1AuditLogTarget:
"""Create an instance of V1beta1AuditLogTarget 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1AuditLogTarget:
"""Create an instance of V1beta1AuditLogTarget from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1AuditLogTarget.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1AuditLogTarget.parse_obj({
"id": obj.get("id"),
"type": obj.get("type"),
"name": obj.get("name")
diff --git a/frontier_api/models/v1beta1_auth_callback_request.py b/frontier_api/models/v1beta1_auth_callback_request.py
index c3d7de2..660e239 100644
--- a/frontier_api/models/v1beta1_auth_callback_request.py
+++ b/frontier_api/models/v1beta1_auth_callback_request.py
@@ -19,76 +19,59 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Any, Dict, Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1AuthCallbackRequest(BaseModel):
"""
V1beta1AuthCallbackRequest
- """ # noqa: E501
- strategy_name: Optional[StrictStr] = Field(default=None, alias="strategyName")
+ """
+ strategy_name: Optional[StrictStr] = Field(None, alias="strategyName")
state: Optional[StrictStr] = None
code: Optional[StrictStr] = None
- state_options: Optional[Union[str, Any]] = Field(default=None, alias="stateOptions")
- __properties: ClassVar[List[str]] = ["strategyName", "state", "code", "stateOptions"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ state_options: Optional[Dict[str, Any]] = Field(None, alias="stateOptions")
+ __properties = ["strategyName", "state", "code", "stateOptions"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1AuthCallbackRequest:
"""Create an instance of V1beta1AuthCallbackRequest 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1AuthCallbackRequest:
"""Create an instance of V1beta1AuthCallbackRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1AuthCallbackRequest.parse_obj(obj)
- _obj = cls.model_validate({
- "strategyName": obj.get("strategyName"),
+ _obj = V1beta1AuthCallbackRequest.parse_obj({
+ "strategy_name": obj.get("strategyName"),
"state": obj.get("state"),
"code": obj.get("code"),
- "stateOptions": obj.get("stateOptions")
+ "state_options": obj.get("stateOptions")
})
return _obj
diff --git a/frontier_api/models/v1beta1_auth_strategy.py b/frontier_api/models/v1beta1_auth_strategy.py
index 73e2512..015742e 100644
--- a/frontier_api/models/v1beta1_auth_strategy.py
+++ b/frontier_api/models/v1beta1_auth_strategy.py
@@ -19,69 +19,53 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional, Union
+from typing import Any, Dict, Optional
from pydantic import BaseModel, StrictStr
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1AuthStrategy(BaseModel):
"""
V1beta1AuthStrategy
- """ # noqa: E501
+ """
name: Optional[StrictStr] = None
- params: Optional[Union[str, Any]] = None
- __properties: ClassVar[List[str]] = ["name", "params"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ params: Optional[Dict[str, Any]] = None
+ __properties = ["name", "params"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1AuthStrategy:
"""Create an instance of V1beta1AuthStrategy 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1AuthStrategy:
"""Create an instance of V1beta1AuthStrategy from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1AuthStrategy.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1AuthStrategy.parse_obj({
"name": obj.get("name"),
"params": obj.get("params")
})
diff --git a/frontier_api/models/v1beta1_auth_token_request.py b/frontier_api/models/v1beta1_auth_token_request.py
index c6242e8..93104e5 100644
--- a/frontier_api/models/v1beta1_auth_token_request.py
+++ b/frontier_api/models/v1beta1_auth_token_request.py
@@ -19,75 +19,58 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1AuthTokenRequest(BaseModel):
"""
V1beta1AuthTokenRequest
- """ # noqa: E501
- grant_type: Optional[StrictStr] = Field(default=None, alias="grantType")
- client_id: Optional[StrictStr] = Field(default=None, alias="clientId")
- client_secret: Optional[StrictStr] = Field(default=None, alias="clientSecret")
+ """
+ grant_type: Optional[StrictStr] = Field(None, alias="grantType")
+ client_id: Optional[StrictStr] = Field(None, alias="clientId")
+ client_secret: Optional[StrictStr] = Field(None, alias="clientSecret")
assertion: Optional[StrictStr] = None
- __properties: ClassVar[List[str]] = ["grantType", "clientId", "clientSecret", "assertion"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["grantType", "clientId", "clientSecret", "assertion"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1AuthTokenRequest:
"""Create an instance of V1beta1AuthTokenRequest 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1AuthTokenRequest:
"""Create an instance of V1beta1AuthTokenRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1AuthTokenRequest.parse_obj(obj)
- _obj = cls.model_validate({
- "grantType": obj.get("grantType"),
- "clientId": obj.get("clientId"),
- "clientSecret": obj.get("clientSecret"),
+ _obj = V1beta1AuthTokenRequest.parse_obj({
+ "grant_type": obj.get("grantType"),
+ "client_id": obj.get("clientId"),
+ "client_secret": obj.get("clientSecret"),
"assertion": obj.get("assertion")
})
return _obj
diff --git a/frontier_api/models/v1beta1_auth_token_response.py b/frontier_api/models/v1beta1_auth_token_response.py
index 3471230..4f14eb8 100644
--- a/frontier_api/models/v1beta1_auth_token_response.py
+++ b/frontier_api/models/v1beta1_auth_token_response.py
@@ -19,72 +19,55 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1AuthTokenResponse(BaseModel):
"""
V1beta1AuthTokenResponse
- """ # noqa: E501
- access_token: Optional[StrictStr] = Field(default=None, alias="accessToken")
- token_type: Optional[StrictStr] = Field(default=None, alias="tokenType")
- __properties: ClassVar[List[str]] = ["accessToken", "tokenType"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ access_token: Optional[StrictStr] = Field(None, alias="accessToken")
+ token_type: Optional[StrictStr] = Field(None, alias="tokenType")
+ __properties = ["accessToken", "tokenType"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1AuthTokenResponse:
"""Create an instance of V1beta1AuthTokenResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1AuthTokenResponse:
"""Create an instance of V1beta1AuthTokenResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1AuthTokenResponse.parse_obj(obj)
- _obj = cls.model_validate({
- "accessToken": obj.get("accessToken"),
- "tokenType": obj.get("tokenType")
+ _obj = V1beta1AuthTokenResponse.parse_obj({
+ "access_token": obj.get("accessToken"),
+ "token_type": obj.get("tokenType")
})
return _obj
diff --git a/frontier_api/models/v1beta1_authenticate_response.py b/frontier_api/models/v1beta1_authenticate_response.py
index 7cd3bdb..b9789f1 100644
--- a/frontier_api/models/v1beta1_authenticate_response.py
+++ b/frontier_api/models/v1beta1_authenticate_response.py
@@ -19,74 +19,57 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Any, Dict, Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1AuthenticateResponse(BaseModel):
"""
V1beta1AuthenticateResponse
- """ # noqa: E501
+ """
endpoint: Optional[StrictStr] = None
state: Optional[StrictStr] = None
- state_options: Optional[Union[str, Any]] = Field(default=None, alias="stateOptions")
- __properties: ClassVar[List[str]] = ["endpoint", "state", "stateOptions"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ state_options: Optional[Dict[str, Any]] = Field(None, alias="stateOptions")
+ __properties = ["endpoint", "state", "stateOptions"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1AuthenticateResponse:
"""Create an instance of V1beta1AuthenticateResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1AuthenticateResponse:
"""Create an instance of V1beta1AuthenticateResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1AuthenticateResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1AuthenticateResponse.parse_obj({
"endpoint": obj.get("endpoint"),
"state": obj.get("state"),
- "stateOptions": obj.get("stateOptions")
+ "state_options": obj.get("stateOptions")
})
return _obj
diff --git a/frontier_api/models/v1beta1_batch_check_permission_body.py b/frontier_api/models/v1beta1_batch_check_permission_body.py
index e71eed8..54fe3e9 100644
--- a/frontier_api/models/v1beta1_batch_check_permission_body.py
+++ b/frontier_api/models/v1beta1_batch_check_permission_body.py
@@ -19,70 +19,53 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1BatchCheckPermissionBody(BaseModel):
"""
V1beta1BatchCheckPermissionBody
- """ # noqa: E501
- permission: StrictStr = Field(description="the permission name to check.
*Example:* `get` or `list`")
- resource: Optional[StrictStr] = Field(default=None, description="`namespace:uuid` or `namespace:name` of the org or project, and `namespace:urn` of a resource under a project. In case of an org/project either provide the complete namespace (app/organization) or Frontier can also parse aliases for the same as `org` or `project`.
*Example:* `organization:92f69c3a-334b-4f25-90b8-4d4f3be6b825` or `app/project:project-name` or `compute/instance:92f69c3a-334b-4f25-90b8-4d4f3be6b825`")
- __properties: ClassVar[List[str]] = ["permission", "resource"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ permission: StrictStr = Field(..., description="the permission name to check.
*Example:* `get` or `list`")
+ resource: Optional[StrictStr] = Field(None, description="`namespace:uuid` or `namespace:name` of the org or project, and `namespace:urn` of a resource under a project. In case of an org/project either provide the complete namespace (app/organization) or Frontier can also parse aliases for the same as `org` or `project`.
*Example:* `organization:92f69c3a-334b-4f25-90b8-4d4f3be6b825` or `app/project:project-name` or `compute/instance:92f69c3a-334b-4f25-90b8-4d4f3be6b825`")
+ __properties = ["permission", "resource"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1BatchCheckPermissionBody:
"""Create an instance of V1beta1BatchCheckPermissionBody 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1BatchCheckPermissionBody:
"""Create an instance of V1beta1BatchCheckPermissionBody from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1BatchCheckPermissionBody.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1BatchCheckPermissionBody.parse_obj({
"permission": obj.get("permission"),
"resource": obj.get("resource")
})
diff --git a/frontier_api/models/v1beta1_batch_check_permission_request.py b/frontier_api/models/v1beta1_batch_check_permission_request.py
index 3ab91a4..df7723a 100644
--- a/frontier_api/models/v1beta1_batch_check_permission_request.py
+++ b/frontier_api/models/v1beta1_batch_check_permission_request.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_batch_check_permission_body import V1beta1BatchCheckPermissionBody
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1BatchCheckPermissionRequest(BaseModel):
"""
V1beta1BatchCheckPermissionRequest
- """ # noqa: E501
- bodies: Optional[List[V1beta1BatchCheckPermissionBody]] = None
- __properties: ClassVar[List[str]] = ["bodies"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ bodies: Optional[conlist(V1beta1BatchCheckPermissionBody)] = None
+ __properties = ["bodies"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1BatchCheckPermissionRequest:
"""Create an instance of V1beta1BatchCheckPermissionRequest 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in bodies (list)
_items = []
if self.bodies:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1BatchCheckPermissionRequest:
"""Create an instance of V1beta1BatchCheckPermissionRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1BatchCheckPermissionRequest.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1BatchCheckPermissionRequest.parse_obj({
"bodies": [V1beta1BatchCheckPermissionBody.from_dict(_item) for _item in obj.get("bodies")] if obj.get("bodies") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_batch_check_permission_response.py b/frontier_api/models/v1beta1_batch_check_permission_response.py
index 4c47221..fec036b 100644
--- a/frontier_api/models/v1beta1_batch_check_permission_response.py
+++ b/frontier_api/models/v1beta1_batch_check_permission_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_batch_check_permission_response_pair import V1beta1BatchCheckPermissionResponsePair
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1BatchCheckPermissionResponse(BaseModel):
"""
V1beta1BatchCheckPermissionResponse
- """ # noqa: E501
- pairs: Optional[List[V1beta1BatchCheckPermissionResponsePair]] = None
- __properties: ClassVar[List[str]] = ["pairs"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ pairs: Optional[conlist(V1beta1BatchCheckPermissionResponsePair)] = None
+ __properties = ["pairs"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1BatchCheckPermissionResponse:
"""Create an instance of V1beta1BatchCheckPermissionResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in pairs (list)
_items = []
if self.pairs:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1BatchCheckPermissionResponse:
"""Create an instance of V1beta1BatchCheckPermissionResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1BatchCheckPermissionResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1BatchCheckPermissionResponse.parse_obj({
"pairs": [V1beta1BatchCheckPermissionResponsePair.from_dict(_item) for _item in obj.get("pairs")] if obj.get("pairs") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_batch_check_permission_response_pair.py b/frontier_api/models/v1beta1_batch_check_permission_response_pair.py
index 5787f01..360276a 100644
--- a/frontier_api/models/v1beta1_batch_check_permission_response_pair.py
+++ b/frontier_api/models/v1beta1_batch_check_permission_response_pair.py
@@ -19,73 +19,57 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel, StrictBool
from frontier_api.models.v1beta1_batch_check_permission_body import V1beta1BatchCheckPermissionBody
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1BatchCheckPermissionResponsePair(BaseModel):
"""
V1beta1BatchCheckPermissionResponsePair
- """ # noqa: E501
+ """
body: Optional[V1beta1BatchCheckPermissionBody] = None
status: Optional[StrictBool] = None
- __properties: ClassVar[List[str]] = ["body", "status"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["body", "status"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1BatchCheckPermissionResponsePair:
"""Create an instance of V1beta1BatchCheckPermissionResponsePair 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of body
if self.body:
_dict['body'] = self.body.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1BatchCheckPermissionResponsePair:
"""Create an instance of V1beta1BatchCheckPermissionResponsePair from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1BatchCheckPermissionResponsePair.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1BatchCheckPermissionResponsePair.parse_obj({
"body": V1beta1BatchCheckPermissionBody.from_dict(obj.get("body")) if obj.get("body") is not None else None,
"status": obj.get("status")
})
diff --git a/frontier_api/models/v1beta1_billing_account.py b/frontier_api/models/v1beta1_billing_account.py
index 90d290c..7269833 100644
--- a/frontier_api/models/v1beta1_billing_account.py
+++ b/frontier_api/models/v1beta1_billing_account.py
@@ -19,98 +19,81 @@
import json
from datetime import datetime
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
+from typing import Any, Dict, Optional
+from pydantic import BaseModel, Field, StrictStr
from frontier_api.models.billing_account_address import BillingAccountAddress
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1BillingAccount(BaseModel):
"""
V1beta1BillingAccount
- """ # noqa: E501
+ """
id: Optional[StrictStr] = None
- org_id: Optional[StrictStr] = Field(default=None, alias="orgId")
+ org_id: Optional[StrictStr] = Field(None, alias="orgId")
name: Optional[StrictStr] = None
email: Optional[StrictStr] = None
phone: Optional[StrictStr] = None
address: Optional[BillingAccountAddress] = None
- provider_id: Optional[StrictStr] = Field(default=None, alias="providerId")
+ provider_id: Optional[StrictStr] = Field(None, alias="providerId")
provider: Optional[StrictStr] = None
currency: Optional[StrictStr] = None
state: Optional[StrictStr] = None
- metadata: Optional[Union[str, Any]] = None
- created_at: Optional[datetime] = Field(default=None, alias="createdAt")
- updated_at: Optional[datetime] = Field(default=None, alias="updatedAt")
- __properties: ClassVar[List[str]] = ["id", "orgId", "name", "email", "phone", "address", "providerId", "provider", "currency", "state", "metadata", "createdAt", "updatedAt"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ metadata: Optional[Dict[str, Any]] = None
+ created_at: Optional[datetime] = Field(None, alias="createdAt")
+ updated_at: Optional[datetime] = Field(None, alias="updatedAt")
+ __properties = ["id", "orgId", "name", "email", "phone", "address", "providerId", "provider", "currency", "state", "metadata", "createdAt", "updatedAt"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1BillingAccount:
"""Create an instance of V1beta1BillingAccount 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of address
if self.address:
_dict['address'] = self.address.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1BillingAccount:
"""Create an instance of V1beta1BillingAccount from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1BillingAccount.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1BillingAccount.parse_obj({
"id": obj.get("id"),
- "orgId": obj.get("orgId"),
+ "org_id": obj.get("orgId"),
"name": obj.get("name"),
"email": obj.get("email"),
"phone": obj.get("phone"),
"address": BillingAccountAddress.from_dict(obj.get("address")) if obj.get("address") is not None else None,
- "providerId": obj.get("providerId"),
+ "provider_id": obj.get("providerId"),
"provider": obj.get("provider"),
"currency": obj.get("currency"),
"state": obj.get("state"),
"metadata": obj.get("metadata"),
- "createdAt": obj.get("createdAt"),
- "updatedAt": obj.get("updatedAt")
+ "created_at": obj.get("createdAt"),
+ "updated_at": obj.get("updatedAt")
})
return _obj
diff --git a/frontier_api/models/v1beta1_billing_account_request_body.py b/frontier_api/models/v1beta1_billing_account_request_body.py
index 3d9be80..a1fd0b8 100644
--- a/frontier_api/models/v1beta1_billing_account_request_body.py
+++ b/frontier_api/models/v1beta1_billing_account_request_body.py
@@ -19,77 +19,61 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional, Union
+from typing import Any, Dict, Optional
from pydantic import BaseModel, StrictStr
from frontier_api.models.billing_account_address import BillingAccountAddress
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1BillingAccountRequestBody(BaseModel):
"""
V1beta1BillingAccountRequestBody
- """ # noqa: E501
+ """
name: Optional[StrictStr] = None
email: Optional[StrictStr] = None
phone: Optional[StrictStr] = None
address: Optional[BillingAccountAddress] = None
currency: Optional[StrictStr] = None
- metadata: Optional[Union[str, Any]] = None
- __properties: ClassVar[List[str]] = ["name", "email", "phone", "address", "currency", "metadata"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ metadata: Optional[Dict[str, Any]] = None
+ __properties = ["name", "email", "phone", "address", "currency", "metadata"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1BillingAccountRequestBody:
"""Create an instance of V1beta1BillingAccountRequestBody 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of address
if self.address:
_dict['address'] = self.address.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1BillingAccountRequestBody:
"""Create an instance of V1beta1BillingAccountRequestBody from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1BillingAccountRequestBody.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1BillingAccountRequestBody.parse_obj({
"name": obj.get("name"),
"email": obj.get("email"),
"phone": obj.get("phone"),
diff --git a/frontier_api/models/v1beta1_billing_transaction.py b/frontier_api/models/v1beta1_billing_transaction.py
index 74e1bed..955e45d 100644
--- a/frontier_api/models/v1beta1_billing_transaction.py
+++ b/frontier_api/models/v1beta1_billing_transaction.py
@@ -19,86 +19,69 @@
import json
from datetime import datetime
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Any, Dict, Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1BillingTransaction(BaseModel):
"""
V1beta1BillingTransaction
- """ # noqa: E501
+ """
id: Optional[StrictStr] = None
- customer_id: Optional[StrictStr] = Field(default=None, alias="customerId")
+ customer_id: Optional[StrictStr] = Field(None, alias="customerId")
source: Optional[StrictStr] = None
amount: Optional[StrictStr] = None
type: Optional[StrictStr] = None
description: Optional[StrictStr] = None
- metadata: Optional[Union[str, Any]] = None
- created_at: Optional[datetime] = Field(default=None, alias="createdAt")
- updated_at: Optional[datetime] = Field(default=None, alias="updatedAt")
- __properties: ClassVar[List[str]] = ["id", "customerId", "source", "amount", "type", "description", "metadata", "createdAt", "updatedAt"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ metadata: Optional[Dict[str, Any]] = None
+ created_at: Optional[datetime] = Field(None, alias="createdAt")
+ updated_at: Optional[datetime] = Field(None, alias="updatedAt")
+ __properties = ["id", "customerId", "source", "amount", "type", "description", "metadata", "createdAt", "updatedAt"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1BillingTransaction:
"""Create an instance of V1beta1BillingTransaction 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1BillingTransaction:
"""Create an instance of V1beta1BillingTransaction from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1BillingTransaction.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1BillingTransaction.parse_obj({
"id": obj.get("id"),
- "customerId": obj.get("customerId"),
+ "customer_id": obj.get("customerId"),
"source": obj.get("source"),
"amount": obj.get("amount"),
"type": obj.get("type"),
"description": obj.get("description"),
"metadata": obj.get("metadata"),
- "createdAt": obj.get("createdAt"),
- "updatedAt": obj.get("updatedAt")
+ "created_at": obj.get("createdAt"),
+ "updated_at": obj.get("updatedAt")
})
return _obj
diff --git a/frontier_api/models/v1beta1_check_feature_entitlement_response.py b/frontier_api/models/v1beta1_check_feature_entitlement_response.py
index ec7c8c1..55e3732 100644
--- a/frontier_api/models/v1beta1_check_feature_entitlement_response.py
+++ b/frontier_api/models/v1beta1_check_feature_entitlement_response.py
@@ -19,68 +19,52 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel, StrictBool
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CheckFeatureEntitlementResponse(BaseModel):
"""
V1beta1CheckFeatureEntitlementResponse
- """ # noqa: E501
+ """
status: Optional[StrictBool] = None
- __properties: ClassVar[List[str]] = ["status"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["status"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CheckFeatureEntitlementResponse:
"""Create an instance of V1beta1CheckFeatureEntitlementResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CheckFeatureEntitlementResponse:
"""Create an instance of V1beta1CheckFeatureEntitlementResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CheckFeatureEntitlementResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CheckFeatureEntitlementResponse.parse_obj({
"status": obj.get("status")
})
return _obj
diff --git a/frontier_api/models/v1beta1_check_federated_resource_permission_request.py b/frontier_api/models/v1beta1_check_federated_resource_permission_request.py
index 87b391d..27e5ad6 100644
--- a/frontier_api/models/v1beta1_check_federated_resource_permission_request.py
+++ b/frontier_api/models/v1beta1_check_federated_resource_permission_request.py
@@ -19,71 +19,54 @@
import json
-from typing import Any, ClassVar, Dict, List
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+
+from pydantic import BaseModel, Field, StrictStr
class V1beta1CheckFederatedResourcePermissionRequest(BaseModel):
"""
V1beta1CheckFederatedResourcePermissionRequest
- """ # noqa: E501
- subject: StrictStr = Field(description="the subject to check.
*Example:* `user:..uuidofuser..`")
- resource: StrictStr = Field(description="`namespace:uuid` or `namespace:name` of the org or project, and `namespace:urn` of a resource under a project. In case of an org/project either provide the complete namespace (app/organization) or Frontier can also parse aliases for the same as `org` or `project`.
*Example:* `organization:92f69c3a-334b-4f25-90b8-4d4f3be6b825` or `app/project:project-name` or `compute/instance:92f69c3a-334b-4f25-90b8-4d4f3be6b825`")
- permission: StrictStr = Field(description="the permission name to check.
*Example:* `get`, `list`, `compute.instance.create`")
- __properties: ClassVar[List[str]] = ["subject", "resource", "permission"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ subject: StrictStr = Field(..., description="the subject to check.
*Example:* `user:..uuidofuser..`")
+ resource: StrictStr = Field(..., description="`namespace:uuid` or `namespace:name` of the org or project, and `namespace:urn` of a resource under a project. In case of an org/project either provide the complete namespace (app/organization) or Frontier can also parse aliases for the same as `org` or `project`.
*Example:* `organization:92f69c3a-334b-4f25-90b8-4d4f3be6b825` or `app/project:project-name` or `compute/instance:92f69c3a-334b-4f25-90b8-4d4f3be6b825`")
+ permission: StrictStr = Field(..., description="the permission name to check.
*Example:* `get`, `list`, `compute.instance.create`")
+ __properties = ["subject", "resource", "permission"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CheckFederatedResourcePermissionRequest:
"""Create an instance of V1beta1CheckFederatedResourcePermissionRequest 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CheckFederatedResourcePermissionRequest:
"""Create an instance of V1beta1CheckFederatedResourcePermissionRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CheckFederatedResourcePermissionRequest.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CheckFederatedResourcePermissionRequest.parse_obj({
"subject": obj.get("subject"),
"resource": obj.get("resource"),
"permission": obj.get("permission")
diff --git a/frontier_api/models/v1beta1_check_federated_resource_permission_response.py b/frontier_api/models/v1beta1_check_federated_resource_permission_response.py
index 5f397c0..6972e54 100644
--- a/frontier_api/models/v1beta1_check_federated_resource_permission_response.py
+++ b/frontier_api/models/v1beta1_check_federated_resource_permission_response.py
@@ -19,68 +19,52 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel, StrictBool
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CheckFederatedResourcePermissionResponse(BaseModel):
"""
V1beta1CheckFederatedResourcePermissionResponse
- """ # noqa: E501
+ """
status: Optional[StrictBool] = None
- __properties: ClassVar[List[str]] = ["status"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["status"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CheckFederatedResourcePermissionResponse:
"""Create an instance of V1beta1CheckFederatedResourcePermissionResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CheckFederatedResourcePermissionResponse:
"""Create an instance of V1beta1CheckFederatedResourcePermissionResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CheckFederatedResourcePermissionResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CheckFederatedResourcePermissionResponse.parse_obj({
"status": obj.get("status")
})
return _obj
diff --git a/frontier_api/models/v1beta1_check_resource_permission_request.py b/frontier_api/models/v1beta1_check_resource_permission_request.py
index 68a22f4..3eebc5d 100644
--- a/frontier_api/models/v1beta1_check_resource_permission_request.py
+++ b/frontier_api/models/v1beta1_check_resource_permission_request.py
@@ -19,74 +19,57 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1CheckResourcePermissionRequest(BaseModel):
"""
V1beta1CheckResourcePermissionRequest
- """ # noqa: E501
- object_id: Optional[StrictStr] = Field(default=None, description="Deprecated. Use `resource` field instead.", alias="objectId")
- object_namespace: Optional[StrictStr] = Field(default=None, description="Deprecated. Use `resource` field instead.", alias="objectNamespace")
- permission: StrictStr = Field(description="the permission name to check.
*Example:* `get`, `list`, `compute.instance.create`")
- resource: Optional[StrictStr] = Field(default=None, description="`namespace:uuid` or `namespace:name` of the org or project, and `namespace:urn` of a resource under a project. In case of an org/project either provide the complete namespace (app/organization) or Frontier can also parse aliases for the same as `org` or `project`.
*Example:* `organization:92f69c3a-334b-4f25-90b8-4d4f3be6b825` or `app/project:project-name` or `compute/instance:92f69c3a-334b-4f25-90b8-4d4f3be6b825`")
- __properties: ClassVar[List[str]] = ["objectId", "objectNamespace", "permission", "resource"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ object_id: Optional[StrictStr] = Field(None, alias="objectId", description="Deprecated. Use `resource` field instead.")
+ object_namespace: Optional[StrictStr] = Field(None, alias="objectNamespace", description="Deprecated. Use `resource` field instead.")
+ permission: StrictStr = Field(..., description="the permission name to check.
*Example:* `get`, `list`, `compute.instance.create`")
+ resource: Optional[StrictStr] = Field(None, description="`namespace:uuid` or `namespace:name` of the org or project, and `namespace:urn` of a resource under a project. In case of an org/project either provide the complete namespace (app/organization) or Frontier can also parse aliases for the same as `org` or `project`.
*Example:* `organization:92f69c3a-334b-4f25-90b8-4d4f3be6b825` or `app/project:project-name` or `compute/instance:92f69c3a-334b-4f25-90b8-4d4f3be6b825`")
+ __properties = ["objectId", "objectNamespace", "permission", "resource"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CheckResourcePermissionRequest:
"""Create an instance of V1beta1CheckResourcePermissionRequest 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CheckResourcePermissionRequest:
"""Create an instance of V1beta1CheckResourcePermissionRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CheckResourcePermissionRequest.parse_obj(obj)
- _obj = cls.model_validate({
- "objectId": obj.get("objectId"),
- "objectNamespace": obj.get("objectNamespace"),
+ _obj = V1beta1CheckResourcePermissionRequest.parse_obj({
+ "object_id": obj.get("objectId"),
+ "object_namespace": obj.get("objectNamespace"),
"permission": obj.get("permission"),
"resource": obj.get("resource")
})
diff --git a/frontier_api/models/v1beta1_check_resource_permission_response.py b/frontier_api/models/v1beta1_check_resource_permission_response.py
index 4bc3abb..aa023f6 100644
--- a/frontier_api/models/v1beta1_check_resource_permission_response.py
+++ b/frontier_api/models/v1beta1_check_resource_permission_response.py
@@ -19,68 +19,52 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel, StrictBool
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CheckResourcePermissionResponse(BaseModel):
"""
V1beta1CheckResourcePermissionResponse
- """ # noqa: E501
+ """
status: Optional[StrictBool] = None
- __properties: ClassVar[List[str]] = ["status"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["status"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CheckResourcePermissionResponse:
"""Create an instance of V1beta1CheckResourcePermissionResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CheckResourcePermissionResponse:
"""Create an instance of V1beta1CheckResourcePermissionResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CheckResourcePermissionResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CheckResourcePermissionResponse.parse_obj({
"status": obj.get("status")
})
return _obj
diff --git a/frontier_api/models/v1beta1_checkout_feature_body.py b/frontier_api/models/v1beta1_checkout_feature_body.py
index 0ea464a..5fead59 100644
--- a/frontier_api/models/v1beta1_checkout_feature_body.py
+++ b/frontier_api/models/v1beta1_checkout_feature_body.py
@@ -19,68 +19,52 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel, StrictStr
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CheckoutFeatureBody(BaseModel):
"""
V1beta1CheckoutFeatureBody
- """ # noqa: E501
+ """
feature: Optional[StrictStr] = None
- __properties: ClassVar[List[str]] = ["feature"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["feature"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CheckoutFeatureBody:
"""Create an instance of V1beta1CheckoutFeatureBody 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CheckoutFeatureBody:
"""Create an instance of V1beta1CheckoutFeatureBody from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CheckoutFeatureBody.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CheckoutFeatureBody.parse_obj({
"feature": obj.get("feature")
})
return _obj
diff --git a/frontier_api/models/v1beta1_checkout_session.py b/frontier_api/models/v1beta1_checkout_session.py
index 1845878..3bf9e79 100644
--- a/frontier_api/models/v1beta1_checkout_session.py
+++ b/frontier_api/models/v1beta1_checkout_session.py
@@ -19,86 +19,69 @@
import json
from datetime import datetime
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Any, Dict, Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1CheckoutSession(BaseModel):
"""
V1beta1CheckoutSession
- """ # noqa: E501
+ """
id: Optional[StrictStr] = None
- checkout_url: Optional[StrictStr] = Field(default=None, alias="checkoutUrl")
- success_url: Optional[StrictStr] = Field(default=None, alias="successUrl")
- cancel_url: Optional[StrictStr] = Field(default=None, alias="cancelUrl")
+ checkout_url: Optional[StrictStr] = Field(None, alias="checkoutUrl")
+ success_url: Optional[StrictStr] = Field(None, alias="successUrl")
+ cancel_url: Optional[StrictStr] = Field(None, alias="cancelUrl")
state: Optional[StrictStr] = None
- metadata: Optional[Union[str, Any]] = None
- created_at: Optional[datetime] = Field(default=None, alias="createdAt")
- updated_at: Optional[datetime] = Field(default=None, alias="updatedAt")
- expire_at: Optional[datetime] = Field(default=None, alias="expireAt")
- __properties: ClassVar[List[str]] = ["id", "checkoutUrl", "successUrl", "cancelUrl", "state", "metadata", "createdAt", "updatedAt", "expireAt"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ metadata: Optional[Dict[str, Any]] = None
+ created_at: Optional[datetime] = Field(None, alias="createdAt")
+ updated_at: Optional[datetime] = Field(None, alias="updatedAt")
+ expire_at: Optional[datetime] = Field(None, alias="expireAt")
+ __properties = ["id", "checkoutUrl", "successUrl", "cancelUrl", "state", "metadata", "createdAt", "updatedAt", "expireAt"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CheckoutSession:
"""Create an instance of V1beta1CheckoutSession 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CheckoutSession:
"""Create an instance of V1beta1CheckoutSession from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CheckoutSession.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CheckoutSession.parse_obj({
"id": obj.get("id"),
- "checkoutUrl": obj.get("checkoutUrl"),
- "successUrl": obj.get("successUrl"),
- "cancelUrl": obj.get("cancelUrl"),
+ "checkout_url": obj.get("checkoutUrl"),
+ "success_url": obj.get("successUrl"),
+ "cancel_url": obj.get("cancelUrl"),
"state": obj.get("state"),
"metadata": obj.get("metadata"),
- "createdAt": obj.get("createdAt"),
- "updatedAt": obj.get("updatedAt"),
- "expireAt": obj.get("expireAt")
+ "created_at": obj.get("createdAt"),
+ "updated_at": obj.get("updatedAt"),
+ "expire_at": obj.get("expireAt")
})
return _obj
diff --git a/frontier_api/models/v1beta1_checkout_subscription_body.py b/frontier_api/models/v1beta1_checkout_subscription_body.py
index 7176657..5803a51 100644
--- a/frontier_api/models/v1beta1_checkout_subscription_body.py
+++ b/frontier_api/models/v1beta1_checkout_subscription_body.py
@@ -19,72 +19,55 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictInt, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Optional
+from pydantic import BaseModel, Field, StrictInt, StrictStr
class V1beta1CheckoutSubscriptionBody(BaseModel):
"""
V1beta1CheckoutSubscriptionBody
- """ # noqa: E501
+ """
plan: Optional[StrictStr] = None
- trail_days: Optional[StrictInt] = Field(default=None, alias="trailDays")
- __properties: ClassVar[List[str]] = ["plan", "trailDays"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ trail_days: Optional[StrictInt] = Field(None, alias="trailDays")
+ __properties = ["plan", "trailDays"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CheckoutSubscriptionBody:
"""Create an instance of V1beta1CheckoutSubscriptionBody 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CheckoutSubscriptionBody:
"""Create an instance of V1beta1CheckoutSubscriptionBody from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CheckoutSubscriptionBody.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CheckoutSubscriptionBody.parse_obj({
"plan": obj.get("plan"),
- "trailDays": obj.get("trailDays")
+ "trail_days": obj.get("trailDays")
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_billing_account_response.py b/frontier_api/models/v1beta1_create_billing_account_response.py
index 50e299a..f4b8cd4 100644
--- a/frontier_api/models/v1beta1_create_billing_account_response.py
+++ b/frontier_api/models/v1beta1_create_billing_account_response.py
@@ -19,74 +19,57 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
-from pydantic import Field
+from typing import Optional
+from pydantic import BaseModel, Field
from frontier_api.models.v1beta1_billing_account import V1beta1BillingAccount
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreateBillingAccountResponse(BaseModel):
"""
V1beta1CreateBillingAccountResponse
- """ # noqa: E501
- billing_account: Optional[V1beta1BillingAccount] = Field(default=None, alias="billingAccount")
- __properties: ClassVar[List[str]] = ["billingAccount"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ billing_account: Optional[V1beta1BillingAccount] = Field(None, alias="billingAccount")
+ __properties = ["billingAccount"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreateBillingAccountResponse:
"""Create an instance of V1beta1CreateBillingAccountResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of billing_account
if self.billing_account:
_dict['billingAccount'] = self.billing_account.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreateBillingAccountResponse:
"""Create an instance of V1beta1CreateBillingAccountResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreateBillingAccountResponse.parse_obj(obj)
- _obj = cls.model_validate({
- "billingAccount": V1beta1BillingAccount.from_dict(obj.get("billingAccount")) if obj.get("billingAccount") is not None else None
+ _obj = V1beta1CreateBillingAccountResponse.parse_obj({
+ "billing_account": V1beta1BillingAccount.from_dict(obj.get("billingAccount")) if obj.get("billingAccount") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_checkout_response.py b/frontier_api/models/v1beta1_create_checkout_response.py
index 4ec586e..6e54dbc 100644
--- a/frontier_api/models/v1beta1_create_checkout_response.py
+++ b/frontier_api/models/v1beta1_create_checkout_response.py
@@ -19,74 +19,57 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
-from pydantic import Field
+from typing import Optional
+from pydantic import BaseModel, Field
from frontier_api.models.v1beta1_checkout_session import V1beta1CheckoutSession
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreateCheckoutResponse(BaseModel):
"""
V1beta1CreateCheckoutResponse
- """ # noqa: E501
- checkout_session: Optional[V1beta1CheckoutSession] = Field(default=None, alias="checkoutSession")
- __properties: ClassVar[List[str]] = ["checkoutSession"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ checkout_session: Optional[V1beta1CheckoutSession] = Field(None, alias="checkoutSession")
+ __properties = ["checkoutSession"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreateCheckoutResponse:
"""Create an instance of V1beta1CreateCheckoutResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of checkout_session
if self.checkout_session:
_dict['checkoutSession'] = self.checkout_session.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreateCheckoutResponse:
"""Create an instance of V1beta1CreateCheckoutResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreateCheckoutResponse.parse_obj(obj)
- _obj = cls.model_validate({
- "checkoutSession": V1beta1CheckoutSession.from_dict(obj.get("checkoutSession")) if obj.get("checkoutSession") is not None else None
+ _obj = V1beta1CreateCheckoutResponse.parse_obj({
+ "checkout_session": V1beta1CheckoutSession.from_dict(obj.get("checkoutSession")) if obj.get("checkoutSession") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_current_user_preferences_request.py b/frontier_api/models/v1beta1_create_current_user_preferences_request.py
index 7400cc2..f5e9f3e 100644
--- a/frontier_api/models/v1beta1_create_current_user_preferences_request.py
+++ b/frontier_api/models/v1beta1_create_current_user_preferences_request.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_preference_request_body import V1beta1PreferenceRequestBody
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreateCurrentUserPreferencesRequest(BaseModel):
"""
V1beta1CreateCurrentUserPreferencesRequest
- """ # noqa: E501
- bodies: Optional[List[V1beta1PreferenceRequestBody]] = None
- __properties: ClassVar[List[str]] = ["bodies"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ bodies: Optional[conlist(V1beta1PreferenceRequestBody)] = None
+ __properties = ["bodies"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreateCurrentUserPreferencesRequest:
"""Create an instance of V1beta1CreateCurrentUserPreferencesRequest 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in bodies (list)
_items = []
if self.bodies:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreateCurrentUserPreferencesRequest:
"""Create an instance of V1beta1CreateCurrentUserPreferencesRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreateCurrentUserPreferencesRequest.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreateCurrentUserPreferencesRequest.parse_obj({
"bodies": [V1beta1PreferenceRequestBody.from_dict(_item) for _item in obj.get("bodies")] if obj.get("bodies") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_current_user_preferences_response.py b/frontier_api/models/v1beta1_create_current_user_preferences_response.py
index 309a129..122db60 100644
--- a/frontier_api/models/v1beta1_create_current_user_preferences_response.py
+++ b/frontier_api/models/v1beta1_create_current_user_preferences_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_preference import V1beta1Preference
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreateCurrentUserPreferencesResponse(BaseModel):
"""
V1beta1CreateCurrentUserPreferencesResponse
- """ # noqa: E501
- preferences: Optional[List[V1beta1Preference]] = None
- __properties: ClassVar[List[str]] = ["preferences"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ preferences: Optional[conlist(V1beta1Preference)] = None
+ __properties = ["preferences"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreateCurrentUserPreferencesResponse:
"""Create an instance of V1beta1CreateCurrentUserPreferencesResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in preferences (list)
_items = []
if self.preferences:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreateCurrentUserPreferencesResponse:
"""Create an instance of V1beta1CreateCurrentUserPreferencesResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreateCurrentUserPreferencesResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreateCurrentUserPreferencesResponse.parse_obj({
"preferences": [V1beta1Preference.from_dict(_item) for _item in obj.get("preferences")] if obj.get("preferences") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_feature_request.py b/frontier_api/models/v1beta1_create_feature_request.py
index b1e402b..99a3dc9 100644
--- a/frontier_api/models/v1beta1_create_feature_request.py
+++ b/frontier_api/models/v1beta1_create_feature_request.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_feature_request_body import V1beta1FeatureRequestBody
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreateFeatureRequest(BaseModel):
"""
V1beta1CreateFeatureRequest
- """ # noqa: E501
+ """
body: Optional[V1beta1FeatureRequestBody] = None
- __properties: ClassVar[List[str]] = ["body"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["body"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreateFeatureRequest:
"""Create an instance of V1beta1CreateFeatureRequest 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of body
if self.body:
_dict['body'] = self.body.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreateFeatureRequest:
"""Create an instance of V1beta1CreateFeatureRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreateFeatureRequest.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreateFeatureRequest.parse_obj({
"body": V1beta1FeatureRequestBody.from_dict(obj.get("body")) if obj.get("body") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_feature_response.py b/frontier_api/models/v1beta1_create_feature_response.py
index e11e5d2..b650c94 100644
--- a/frontier_api/models/v1beta1_create_feature_response.py
+++ b/frontier_api/models/v1beta1_create_feature_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_feature import V1beta1Feature
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreateFeatureResponse(BaseModel):
"""
V1beta1CreateFeatureResponse
- """ # noqa: E501
+ """
feature: Optional[V1beta1Feature] = None
- __properties: ClassVar[List[str]] = ["feature"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["feature"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreateFeatureResponse:
"""Create an instance of V1beta1CreateFeatureResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of feature
if self.feature:
_dict['feature'] = self.feature.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreateFeatureResponse:
"""Create an instance of V1beta1CreateFeatureResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreateFeatureResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreateFeatureResponse.parse_obj({
"feature": V1beta1Feature.from_dict(obj.get("feature")) if obj.get("feature") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_group_preferences_response.py b/frontier_api/models/v1beta1_create_group_preferences_response.py
index af08e24..1c0ad66 100644
--- a/frontier_api/models/v1beta1_create_group_preferences_response.py
+++ b/frontier_api/models/v1beta1_create_group_preferences_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_preference import V1beta1Preference
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreateGroupPreferencesResponse(BaseModel):
"""
V1beta1CreateGroupPreferencesResponse
- """ # noqa: E501
- preferences: Optional[List[V1beta1Preference]] = None
- __properties: ClassVar[List[str]] = ["preferences"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ preferences: Optional[conlist(V1beta1Preference)] = None
+ __properties = ["preferences"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreateGroupPreferencesResponse:
"""Create an instance of V1beta1CreateGroupPreferencesResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in preferences (list)
_items = []
if self.preferences:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreateGroupPreferencesResponse:
"""Create an instance of V1beta1CreateGroupPreferencesResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreateGroupPreferencesResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreateGroupPreferencesResponse.parse_obj({
"preferences": [V1beta1Preference.from_dict(_item) for _item in obj.get("preferences")] if obj.get("preferences") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_group_response.py b/frontier_api/models/v1beta1_create_group_response.py
index 35974e4..63f4be6 100644
--- a/frontier_api/models/v1beta1_create_group_response.py
+++ b/frontier_api/models/v1beta1_create_group_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_group import V1beta1Group
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreateGroupResponse(BaseModel):
"""
V1beta1CreateGroupResponse
- """ # noqa: E501
+ """
group: Optional[V1beta1Group] = None
- __properties: ClassVar[List[str]] = ["group"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["group"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreateGroupResponse:
"""Create an instance of V1beta1CreateGroupResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of group
if self.group:
_dict['group'] = self.group.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreateGroupResponse:
"""Create an instance of V1beta1CreateGroupResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreateGroupResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreateGroupResponse.parse_obj({
"group": V1beta1Group.from_dict(obj.get("group")) if obj.get("group") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_meta_schema_response.py b/frontier_api/models/v1beta1_create_meta_schema_response.py
index df6bb3b..3b7e09d 100644
--- a/frontier_api/models/v1beta1_create_meta_schema_response.py
+++ b/frontier_api/models/v1beta1_create_meta_schema_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_meta_schema import V1beta1MetaSchema
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreateMetaSchemaResponse(BaseModel):
"""
V1beta1CreateMetaSchemaResponse
- """ # noqa: E501
+ """
metaschema: Optional[V1beta1MetaSchema] = None
- __properties: ClassVar[List[str]] = ["metaschema"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["metaschema"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreateMetaSchemaResponse:
"""Create an instance of V1beta1CreateMetaSchemaResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of metaschema
if self.metaschema:
_dict['metaschema'] = self.metaschema.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreateMetaSchemaResponse:
"""Create an instance of V1beta1CreateMetaSchemaResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreateMetaSchemaResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreateMetaSchemaResponse.parse_obj({
"metaschema": V1beta1MetaSchema.from_dict(obj.get("metaschema")) if obj.get("metaschema") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_organization_domain_response.py b/frontier_api/models/v1beta1_create_organization_domain_response.py
index c7f4a3d..4f44fa8 100644
--- a/frontier_api/models/v1beta1_create_organization_domain_response.py
+++ b/frontier_api/models/v1beta1_create_organization_domain_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_domain import V1beta1Domain
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreateOrganizationDomainResponse(BaseModel):
"""
V1beta1CreateOrganizationDomainResponse
- """ # noqa: E501
+ """
domain: Optional[V1beta1Domain] = None
- __properties: ClassVar[List[str]] = ["domain"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["domain"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreateOrganizationDomainResponse:
"""Create an instance of V1beta1CreateOrganizationDomainResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of domain
if self.domain:
_dict['domain'] = self.domain.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreateOrganizationDomainResponse:
"""Create an instance of V1beta1CreateOrganizationDomainResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreateOrganizationDomainResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreateOrganizationDomainResponse.parse_obj({
"domain": V1beta1Domain.from_dict(obj.get("domain")) if obj.get("domain") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_organization_invitation_response.py b/frontier_api/models/v1beta1_create_organization_invitation_response.py
index 1e7f758..faa69f8 100644
--- a/frontier_api/models/v1beta1_create_organization_invitation_response.py
+++ b/frontier_api/models/v1beta1_create_organization_invitation_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_invitation import V1beta1Invitation
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreateOrganizationInvitationResponse(BaseModel):
"""
V1beta1CreateOrganizationInvitationResponse
- """ # noqa: E501
- invitations: Optional[List[V1beta1Invitation]] = None
- __properties: ClassVar[List[str]] = ["invitations"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ invitations: Optional[conlist(V1beta1Invitation)] = None
+ __properties = ["invitations"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreateOrganizationInvitationResponse:
"""Create an instance of V1beta1CreateOrganizationInvitationResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in invitations (list)
_items = []
if self.invitations:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreateOrganizationInvitationResponse:
"""Create an instance of V1beta1CreateOrganizationInvitationResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreateOrganizationInvitationResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreateOrganizationInvitationResponse.parse_obj({
"invitations": [V1beta1Invitation.from_dict(_item) for _item in obj.get("invitations")] if obj.get("invitations") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_organization_preferences_response.py b/frontier_api/models/v1beta1_create_organization_preferences_response.py
index 1315e14..72fbddd 100644
--- a/frontier_api/models/v1beta1_create_organization_preferences_response.py
+++ b/frontier_api/models/v1beta1_create_organization_preferences_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_preference import V1beta1Preference
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreateOrganizationPreferencesResponse(BaseModel):
"""
V1beta1CreateOrganizationPreferencesResponse
- """ # noqa: E501
- preferences: Optional[List[V1beta1Preference]] = None
- __properties: ClassVar[List[str]] = ["preferences"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ preferences: Optional[conlist(V1beta1Preference)] = None
+ __properties = ["preferences"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreateOrganizationPreferencesResponse:
"""Create an instance of V1beta1CreateOrganizationPreferencesResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in preferences (list)
_items = []
if self.preferences:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreateOrganizationPreferencesResponse:
"""Create an instance of V1beta1CreateOrganizationPreferencesResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreateOrganizationPreferencesResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreateOrganizationPreferencesResponse.parse_obj({
"preferences": [V1beta1Preference.from_dict(_item) for _item in obj.get("preferences")] if obj.get("preferences") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_organization_response.py b/frontier_api/models/v1beta1_create_organization_response.py
index 800785f..f437aa8 100644
--- a/frontier_api/models/v1beta1_create_organization_response.py
+++ b/frontier_api/models/v1beta1_create_organization_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_organization import V1beta1Organization
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreateOrganizationResponse(BaseModel):
"""
V1beta1CreateOrganizationResponse
- """ # noqa: E501
+ """
organization: Optional[V1beta1Organization] = None
- __properties: ClassVar[List[str]] = ["organization"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["organization"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreateOrganizationResponse:
"""Create an instance of V1beta1CreateOrganizationResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of organization
if self.organization:
_dict['organization'] = self.organization.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreateOrganizationResponse:
"""Create an instance of V1beta1CreateOrganizationResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreateOrganizationResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreateOrganizationResponse.parse_obj({
"organization": V1beta1Organization.from_dict(obj.get("organization")) if obj.get("organization") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_organization_role_response.py b/frontier_api/models/v1beta1_create_organization_role_response.py
index f5a1d19..55d8fa1 100644
--- a/frontier_api/models/v1beta1_create_organization_role_response.py
+++ b/frontier_api/models/v1beta1_create_organization_role_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_role import V1beta1Role
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreateOrganizationRoleResponse(BaseModel):
"""
V1beta1CreateOrganizationRoleResponse
- """ # noqa: E501
+ """
role: Optional[V1beta1Role] = None
- __properties: ClassVar[List[str]] = ["role"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["role"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreateOrganizationRoleResponse:
"""Create an instance of V1beta1CreateOrganizationRoleResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of role
if self.role:
_dict['role'] = self.role.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreateOrganizationRoleResponse:
"""Create an instance of V1beta1CreateOrganizationRoleResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreateOrganizationRoleResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreateOrganizationRoleResponse.parse_obj({
"role": V1beta1Role.from_dict(obj.get("role")) if obj.get("role") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_permission_request.py b/frontier_api/models/v1beta1_create_permission_request.py
index 614f470..3571081 100644
--- a/frontier_api/models/v1beta1_create_permission_request.py
+++ b/frontier_api/models/v1beta1_create_permission_request.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_permission_request_body import V1beta1PermissionRequestBody
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreatePermissionRequest(BaseModel):
"""
V1beta1CreatePermissionRequest
- """ # noqa: E501
- bodies: Optional[List[V1beta1PermissionRequestBody]] = None
- __properties: ClassVar[List[str]] = ["bodies"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ bodies: Optional[conlist(V1beta1PermissionRequestBody)] = None
+ __properties = ["bodies"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreatePermissionRequest:
"""Create an instance of V1beta1CreatePermissionRequest 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in bodies (list)
_items = []
if self.bodies:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreatePermissionRequest:
"""Create an instance of V1beta1CreatePermissionRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreatePermissionRequest.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreatePermissionRequest.parse_obj({
"bodies": [V1beta1PermissionRequestBody.from_dict(_item) for _item in obj.get("bodies")] if obj.get("bodies") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_permission_response.py b/frontier_api/models/v1beta1_create_permission_response.py
index 2dd5330..6e0fbb7 100644
--- a/frontier_api/models/v1beta1_create_permission_response.py
+++ b/frontier_api/models/v1beta1_create_permission_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_permission import V1beta1Permission
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreatePermissionResponse(BaseModel):
"""
V1beta1CreatePermissionResponse
- """ # noqa: E501
- permissions: Optional[List[V1beta1Permission]] = None
- __properties: ClassVar[List[str]] = ["permissions"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ permissions: Optional[conlist(V1beta1Permission)] = None
+ __properties = ["permissions"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreatePermissionResponse:
"""Create an instance of V1beta1CreatePermissionResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in permissions (list)
_items = []
if self.permissions:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreatePermissionResponse:
"""Create an instance of V1beta1CreatePermissionResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreatePermissionResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreatePermissionResponse.parse_obj({
"permissions": [V1beta1Permission.from_dict(_item) for _item in obj.get("permissions")] if obj.get("permissions") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_plan_request.py b/frontier_api/models/v1beta1_create_plan_request.py
index 927d4eb..370deff 100644
--- a/frontier_api/models/v1beta1_create_plan_request.py
+++ b/frontier_api/models/v1beta1_create_plan_request.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_plan_request_body import V1beta1PlanRequestBody
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreatePlanRequest(BaseModel):
"""
V1beta1CreatePlanRequest
- """ # noqa: E501
+ """
body: Optional[V1beta1PlanRequestBody] = None
- __properties: ClassVar[List[str]] = ["body"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["body"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreatePlanRequest:
"""Create an instance of V1beta1CreatePlanRequest 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of body
if self.body:
_dict['body'] = self.body.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreatePlanRequest:
"""Create an instance of V1beta1CreatePlanRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreatePlanRequest.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreatePlanRequest.parse_obj({
"body": V1beta1PlanRequestBody.from_dict(obj.get("body")) if obj.get("body") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_plan_response.py b/frontier_api/models/v1beta1_create_plan_response.py
index 96744e7..a604b0d 100644
--- a/frontier_api/models/v1beta1_create_plan_response.py
+++ b/frontier_api/models/v1beta1_create_plan_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_plan import V1beta1Plan
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreatePlanResponse(BaseModel):
"""
V1beta1CreatePlanResponse
- """ # noqa: E501
+ """
plan: Optional[V1beta1Plan] = None
- __properties: ClassVar[List[str]] = ["plan"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["plan"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreatePlanResponse:
"""Create an instance of V1beta1CreatePlanResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of plan
if self.plan:
_dict['plan'] = self.plan.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreatePlanResponse:
"""Create an instance of V1beta1CreatePlanResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreatePlanResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreatePlanResponse.parse_obj({
"plan": V1beta1Plan.from_dict(obj.get("plan")) if obj.get("plan") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_policy_response.py b/frontier_api/models/v1beta1_create_policy_response.py
index 172b24e..a1723a3 100644
--- a/frontier_api/models/v1beta1_create_policy_response.py
+++ b/frontier_api/models/v1beta1_create_policy_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_policy import V1beta1Policy
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreatePolicyResponse(BaseModel):
"""
V1beta1CreatePolicyResponse
- """ # noqa: E501
+ """
policy: Optional[V1beta1Policy] = None
- __properties: ClassVar[List[str]] = ["policy"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["policy"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreatePolicyResponse:
"""Create an instance of V1beta1CreatePolicyResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of policy
if self.policy:
_dict['policy'] = self.policy.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreatePolicyResponse:
"""Create an instance of V1beta1CreatePolicyResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreatePolicyResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreatePolicyResponse.parse_obj({
"policy": V1beta1Policy.from_dict(obj.get("policy")) if obj.get("policy") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_preferences_request.py b/frontier_api/models/v1beta1_create_preferences_request.py
index b0401fc..531de84 100644
--- a/frontier_api/models/v1beta1_create_preferences_request.py
+++ b/frontier_api/models/v1beta1_create_preferences_request.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_preference_request_body import V1beta1PreferenceRequestBody
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreatePreferencesRequest(BaseModel):
"""
V1beta1CreatePreferencesRequest
- """ # noqa: E501
- preferences: Optional[List[V1beta1PreferenceRequestBody]] = None
- __properties: ClassVar[List[str]] = ["preferences"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ preferences: Optional[conlist(V1beta1PreferenceRequestBody)] = None
+ __properties = ["preferences"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreatePreferencesRequest:
"""Create an instance of V1beta1CreatePreferencesRequest 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in preferences (list)
_items = []
if self.preferences:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreatePreferencesRequest:
"""Create an instance of V1beta1CreatePreferencesRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreatePreferencesRequest.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreatePreferencesRequest.parse_obj({
"preferences": [V1beta1PreferenceRequestBody.from_dict(_item) for _item in obj.get("preferences")] if obj.get("preferences") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_preferences_response.py b/frontier_api/models/v1beta1_create_preferences_response.py
index 8a21398..6058692 100644
--- a/frontier_api/models/v1beta1_create_preferences_response.py
+++ b/frontier_api/models/v1beta1_create_preferences_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_preference import V1beta1Preference
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreatePreferencesResponse(BaseModel):
"""
V1beta1CreatePreferencesResponse
- """ # noqa: E501
- preference: Optional[List[V1beta1Preference]] = None
- __properties: ClassVar[List[str]] = ["preference"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ preference: Optional[conlist(V1beta1Preference)] = None
+ __properties = ["preference"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreatePreferencesResponse:
"""Create an instance of V1beta1CreatePreferencesResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in preference (list)
_items = []
if self.preference:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreatePreferencesResponse:
"""Create an instance of V1beta1CreatePreferencesResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreatePreferencesResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreatePreferencesResponse.parse_obj({
"preference": [V1beta1Preference.from_dict(_item) for _item in obj.get("preference")] if obj.get("preference") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_project_preferences_response.py b/frontier_api/models/v1beta1_create_project_preferences_response.py
index ac3b8c5..d27c5b5 100644
--- a/frontier_api/models/v1beta1_create_project_preferences_response.py
+++ b/frontier_api/models/v1beta1_create_project_preferences_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_preference import V1beta1Preference
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreateProjectPreferencesResponse(BaseModel):
"""
V1beta1CreateProjectPreferencesResponse
- """ # noqa: E501
- preferences: Optional[List[V1beta1Preference]] = None
- __properties: ClassVar[List[str]] = ["preferences"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ preferences: Optional[conlist(V1beta1Preference)] = None
+ __properties = ["preferences"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreateProjectPreferencesResponse:
"""Create an instance of V1beta1CreateProjectPreferencesResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in preferences (list)
_items = []
if self.preferences:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreateProjectPreferencesResponse:
"""Create an instance of V1beta1CreateProjectPreferencesResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreateProjectPreferencesResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreateProjectPreferencesResponse.parse_obj({
"preferences": [V1beta1Preference.from_dict(_item) for _item in obj.get("preferences")] if obj.get("preferences") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_project_resource_response.py b/frontier_api/models/v1beta1_create_project_resource_response.py
index 1c06564..a39d3d0 100644
--- a/frontier_api/models/v1beta1_create_project_resource_response.py
+++ b/frontier_api/models/v1beta1_create_project_resource_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_resource import V1beta1Resource
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreateProjectResourceResponse(BaseModel):
"""
V1beta1CreateProjectResourceResponse
- """ # noqa: E501
+ """
resource: Optional[V1beta1Resource] = None
- __properties: ClassVar[List[str]] = ["resource"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["resource"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreateProjectResourceResponse:
"""Create an instance of V1beta1CreateProjectResourceResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of resource
if self.resource:
_dict['resource'] = self.resource.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreateProjectResourceResponse:
"""Create an instance of V1beta1CreateProjectResourceResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreateProjectResourceResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreateProjectResourceResponse.parse_obj({
"resource": V1beta1Resource.from_dict(obj.get("resource")) if obj.get("resource") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_project_response.py b/frontier_api/models/v1beta1_create_project_response.py
index 7fbb95b..3a61e35 100644
--- a/frontier_api/models/v1beta1_create_project_response.py
+++ b/frontier_api/models/v1beta1_create_project_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_project import V1beta1Project
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreateProjectResponse(BaseModel):
"""
V1beta1CreateProjectResponse
- """ # noqa: E501
+ """
project: Optional[V1beta1Project] = None
- __properties: ClassVar[List[str]] = ["project"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["project"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreateProjectResponse:
"""Create an instance of V1beta1CreateProjectResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of project
if self.project:
_dict['project'] = self.project.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreateProjectResponse:
"""Create an instance of V1beta1CreateProjectResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreateProjectResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreateProjectResponse.parse_obj({
"project": V1beta1Project.from_dict(obj.get("project")) if obj.get("project") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_relation_response.py b/frontier_api/models/v1beta1_create_relation_response.py
index d0368cf..1635e03 100644
--- a/frontier_api/models/v1beta1_create_relation_response.py
+++ b/frontier_api/models/v1beta1_create_relation_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_relation import V1beta1Relation
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreateRelationResponse(BaseModel):
"""
V1beta1CreateRelationResponse
- """ # noqa: E501
+ """
relation: Optional[V1beta1Relation] = None
- __properties: ClassVar[List[str]] = ["relation"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["relation"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreateRelationResponse:
"""Create an instance of V1beta1CreateRelationResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of relation
if self.relation:
_dict['relation'] = self.relation.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreateRelationResponse:
"""Create an instance of V1beta1CreateRelationResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreateRelationResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreateRelationResponse.parse_obj({
"relation": V1beta1Relation.from_dict(obj.get("relation")) if obj.get("relation") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_role_response.py b/frontier_api/models/v1beta1_create_role_response.py
index 84018fd..788a1fc 100644
--- a/frontier_api/models/v1beta1_create_role_response.py
+++ b/frontier_api/models/v1beta1_create_role_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_role import V1beta1Role
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreateRoleResponse(BaseModel):
"""
V1beta1CreateRoleResponse
- """ # noqa: E501
+ """
role: Optional[V1beta1Role] = None
- __properties: ClassVar[List[str]] = ["role"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["role"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreateRoleResponse:
"""Create an instance of V1beta1CreateRoleResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of role
if self.role:
_dict['role'] = self.role.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreateRoleResponse:
"""Create an instance of V1beta1CreateRoleResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreateRoleResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreateRoleResponse.parse_obj({
"role": V1beta1Role.from_dict(obj.get("role")) if obj.get("role") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_service_user_key_response.py b/frontier_api/models/v1beta1_create_service_user_key_response.py
index 98607ab..7664141 100644
--- a/frontier_api/models/v1beta1_create_service_user_key_response.py
+++ b/frontier_api/models/v1beta1_create_service_user_key_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_key_credential import V1beta1KeyCredential
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreateServiceUserKeyResponse(BaseModel):
"""
V1beta1CreateServiceUserKeyResponse
- """ # noqa: E501
+ """
key: Optional[V1beta1KeyCredential] = None
- __properties: ClassVar[List[str]] = ["key"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["key"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreateServiceUserKeyResponse:
"""Create an instance of V1beta1CreateServiceUserKeyResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of key
if self.key:
_dict['key'] = self.key.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreateServiceUserKeyResponse:
"""Create an instance of V1beta1CreateServiceUserKeyResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreateServiceUserKeyResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreateServiceUserKeyResponse.parse_obj({
"key": V1beta1KeyCredential.from_dict(obj.get("key")) if obj.get("key") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_service_user_request.py b/frontier_api/models/v1beta1_create_service_user_request.py
index 4ac6a4c..c7fcb43 100644
--- a/frontier_api/models/v1beta1_create_service_user_request.py
+++ b/frontier_api/models/v1beta1_create_service_user_request.py
@@ -19,76 +19,59 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
+from typing import Optional
+from pydantic import BaseModel, Field, StrictStr
from frontier_api.models.v1beta1_service_user_request_body import V1beta1ServiceUserRequestBody
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreateServiceUserRequest(BaseModel):
"""
V1beta1CreateServiceUserRequest
- """ # noqa: E501
+ """
body: Optional[V1beta1ServiceUserRequestBody] = None
- org_id: StrictStr = Field(description="The organization ID to which the service user belongs to.", alias="orgId")
- __properties: ClassVar[List[str]] = ["body", "orgId"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ org_id: StrictStr = Field(..., alias="orgId", description="The organization ID to which the service user belongs to.")
+ __properties = ["body", "orgId"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreateServiceUserRequest:
"""Create an instance of V1beta1CreateServiceUserRequest 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of body
if self.body:
_dict['body'] = self.body.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreateServiceUserRequest:
"""Create an instance of V1beta1CreateServiceUserRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreateServiceUserRequest.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreateServiceUserRequest.parse_obj({
"body": V1beta1ServiceUserRequestBody.from_dict(obj.get("body")) if obj.get("body") is not None else None,
- "orgId": obj.get("orgId")
+ "org_id": obj.get("orgId")
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_service_user_response.py b/frontier_api/models/v1beta1_create_service_user_response.py
index 6bf6aab..4867bbd 100644
--- a/frontier_api/models/v1beta1_create_service_user_response.py
+++ b/frontier_api/models/v1beta1_create_service_user_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_service_user import V1beta1ServiceUser
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreateServiceUserResponse(BaseModel):
"""
V1beta1CreateServiceUserResponse
- """ # noqa: E501
+ """
serviceuser: Optional[V1beta1ServiceUser] = None
- __properties: ClassVar[List[str]] = ["serviceuser"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["serviceuser"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreateServiceUserResponse:
"""Create an instance of V1beta1CreateServiceUserResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of serviceuser
if self.serviceuser:
_dict['serviceuser'] = self.serviceuser.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreateServiceUserResponse:
"""Create an instance of V1beta1CreateServiceUserResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreateServiceUserResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreateServiceUserResponse.parse_obj({
"serviceuser": V1beta1ServiceUser.from_dict(obj.get("serviceuser")) if obj.get("serviceuser") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_service_user_secret_response.py b/frontier_api/models/v1beta1_create_service_user_secret_response.py
index df3fb86..51d1560 100644
--- a/frontier_api/models/v1beta1_create_service_user_secret_response.py
+++ b/frontier_api/models/v1beta1_create_service_user_secret_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_secret_credential import V1beta1SecretCredential
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreateServiceUserSecretResponse(BaseModel):
"""
V1beta1CreateServiceUserSecretResponse
- """ # noqa: E501
+ """
secret: Optional[V1beta1SecretCredential] = None
- __properties: ClassVar[List[str]] = ["secret"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["secret"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreateServiceUserSecretResponse:
"""Create an instance of V1beta1CreateServiceUserSecretResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of secret
if self.secret:
_dict['secret'] = self.secret.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreateServiceUserSecretResponse:
"""Create an instance of V1beta1CreateServiceUserSecretResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreateServiceUserSecretResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreateServiceUserSecretResponse.parse_obj({
"secret": V1beta1SecretCredential.from_dict(obj.get("secret")) if obj.get("secret") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_user_preferences_response.py b/frontier_api/models/v1beta1_create_user_preferences_response.py
index 809c111..1946292 100644
--- a/frontier_api/models/v1beta1_create_user_preferences_response.py
+++ b/frontier_api/models/v1beta1_create_user_preferences_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_preference import V1beta1Preference
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreateUserPreferencesResponse(BaseModel):
"""
V1beta1CreateUserPreferencesResponse
- """ # noqa: E501
- preferences: Optional[List[V1beta1Preference]] = None
- __properties: ClassVar[List[str]] = ["preferences"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ preferences: Optional[conlist(V1beta1Preference)] = None
+ __properties = ["preferences"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreateUserPreferencesResponse:
"""Create an instance of V1beta1CreateUserPreferencesResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in preferences (list)
_items = []
if self.preferences:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreateUserPreferencesResponse:
"""Create an instance of V1beta1CreateUserPreferencesResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreateUserPreferencesResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreateUserPreferencesResponse.parse_obj({
"preferences": [V1beta1Preference.from_dict(_item) for _item in obj.get("preferences")] if obj.get("preferences") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_create_user_response.py b/frontier_api/models/v1beta1_create_user_response.py
index d600fcf..d05eba5 100644
--- a/frontier_api/models/v1beta1_create_user_response.py
+++ b/frontier_api/models/v1beta1_create_user_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_user import V1beta1User
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1CreateUserResponse(BaseModel):
"""
V1beta1CreateUserResponse
- """ # noqa: E501
+ """
user: Optional[V1beta1User] = None
- __properties: ClassVar[List[str]] = ["user"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["user"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1CreateUserResponse:
"""Create an instance of V1beta1CreateUserResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of user
if self.user:
_dict['user'] = self.user.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1CreateUserResponse:
"""Create an instance of V1beta1CreateUserResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1CreateUserResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1CreateUserResponse.parse_obj({
"user": V1beta1User.from_dict(obj.get("user")) if obj.get("user") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_delegated_checkout_response.py b/frontier_api/models/v1beta1_delegated_checkout_response.py
new file mode 100644
index 0000000..393b6d7
--- /dev/null
+++ b/frontier_api/models/v1beta1_delegated_checkout_response.py
@@ -0,0 +1,76 @@
+# coding: utf-8
+
+"""
+ Frontier Administration API
+
+ The Frontier APIs adhere to the OpenAPI specification, also known as Swagger, which provides a standardized approach for designing, documenting, and consuming RESTful APIs. With OpenAPI, you gain a clear understanding of the API endpoints, request/response structures, and authentication mechanisms supported by the Frontier APIs. By leveraging the OpenAPI specification, developers can easily explore and interact with the Frontier APIs using a variety of tools and libraries. The OpenAPI specification enables automatic code generation, interactive API documentation, and seamless integration with API testing frameworks, making it easier than ever to integrate Frontier into your existing applications and workflows.
+
+ The version of the OpenAPI document: 0.2.0
+ Contact: hello@raystack.org
+ 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 typing import Optional
+from pydantic import BaseModel, Field
+from frontier_api.models.v1beta1_checkout_session import V1beta1CheckoutSession
+
+class V1beta1DelegatedCheckoutResponse(BaseModel):
+ """
+ V1beta1DelegatedCheckoutResponse
+ """
+ checkout_session: Optional[V1beta1CheckoutSession] = Field(None, alias="checkoutSession")
+ __properties = ["checkoutSession"]
+
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.dict(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> V1beta1DelegatedCheckoutResponse:
+ """Create an instance of V1beta1DelegatedCheckoutResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
+ # override the default output from pydantic by calling `to_dict()` of checkout_session
+ if self.checkout_session:
+ _dict['checkoutSession'] = self.checkout_session.to_dict()
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: dict) -> V1beta1DelegatedCheckoutResponse:
+ """Create an instance of V1beta1DelegatedCheckoutResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return V1beta1DelegatedCheckoutResponse.parse_obj(obj)
+
+ _obj = V1beta1DelegatedCheckoutResponse.parse_obj({
+ "checkout_session": V1beta1CheckoutSession.from_dict(obj.get("checkoutSession")) if obj.get("checkoutSession") is not None else None
+ })
+ return _obj
+
+
diff --git a/frontier_api/models/v1beta1_describe_preferences_response.py b/frontier_api/models/v1beta1_describe_preferences_response.py
index 2bfba6b..005dd77 100644
--- a/frontier_api/models/v1beta1_describe_preferences_response.py
+++ b/frontier_api/models/v1beta1_describe_preferences_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_preference_trait import V1beta1PreferenceTrait
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1DescribePreferencesResponse(BaseModel):
"""
V1beta1DescribePreferencesResponse
- """ # noqa: E501
- traits: Optional[List[V1beta1PreferenceTrait]] = None
- __properties: ClassVar[List[str]] = ["traits"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ traits: Optional[conlist(V1beta1PreferenceTrait)] = None
+ __properties = ["traits"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1DescribePreferencesResponse:
"""Create an instance of V1beta1DescribePreferencesResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in traits (list)
_items = []
if self.traits:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1DescribePreferencesResponse:
"""Create an instance of V1beta1DescribePreferencesResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1DescribePreferencesResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1DescribePreferencesResponse.parse_obj({
"traits": [V1beta1PreferenceTrait.from_dict(_item) for _item in obj.get("traits")] if obj.get("traits") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_domain.py b/frontier_api/models/v1beta1_domain.py
index 6676d22..e33bd37 100644
--- a/frontier_api/models/v1beta1_domain.py
+++ b/frontier_api/models/v1beta1_domain.py
@@ -19,82 +19,65 @@
import json
from datetime import datetime
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1Domain(BaseModel):
"""
V1beta1Domain
- """ # noqa: E501
- id: Optional[StrictStr] = Field(default=None, description="The domain id")
- name: Optional[StrictStr] = Field(default=None, description="The domain name")
- org_id: Optional[StrictStr] = Field(default=None, description="The organization id", alias="orgId")
- token: Optional[StrictStr] = Field(default=None, description="The dns TXT record token to verify the domain")
- state: Optional[StrictStr] = Field(default=None, description="The domain state either pending or verified")
- created_at: Optional[datetime] = Field(default=None, description="The time the domain whitelist request was created", alias="createdAt")
- updated_at: Optional[datetime] = Field(default=None, description="The time the org domain was updated", alias="updatedAt")
- __properties: ClassVar[List[str]] = ["id", "name", "orgId", "token", "state", "createdAt", "updatedAt"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
-
+ """
+ id: Optional[StrictStr] = Field(None, description="The domain id")
+ name: Optional[StrictStr] = Field(None, description="The domain name")
+ org_id: Optional[StrictStr] = Field(None, alias="orgId", description="The organization id")
+ token: Optional[StrictStr] = Field(None, description="The dns TXT record token to verify the domain")
+ state: Optional[StrictStr] = Field(None, description="The domain state either pending or verified")
+ created_at: Optional[datetime] = Field(None, alias="createdAt", description="The time the domain whitelist request was created")
+ updated_at: Optional[datetime] = Field(None, alias="updatedAt", description="The time the org domain was updated")
+ __properties = ["id", "name", "orgId", "token", "state", "createdAt", "updatedAt"]
+
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1Domain:
"""Create an instance of V1beta1Domain 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1Domain:
"""Create an instance of V1beta1Domain from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1Domain.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1Domain.parse_obj({
"id": obj.get("id"),
"name": obj.get("name"),
- "orgId": obj.get("orgId"),
+ "org_id": obj.get("orgId"),
"token": obj.get("token"),
"state": obj.get("state"),
- "createdAt": obj.get("createdAt"),
- "updatedAt": obj.get("updatedAt")
+ "created_at": obj.get("createdAt"),
+ "updated_at": obj.get("updatedAt")
})
return _obj
diff --git a/frontier_api/models/v1beta1_feature.py b/frontier_api/models/v1beta1_feature.py
index dc1abf7..3554daa 100644
--- a/frontier_api/models/v1beta1_feature.py
+++ b/frontier_api/models/v1beta1_feature.py
@@ -19,68 +19,51 @@
import json
from datetime import datetime
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
+from typing import Any, Dict, List, Optional
+from pydantic import BaseModel, Field, StrictStr, conlist
from frontier_api.models.v1beta1_price import V1beta1Price
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1Feature(BaseModel):
"""
V1beta1Feature
- """ # noqa: E501
+ """
id: Optional[StrictStr] = None
name: Optional[StrictStr] = None
title: Optional[StrictStr] = None
description: Optional[StrictStr] = None
- plan_ids: Optional[List[StrictStr]] = Field(default=None, alias="planIds")
+ plan_ids: Optional[conlist(StrictStr)] = Field(None, alias="planIds")
state: Optional[StrictStr] = None
- prices: Optional[List[V1beta1Price]] = None
- credit_amount: Optional[StrictStr] = Field(default=None, alias="creditAmount")
- metadata: Optional[Union[str, Any]] = None
- created_at: Optional[datetime] = Field(default=None, alias="createdAt")
- updated_at: Optional[datetime] = Field(default=None, alias="updatedAt")
- __properties: ClassVar[List[str]] = ["id", "name", "title", "description", "planIds", "state", "prices", "creditAmount", "metadata", "createdAt", "updatedAt"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
-
+ prices: Optional[conlist(V1beta1Price)] = None
+ credit_amount: Optional[StrictStr] = Field(None, alias="creditAmount")
+ metadata: Optional[Dict[str, Any]] = None
+ created_at: Optional[datetime] = Field(None, alias="createdAt")
+ updated_at: Optional[datetime] = Field(None, alias="updatedAt")
+ __properties = ["id", "name", "title", "description", "planIds", "state", "prices", "creditAmount", "metadata", "createdAt", "updatedAt"]
+
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1Feature:
"""Create an instance of V1beta1Feature 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in prices (list)
_items = []
if self.prices:
@@ -91,26 +74,26 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1Feature:
"""Create an instance of V1beta1Feature from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1Feature.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1Feature.parse_obj({
"id": obj.get("id"),
"name": obj.get("name"),
"title": obj.get("title"),
"description": obj.get("description"),
- "planIds": obj.get("planIds"),
+ "plan_ids": obj.get("planIds"),
"state": obj.get("state"),
"prices": [V1beta1Price.from_dict(_item) for _item in obj.get("prices")] if obj.get("prices") is not None else None,
- "creditAmount": obj.get("creditAmount"),
+ "credit_amount": obj.get("creditAmount"),
"metadata": obj.get("metadata"),
- "createdAt": obj.get("createdAt"),
- "updatedAt": obj.get("updatedAt")
+ "created_at": obj.get("createdAt"),
+ "updated_at": obj.get("updatedAt")
})
return _obj
diff --git a/frontier_api/models/v1beta1_feature_request_body.py b/frontier_api/models/v1beta1_feature_request_body.py
index 88df85f..ec8acce 100644
--- a/frontier_api/models/v1beta1_feature_request_body.py
+++ b/frontier_api/models/v1beta1_feature_request_body.py
@@ -19,64 +19,47 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
+from typing import Any, Dict, List, Optional
+from pydantic import BaseModel, Field, StrictStr, conlist
from frontier_api.models.v1beta1_price import V1beta1Price
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1FeatureRequestBody(BaseModel):
"""
V1beta1FeatureRequestBody
- """ # noqa: E501
+ """
name: Optional[StrictStr] = None
title: Optional[StrictStr] = None
description: Optional[StrictStr] = None
- plan_id: Optional[StrictStr] = Field(default=None, alias="planId")
- prices: Optional[List[V1beta1Price]] = None
- credit_amount: Optional[StrictStr] = Field(default=None, alias="creditAmount")
- metadata: Optional[Union[str, Any]] = None
- __properties: ClassVar[List[str]] = ["name", "title", "description", "planId", "prices", "creditAmount", "metadata"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ plan_id: Optional[StrictStr] = Field(None, alias="planId")
+ prices: Optional[conlist(V1beta1Price)] = None
+ credit_amount: Optional[StrictStr] = Field(None, alias="creditAmount")
+ metadata: Optional[Dict[str, Any]] = None
+ __properties = ["name", "title", "description", "planId", "prices", "creditAmount", "metadata"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1FeatureRequestBody:
"""Create an instance of V1beta1FeatureRequestBody 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in prices (list)
_items = []
if self.prices:
@@ -87,21 +70,21 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1FeatureRequestBody:
"""Create an instance of V1beta1FeatureRequestBody from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1FeatureRequestBody.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1FeatureRequestBody.parse_obj({
"name": obj.get("name"),
"title": obj.get("title"),
"description": obj.get("description"),
- "planId": obj.get("planId"),
+ "plan_id": obj.get("planId"),
"prices": [V1beta1Price.from_dict(_item) for _item in obj.get("prices")] if obj.get("prices") is not None else None,
- "creditAmount": obj.get("creditAmount"),
+ "credit_amount": obj.get("creditAmount"),
"metadata": obj.get("metadata")
})
return _obj
diff --git a/frontier_api/models/v1beta1_get_billing_account_response.py b/frontier_api/models/v1beta1_get_billing_account_response.py
index 34d4fd0..bf350d5 100644
--- a/frontier_api/models/v1beta1_get_billing_account_response.py
+++ b/frontier_api/models/v1beta1_get_billing_account_response.py
@@ -19,74 +19,57 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
-from pydantic import Field
+from typing import Optional
+from pydantic import BaseModel, Field
from frontier_api.models.v1beta1_billing_account import V1beta1BillingAccount
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1GetBillingAccountResponse(BaseModel):
"""
V1beta1GetBillingAccountResponse
- """ # noqa: E501
- billing_account: Optional[V1beta1BillingAccount] = Field(default=None, alias="billingAccount")
- __properties: ClassVar[List[str]] = ["billingAccount"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ billing_account: Optional[V1beta1BillingAccount] = Field(None, alias="billingAccount")
+ __properties = ["billingAccount"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1GetBillingAccountResponse:
"""Create an instance of V1beta1GetBillingAccountResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of billing_account
if self.billing_account:
_dict['billingAccount'] = self.billing_account.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1GetBillingAccountResponse:
"""Create an instance of V1beta1GetBillingAccountResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1GetBillingAccountResponse.parse_obj(obj)
- _obj = cls.model_validate({
- "billingAccount": V1beta1BillingAccount.from_dict(obj.get("billingAccount")) if obj.get("billingAccount") is not None else None
+ _obj = V1beta1GetBillingAccountResponse.parse_obj({
+ "billing_account": V1beta1BillingAccount.from_dict(obj.get("billingAccount")) if obj.get("billingAccount") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_get_billing_balance_response.py b/frontier_api/models/v1beta1_get_billing_balance_response.py
index 44bf448..7ea4023 100644
--- a/frontier_api/models/v1beta1_get_billing_balance_response.py
+++ b/frontier_api/models/v1beta1_get_billing_balance_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.billing_account_balance import BillingAccountBalance
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1GetBillingBalanceResponse(BaseModel):
"""
V1beta1GetBillingBalanceResponse
- """ # noqa: E501
+ """
balance: Optional[BillingAccountBalance] = None
- __properties: ClassVar[List[str]] = ["balance"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["balance"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1GetBillingBalanceResponse:
"""Create an instance of V1beta1GetBillingBalanceResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of balance
if self.balance:
_dict['balance'] = self.balance.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1GetBillingBalanceResponse:
"""Create an instance of V1beta1GetBillingBalanceResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1GetBillingBalanceResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1GetBillingBalanceResponse.parse_obj({
"balance": BillingAccountBalance.from_dict(obj.get("balance")) if obj.get("balance") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_get_current_user_response.py b/frontier_api/models/v1beta1_get_current_user_response.py
index f8da6a9..0c599ca 100644
--- a/frontier_api/models/v1beta1_get_current_user_response.py
+++ b/frontier_api/models/v1beta1_get_current_user_response.py
@@ -19,59 +19,43 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_service_user import V1beta1ServiceUser
from frontier_api.models.v1beta1_user import V1beta1User
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1GetCurrentUserResponse(BaseModel):
"""
V1beta1GetCurrentUserResponse
- """ # noqa: E501
+ """
user: Optional[V1beta1User] = None
serviceuser: Optional[V1beta1ServiceUser] = None
- __properties: ClassVar[List[str]] = ["user", "serviceuser"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["user", "serviceuser"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1GetCurrentUserResponse:
"""Create an instance of V1beta1GetCurrentUserResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of user
if self.user:
_dict['user'] = self.user.to_dict()
@@ -81,15 +65,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1GetCurrentUserResponse:
"""Create an instance of V1beta1GetCurrentUserResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1GetCurrentUserResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1GetCurrentUserResponse.parse_obj({
"user": V1beta1User.from_dict(obj.get("user")) if obj.get("user") is not None else None,
"serviceuser": V1beta1ServiceUser.from_dict(obj.get("serviceuser")) if obj.get("serviceuser") is not None else None
})
diff --git a/frontier_api/models/v1beta1_get_feature_response.py b/frontier_api/models/v1beta1_get_feature_response.py
index e164b5a..1b7a996 100644
--- a/frontier_api/models/v1beta1_get_feature_response.py
+++ b/frontier_api/models/v1beta1_get_feature_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_feature import V1beta1Feature
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1GetFeatureResponse(BaseModel):
"""
V1beta1GetFeatureResponse
- """ # noqa: E501
+ """
feature: Optional[V1beta1Feature] = None
- __properties: ClassVar[List[str]] = ["feature"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["feature"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1GetFeatureResponse:
"""Create an instance of V1beta1GetFeatureResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of feature
if self.feature:
_dict['feature'] = self.feature.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1GetFeatureResponse:
"""Create an instance of V1beta1GetFeatureResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1GetFeatureResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1GetFeatureResponse.parse_obj({
"feature": V1beta1Feature.from_dict(obj.get("feature")) if obj.get("feature") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_get_group_response.py b/frontier_api/models/v1beta1_get_group_response.py
index fb7285b..05f3361 100644
--- a/frontier_api/models/v1beta1_get_group_response.py
+++ b/frontier_api/models/v1beta1_get_group_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_group import V1beta1Group
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1GetGroupResponse(BaseModel):
"""
V1beta1GetGroupResponse
- """ # noqa: E501
+ """
group: Optional[V1beta1Group] = None
- __properties: ClassVar[List[str]] = ["group"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["group"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1GetGroupResponse:
"""Create an instance of V1beta1GetGroupResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of group
if self.group:
_dict['group'] = self.group.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1GetGroupResponse:
"""Create an instance of V1beta1GetGroupResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1GetGroupResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1GetGroupResponse.parse_obj({
"group": V1beta1Group.from_dict(obj.get("group")) if obj.get("group") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_get_jwks_response.py b/frontier_api/models/v1beta1_get_jwks_response.py
index 06e6ec7..2d648ba 100644
--- a/frontier_api/models/v1beta1_get_jwks_response.py
+++ b/frontier_api/models/v1beta1_get_jwks_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_json_web_key import V1beta1JSONWebKey
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1GetJWKsResponse(BaseModel):
"""
V1beta1GetJWKsResponse
- """ # noqa: E501
- keys: Optional[List[V1beta1JSONWebKey]] = None
- __properties: ClassVar[List[str]] = ["keys"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ keys: Optional[conlist(V1beta1JSONWebKey)] = None
+ __properties = ["keys"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1GetJWKsResponse:
"""Create an instance of V1beta1GetJWKsResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in keys (list)
_items = []
if self.keys:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1GetJWKsResponse:
"""Create an instance of V1beta1GetJWKsResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1GetJWKsResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1GetJWKsResponse.parse_obj({
"keys": [V1beta1JSONWebKey.from_dict(_item) for _item in obj.get("keys")] if obj.get("keys") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_get_meta_schema_response.py b/frontier_api/models/v1beta1_get_meta_schema_response.py
index 010d930..3a03af2 100644
--- a/frontier_api/models/v1beta1_get_meta_schema_response.py
+++ b/frontier_api/models/v1beta1_get_meta_schema_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_meta_schema import V1beta1MetaSchema
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1GetMetaSchemaResponse(BaseModel):
"""
V1beta1GetMetaSchemaResponse
- """ # noqa: E501
+ """
metaschema: Optional[V1beta1MetaSchema] = None
- __properties: ClassVar[List[str]] = ["metaschema"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["metaschema"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1GetMetaSchemaResponse:
"""Create an instance of V1beta1GetMetaSchemaResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of metaschema
if self.metaschema:
_dict['metaschema'] = self.metaschema.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1GetMetaSchemaResponse:
"""Create an instance of V1beta1GetMetaSchemaResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1GetMetaSchemaResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1GetMetaSchemaResponse.parse_obj({
"metaschema": V1beta1MetaSchema.from_dict(obj.get("metaschema")) if obj.get("metaschema") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_get_namespace_response.py b/frontier_api/models/v1beta1_get_namespace_response.py
index e60eb52..77231ab 100644
--- a/frontier_api/models/v1beta1_get_namespace_response.py
+++ b/frontier_api/models/v1beta1_get_namespace_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_namespace import V1beta1Namespace
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1GetNamespaceResponse(BaseModel):
"""
V1beta1GetNamespaceResponse
- """ # noqa: E501
+ """
namespace: Optional[V1beta1Namespace] = None
- __properties: ClassVar[List[str]] = ["namespace"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["namespace"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1GetNamespaceResponse:
"""Create an instance of V1beta1GetNamespaceResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of namespace
if self.namespace:
_dict['namespace'] = self.namespace.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1GetNamespaceResponse:
"""Create an instance of V1beta1GetNamespaceResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1GetNamespaceResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1GetNamespaceResponse.parse_obj({
"namespace": V1beta1Namespace.from_dict(obj.get("namespace")) if obj.get("namespace") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_get_organization_audit_log_response.py b/frontier_api/models/v1beta1_get_organization_audit_log_response.py
index 4f25c52..81813fd 100644
--- a/frontier_api/models/v1beta1_get_organization_audit_log_response.py
+++ b/frontier_api/models/v1beta1_get_organization_audit_log_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_audit_log import V1beta1AuditLog
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1GetOrganizationAuditLogResponse(BaseModel):
"""
V1beta1GetOrganizationAuditLogResponse
- """ # noqa: E501
+ """
log: Optional[V1beta1AuditLog] = None
- __properties: ClassVar[List[str]] = ["log"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["log"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1GetOrganizationAuditLogResponse:
"""Create an instance of V1beta1GetOrganizationAuditLogResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of log
if self.log:
_dict['log'] = self.log.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1GetOrganizationAuditLogResponse:
"""Create an instance of V1beta1GetOrganizationAuditLogResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1GetOrganizationAuditLogResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1GetOrganizationAuditLogResponse.parse_obj({
"log": V1beta1AuditLog.from_dict(obj.get("log")) if obj.get("log") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_get_organization_domain_response.py b/frontier_api/models/v1beta1_get_organization_domain_response.py
index 22e6ea5..0a40735 100644
--- a/frontier_api/models/v1beta1_get_organization_domain_response.py
+++ b/frontier_api/models/v1beta1_get_organization_domain_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_domain import V1beta1Domain
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1GetOrganizationDomainResponse(BaseModel):
"""
V1beta1GetOrganizationDomainResponse
- """ # noqa: E501
+ """
domain: Optional[V1beta1Domain] = None
- __properties: ClassVar[List[str]] = ["domain"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["domain"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1GetOrganizationDomainResponse:
"""Create an instance of V1beta1GetOrganizationDomainResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of domain
if self.domain:
_dict['domain'] = self.domain.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1GetOrganizationDomainResponse:
"""Create an instance of V1beta1GetOrganizationDomainResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1GetOrganizationDomainResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1GetOrganizationDomainResponse.parse_obj({
"domain": V1beta1Domain.from_dict(obj.get("domain")) if obj.get("domain") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_get_organization_invitation_response.py b/frontier_api/models/v1beta1_get_organization_invitation_response.py
index fde4203..565b965 100644
--- a/frontier_api/models/v1beta1_get_organization_invitation_response.py
+++ b/frontier_api/models/v1beta1_get_organization_invitation_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_invitation import V1beta1Invitation
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1GetOrganizationInvitationResponse(BaseModel):
"""
V1beta1GetOrganizationInvitationResponse
- """ # noqa: E501
+ """
invitation: Optional[V1beta1Invitation] = None
- __properties: ClassVar[List[str]] = ["invitation"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["invitation"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1GetOrganizationInvitationResponse:
"""Create an instance of V1beta1GetOrganizationInvitationResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of invitation
if self.invitation:
_dict['invitation'] = self.invitation.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1GetOrganizationInvitationResponse:
"""Create an instance of V1beta1GetOrganizationInvitationResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1GetOrganizationInvitationResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1GetOrganizationInvitationResponse.parse_obj({
"invitation": V1beta1Invitation.from_dict(obj.get("invitation")) if obj.get("invitation") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_get_organization_response.py b/frontier_api/models/v1beta1_get_organization_response.py
index fd4e2d5..ef1b94a 100644
--- a/frontier_api/models/v1beta1_get_organization_response.py
+++ b/frontier_api/models/v1beta1_get_organization_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_organization import V1beta1Organization
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1GetOrganizationResponse(BaseModel):
"""
V1beta1GetOrganizationResponse
- """ # noqa: E501
+ """
organization: Optional[V1beta1Organization] = None
- __properties: ClassVar[List[str]] = ["organization"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["organization"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1GetOrganizationResponse:
"""Create an instance of V1beta1GetOrganizationResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of organization
if self.organization:
_dict['organization'] = self.organization.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1GetOrganizationResponse:
"""Create an instance of V1beta1GetOrganizationResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1GetOrganizationResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1GetOrganizationResponse.parse_obj({
"organization": V1beta1Organization.from_dict(obj.get("organization")) if obj.get("organization") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_get_organization_role_response.py b/frontier_api/models/v1beta1_get_organization_role_response.py
index 2530a9e..3952307 100644
--- a/frontier_api/models/v1beta1_get_organization_role_response.py
+++ b/frontier_api/models/v1beta1_get_organization_role_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_role import V1beta1Role
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1GetOrganizationRoleResponse(BaseModel):
"""
V1beta1GetOrganizationRoleResponse
- """ # noqa: E501
+ """
role: Optional[V1beta1Role] = None
- __properties: ClassVar[List[str]] = ["role"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["role"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1GetOrganizationRoleResponse:
"""Create an instance of V1beta1GetOrganizationRoleResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of role
if self.role:
_dict['role'] = self.role.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1GetOrganizationRoleResponse:
"""Create an instance of V1beta1GetOrganizationRoleResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1GetOrganizationRoleResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1GetOrganizationRoleResponse.parse_obj({
"role": V1beta1Role.from_dict(obj.get("role")) if obj.get("role") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_get_permission_response.py b/frontier_api/models/v1beta1_get_permission_response.py
index c168b46..8f45206 100644
--- a/frontier_api/models/v1beta1_get_permission_response.py
+++ b/frontier_api/models/v1beta1_get_permission_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_permission import V1beta1Permission
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1GetPermissionResponse(BaseModel):
"""
V1beta1GetPermissionResponse
- """ # noqa: E501
+ """
permission: Optional[V1beta1Permission] = None
- __properties: ClassVar[List[str]] = ["permission"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["permission"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1GetPermissionResponse:
"""Create an instance of V1beta1GetPermissionResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of permission
if self.permission:
_dict['permission'] = self.permission.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1GetPermissionResponse:
"""Create an instance of V1beta1GetPermissionResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1GetPermissionResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1GetPermissionResponse.parse_obj({
"permission": V1beta1Permission.from_dict(obj.get("permission")) if obj.get("permission") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_get_plan_response.py b/frontier_api/models/v1beta1_get_plan_response.py
index a644e74..b7d63b5 100644
--- a/frontier_api/models/v1beta1_get_plan_response.py
+++ b/frontier_api/models/v1beta1_get_plan_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_plan import V1beta1Plan
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1GetPlanResponse(BaseModel):
"""
V1beta1GetPlanResponse
- """ # noqa: E501
+ """
plan: Optional[V1beta1Plan] = None
- __properties: ClassVar[List[str]] = ["plan"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["plan"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1GetPlanResponse:
"""Create an instance of V1beta1GetPlanResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of plan
if self.plan:
_dict['plan'] = self.plan.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1GetPlanResponse:
"""Create an instance of V1beta1GetPlanResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1GetPlanResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1GetPlanResponse.parse_obj({
"plan": V1beta1Plan.from_dict(obj.get("plan")) if obj.get("plan") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_get_policy_response.py b/frontier_api/models/v1beta1_get_policy_response.py
index c993e0b..4c565fb 100644
--- a/frontier_api/models/v1beta1_get_policy_response.py
+++ b/frontier_api/models/v1beta1_get_policy_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_policy import V1beta1Policy
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1GetPolicyResponse(BaseModel):
"""
V1beta1GetPolicyResponse
- """ # noqa: E501
+ """
policy: Optional[V1beta1Policy] = None
- __properties: ClassVar[List[str]] = ["policy"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["policy"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1GetPolicyResponse:
"""Create an instance of V1beta1GetPolicyResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of policy
if self.policy:
_dict['policy'] = self.policy.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1GetPolicyResponse:
"""Create an instance of V1beta1GetPolicyResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1GetPolicyResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1GetPolicyResponse.parse_obj({
"policy": V1beta1Policy.from_dict(obj.get("policy")) if obj.get("policy") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_get_project_resource_response.py b/frontier_api/models/v1beta1_get_project_resource_response.py
index ebb91ff..d82fab8 100644
--- a/frontier_api/models/v1beta1_get_project_resource_response.py
+++ b/frontier_api/models/v1beta1_get_project_resource_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_resource import V1beta1Resource
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1GetProjectResourceResponse(BaseModel):
"""
V1beta1GetProjectResourceResponse
- """ # noqa: E501
+ """
resource: Optional[V1beta1Resource] = None
- __properties: ClassVar[List[str]] = ["resource"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["resource"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1GetProjectResourceResponse:
"""Create an instance of V1beta1GetProjectResourceResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of resource
if self.resource:
_dict['resource'] = self.resource.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1GetProjectResourceResponse:
"""Create an instance of V1beta1GetProjectResourceResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1GetProjectResourceResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1GetProjectResourceResponse.parse_obj({
"resource": V1beta1Resource.from_dict(obj.get("resource")) if obj.get("resource") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_get_project_response.py b/frontier_api/models/v1beta1_get_project_response.py
index 6cf7987..35407f0 100644
--- a/frontier_api/models/v1beta1_get_project_response.py
+++ b/frontier_api/models/v1beta1_get_project_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_project import V1beta1Project
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1GetProjectResponse(BaseModel):
"""
V1beta1GetProjectResponse
- """ # noqa: E501
+ """
project: Optional[V1beta1Project] = None
- __properties: ClassVar[List[str]] = ["project"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["project"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1GetProjectResponse:
"""Create an instance of V1beta1GetProjectResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of project
if self.project:
_dict['project'] = self.project.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1GetProjectResponse:
"""Create an instance of V1beta1GetProjectResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1GetProjectResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1GetProjectResponse.parse_obj({
"project": V1beta1Project.from_dict(obj.get("project")) if obj.get("project") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_get_relation_response.py b/frontier_api/models/v1beta1_get_relation_response.py
index 38972e3..82e59db 100644
--- a/frontier_api/models/v1beta1_get_relation_response.py
+++ b/frontier_api/models/v1beta1_get_relation_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_relation import V1beta1Relation
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1GetRelationResponse(BaseModel):
"""
V1beta1GetRelationResponse
- """ # noqa: E501
+ """
relation: Optional[V1beta1Relation] = None
- __properties: ClassVar[List[str]] = ["relation"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["relation"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1GetRelationResponse:
"""Create an instance of V1beta1GetRelationResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of relation
if self.relation:
_dict['relation'] = self.relation.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1GetRelationResponse:
"""Create an instance of V1beta1GetRelationResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1GetRelationResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1GetRelationResponse.parse_obj({
"relation": V1beta1Relation.from_dict(obj.get("relation")) if obj.get("relation") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_get_service_user_key_response.py b/frontier_api/models/v1beta1_get_service_user_key_response.py
index 6ccef38..339a278 100644
--- a/frontier_api/models/v1beta1_get_service_user_key_response.py
+++ b/frontier_api/models/v1beta1_get_service_user_key_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_json_web_key import V1beta1JSONWebKey
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1GetServiceUserKeyResponse(BaseModel):
"""
V1beta1GetServiceUserKeyResponse
- """ # noqa: E501
- keys: Optional[List[V1beta1JSONWebKey]] = None
- __properties: ClassVar[List[str]] = ["keys"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ keys: Optional[conlist(V1beta1JSONWebKey)] = None
+ __properties = ["keys"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1GetServiceUserKeyResponse:
"""Create an instance of V1beta1GetServiceUserKeyResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in keys (list)
_items = []
if self.keys:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1GetServiceUserKeyResponse:
"""Create an instance of V1beta1GetServiceUserKeyResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1GetServiceUserKeyResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1GetServiceUserKeyResponse.parse_obj({
"keys": [V1beta1JSONWebKey.from_dict(_item) for _item in obj.get("keys")] if obj.get("keys") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_get_service_user_response.py b/frontier_api/models/v1beta1_get_service_user_response.py
index 3665a7f..e09a8fb 100644
--- a/frontier_api/models/v1beta1_get_service_user_response.py
+++ b/frontier_api/models/v1beta1_get_service_user_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_service_user import V1beta1ServiceUser
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1GetServiceUserResponse(BaseModel):
"""
V1beta1GetServiceUserResponse
- """ # noqa: E501
+ """
serviceuser: Optional[V1beta1ServiceUser] = None
- __properties: ClassVar[List[str]] = ["serviceuser"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["serviceuser"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1GetServiceUserResponse:
"""Create an instance of V1beta1GetServiceUserResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of serviceuser
if self.serviceuser:
_dict['serviceuser'] = self.serviceuser.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1GetServiceUserResponse:
"""Create an instance of V1beta1GetServiceUserResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1GetServiceUserResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1GetServiceUserResponse.parse_obj({
"serviceuser": V1beta1ServiceUser.from_dict(obj.get("serviceuser")) if obj.get("serviceuser") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_get_subscription_response.py b/frontier_api/models/v1beta1_get_subscription_response.py
index 083b37c..387c2f3 100644
--- a/frontier_api/models/v1beta1_get_subscription_response.py
+++ b/frontier_api/models/v1beta1_get_subscription_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_subscription import V1beta1Subscription
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1GetSubscriptionResponse(BaseModel):
"""
V1beta1GetSubscriptionResponse
- """ # noqa: E501
+ """
subscription: Optional[V1beta1Subscription] = None
- __properties: ClassVar[List[str]] = ["subscription"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["subscription"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1GetSubscriptionResponse:
"""Create an instance of V1beta1GetSubscriptionResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of subscription
if self.subscription:
_dict['subscription'] = self.subscription.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1GetSubscriptionResponse:
"""Create an instance of V1beta1GetSubscriptionResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1GetSubscriptionResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1GetSubscriptionResponse.parse_obj({
"subscription": V1beta1Subscription.from_dict(obj.get("subscription")) if obj.get("subscription") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_get_user_response.py b/frontier_api/models/v1beta1_get_user_response.py
index e675f79..af0dfdc 100644
--- a/frontier_api/models/v1beta1_get_user_response.py
+++ b/frontier_api/models/v1beta1_get_user_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_user import V1beta1User
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1GetUserResponse(BaseModel):
"""
V1beta1GetUserResponse
- """ # noqa: E501
+ """
user: Optional[V1beta1User] = None
- __properties: ClassVar[List[str]] = ["user"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["user"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1GetUserResponse:
"""Create an instance of V1beta1GetUserResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of user
if self.user:
_dict['user'] = self.user.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1GetUserResponse:
"""Create an instance of V1beta1GetUserResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1GetUserResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1GetUserResponse.parse_obj({
"user": V1beta1User.from_dict(obj.get("user")) if obj.get("user") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_group.py b/frontier_api/models/v1beta1_group.py
index 0433f49..f8dbc1d 100644
--- a/frontier_api/models/v1beta1_group.py
+++ b/frontier_api/models/v1beta1_group.py
@@ -19,67 +19,51 @@
import json
from datetime import datetime
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
+from typing import Any, Dict, List, Optional
+from pydantic import BaseModel, Field, StrictInt, StrictStr, conlist
from frontier_api.models.v1beta1_user import V1beta1User
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1Group(BaseModel):
"""
V1beta1Group
- """ # noqa: E501
+ """
id: Optional[StrictStr] = None
name: Optional[StrictStr] = None
title: Optional[StrictStr] = None
- org_id: Optional[StrictStr] = Field(default=None, alias="orgId")
- metadata: Optional[Union[str, Any]] = None
- created_at: Optional[datetime] = Field(default=None, description="The time the group was created.", alias="createdAt")
- updated_at: Optional[datetime] = Field(default=None, description="The time the group was last updated.", alias="updatedAt")
- users: Optional[List[V1beta1User]] = None
- __properties: ClassVar[List[str]] = ["id", "name", "title", "orgId", "metadata", "createdAt", "updatedAt", "users"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
-
+ org_id: Optional[StrictStr] = Field(None, alias="orgId")
+ metadata: Optional[Dict[str, Any]] = None
+ created_at: Optional[datetime] = Field(None, alias="createdAt", description="The time the group was created.")
+ updated_at: Optional[datetime] = Field(None, alias="updatedAt", description="The time the group was last updated.")
+ users: Optional[conlist(V1beta1User)] = None
+ members_count: Optional[StrictInt] = Field(None, alias="membersCount", description="The number of members explicitly added in the project.")
+ __properties = ["id", "name", "title", "orgId", "metadata", "createdAt", "updatedAt", "users", "membersCount"]
+
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1Group:
"""Create an instance of V1beta1Group 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.
- * OpenAPI `readOnly` fields are excluded.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- "users",
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ "users",
+ "members_count",
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in users (list)
_items = []
if self.users:
@@ -90,23 +74,24 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1Group:
"""Create an instance of V1beta1Group from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1Group.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1Group.parse_obj({
"id": obj.get("id"),
"name": obj.get("name"),
"title": obj.get("title"),
- "orgId": obj.get("orgId"),
+ "org_id": obj.get("orgId"),
"metadata": obj.get("metadata"),
- "createdAt": obj.get("createdAt"),
- "updatedAt": obj.get("updatedAt"),
- "users": [V1beta1User.from_dict(_item) for _item in obj.get("users")] if obj.get("users") is not None else None
+ "created_at": obj.get("createdAt"),
+ "updated_at": obj.get("updatedAt"),
+ "users": [V1beta1User.from_dict(_item) for _item in obj.get("users")] if obj.get("users") is not None else None,
+ "members_count": obj.get("membersCount")
})
return _obj
diff --git a/frontier_api/models/v1beta1_group_request_body.py b/frontier_api/models/v1beta1_group_request_body.py
index cd2e25c..771d068 100644
--- a/frontier_api/models/v1beta1_group_request_body.py
+++ b/frontier_api/models/v1beta1_group_request_body.py
@@ -19,71 +19,54 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Any, Dict, Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1GroupRequestBody(BaseModel):
"""
V1beta1GroupRequestBody
- """ # noqa: E501
- name: StrictStr = Field(description="The name of the group. The name must be unique within the entire Frontier instance. The name can contain only alphanumeric characters, dashes and underscores.")
- title: Optional[StrictStr] = Field(default=None, description="The title can contain any UTF-8 character, used to provide a human-readable name for the group. Can also be left empty.")
- metadata: Optional[Union[str, Any]] = Field(default=None, description="Metadata object for groups that can hold key value pairs defined in Group Metaschema. The metadata object can be used to store arbitrary information about the group such as labels, descriptions etc. The default Group Metaschema contains labels and descripton fields. Update the Group Metaschema to add more fields.
*Example:*`{\"labels\": {\"key\": \"value\"}, \"description\": \"Group description\"}`")
- __properties: ClassVar[List[str]] = ["name", "title", "metadata"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ name: StrictStr = Field(..., description="The name of the group. The name must be unique within the entire Frontier instance. The name can contain only alphanumeric characters, dashes and underscores.")
+ title: Optional[StrictStr] = Field(None, description="The title can contain any UTF-8 character, used to provide a human-readable name for the group. Can also be left empty.")
+ metadata: Optional[Dict[str, Any]] = Field(None, description="Metadata object for groups that can hold key value pairs defined in Group Metaschema. The metadata object can be used to store arbitrary information about the group such as labels, descriptions etc. The default Group Metaschema contains labels and descripton fields. Update the Group Metaschema to add more fields.
*Example:*`{\"labels\": {\"key\": \"value\"}, \"description\": \"Group description\"}`")
+ __properties = ["name", "title", "metadata"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1GroupRequestBody:
"""Create an instance of V1beta1GroupRequestBody 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1GroupRequestBody:
"""Create an instance of V1beta1GroupRequestBody from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1GroupRequestBody.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1GroupRequestBody.parse_obj({
"name": obj.get("name"),
"title": obj.get("title"),
"metadata": obj.get("metadata")
diff --git a/frontier_api/models/v1beta1_invitation.py b/frontier_api/models/v1beta1_invitation.py
index 5307ff0..39625db 100644
--- a/frontier_api/models/v1beta1_invitation.py
+++ b/frontier_api/models/v1beta1_invitation.py
@@ -19,84 +19,67 @@
import json
from datetime import datetime
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Any, Dict, List, Optional
+from pydantic import BaseModel, Field, StrictStr, conlist
class V1beta1Invitation(BaseModel):
"""
V1beta1Invitation
- """ # noqa: E501
- id: Optional[StrictStr] = Field(default=None, description="The unique invitation identifier.")
- user_id: Optional[StrictStr] = Field(default=None, description="The user email of the invited user.", alias="userId")
- org_id: Optional[StrictStr] = Field(default=None, description="The organization id to which the user is invited.", alias="orgId")
- group_ids: Optional[List[StrictStr]] = Field(default=None, description="The list of group ids to which the user is invited.", alias="groupIds")
- metadata: Optional[Union[str, Any]] = Field(default=None, description="The metadata of the invitation.")
- created_at: Optional[datetime] = Field(default=None, description="The time when the invitation was created.", alias="createdAt")
- expires_at: Optional[datetime] = Field(default=None, description="The time when the invitation expires.", alias="expiresAt")
- role_ids: Optional[List[StrictStr]] = Field(default=None, description="The list of role ids to which the user is invited in an organization.", alias="roleIds")
- __properties: ClassVar[List[str]] = ["id", "userId", "orgId", "groupIds", "metadata", "createdAt", "expiresAt", "roleIds"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
-
+ """
+ id: Optional[StrictStr] = Field(None, description="The unique invitation identifier.")
+ user_id: Optional[StrictStr] = Field(None, alias="userId", description="The user email of the invited user.")
+ org_id: Optional[StrictStr] = Field(None, alias="orgId", description="The organization id to which the user is invited.")
+ group_ids: Optional[conlist(StrictStr)] = Field(None, alias="groupIds", description="The list of group ids to which the user is invited.")
+ metadata: Optional[Dict[str, Any]] = Field(None, description="The metadata of the invitation.")
+ created_at: Optional[datetime] = Field(None, alias="createdAt", description="The time when the invitation was created.")
+ expires_at: Optional[datetime] = Field(None, alias="expiresAt", description="The time when the invitation expires.")
+ role_ids: Optional[conlist(StrictStr)] = Field(None, alias="roleIds", description="The list of role ids to which the user is invited in an organization.")
+ __properties = ["id", "userId", "orgId", "groupIds", "metadata", "createdAt", "expiresAt", "roleIds"]
+
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1Invitation:
"""Create an instance of V1beta1Invitation 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1Invitation:
"""Create an instance of V1beta1Invitation from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1Invitation.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1Invitation.parse_obj({
"id": obj.get("id"),
- "userId": obj.get("userId"),
- "orgId": obj.get("orgId"),
- "groupIds": obj.get("groupIds"),
+ "user_id": obj.get("userId"),
+ "org_id": obj.get("orgId"),
+ "group_ids": obj.get("groupIds"),
"metadata": obj.get("metadata"),
- "createdAt": obj.get("createdAt"),
- "expiresAt": obj.get("expiresAt"),
- "roleIds": obj.get("roleIds")
+ "created_at": obj.get("createdAt"),
+ "expires_at": obj.get("expiresAt"),
+ "role_ids": obj.get("roleIds")
})
return _obj
diff --git a/frontier_api/models/v1beta1_json_web_key.py b/frontier_api/models/v1beta1_json_web_key.py
index 9f93ce5..435d6a0 100644
--- a/frontier_api/models/v1beta1_json_web_key.py
+++ b/frontier_api/models/v1beta1_json_web_key.py
@@ -19,77 +19,60 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1JSONWebKey(BaseModel):
"""
V1beta1JSONWebKey
- """ # noqa: E501
- kty: Optional[StrictStr] = Field(default=None, description="Key Type.")
- alg: Optional[StrictStr] = Field(default=None, description="Algorithm.")
- use: Optional[StrictStr] = Field(default=None, description="Permitted uses for the public keys.")
- kid: Optional[StrictStr] = Field(default=None, description="Key ID.")
- n: Optional[StrictStr] = Field(default=None, description="Used for RSA keys.")
- e: Optional[StrictStr] = Field(default=None, description="Used for RSA keys.")
- x: Optional[StrictStr] = Field(default=None, description="Used for ECDSA keys.")
- y: Optional[StrictStr] = Field(default=None, description="Used for ECDSA keys.")
- crv: Optional[StrictStr] = Field(default=None, description="Used for ECDSA keys.")
- __properties: ClassVar[List[str]] = ["kty", "alg", "use", "kid", "n", "e", "x", "y", "crv"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
-
+ """
+ kty: Optional[StrictStr] = Field(None, description="Key Type.")
+ alg: Optional[StrictStr] = Field(None, description="Algorithm.")
+ use: Optional[StrictStr] = Field(None, description="Permitted uses for the public keys.")
+ kid: Optional[StrictStr] = Field(None, description="Key ID.")
+ n: Optional[StrictStr] = Field(None, description="Used for RSA keys.")
+ e: Optional[StrictStr] = Field(None, description="Used for RSA keys.")
+ x: Optional[StrictStr] = Field(None, description="Used for ECDSA keys.")
+ y: Optional[StrictStr] = Field(None, description="Used for ECDSA keys.")
+ crv: Optional[StrictStr] = Field(None, description="Used for ECDSA keys.")
+ __properties = ["kty", "alg", "use", "kid", "n", "e", "x", "y", "crv"]
+
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1JSONWebKey:
"""Create an instance of V1beta1JSONWebKey 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1JSONWebKey:
"""Create an instance of V1beta1JSONWebKey from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1JSONWebKey.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1JSONWebKey.parse_obj({
"kty": obj.get("kty"),
"alg": obj.get("alg"),
"use": obj.get("use"),
diff --git a/frontier_api/models/v1beta1_key_credential.py b/frontier_api/models/v1beta1_key_credential.py
index ec949e9..0a686f6 100644
--- a/frontier_api/models/v1beta1_key_credential.py
+++ b/frontier_api/models/v1beta1_key_credential.py
@@ -19,78 +19,60 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1KeyCredential(BaseModel):
"""
V1beta1KeyCredential
- """ # noqa: E501
+ """
type: Optional[StrictStr] = None
kid: Optional[StrictStr] = None
- principal_id: Optional[StrictStr] = Field(default=None, alias="principalId")
- private_key: Optional[StrictStr] = Field(default=None, alias="privateKey")
- __properties: ClassVar[List[str]] = ["type", "kid", "principalId", "privateKey"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ principal_id: Optional[StrictStr] = Field(None, alias="principalId")
+ private_key: Optional[StrictStr] = Field(None, alias="privateKey")
+ __properties = ["type", "kid", "principalId", "privateKey"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1KeyCredential:
"""Create an instance of V1beta1KeyCredential 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.
- * OpenAPI `readOnly` fields are excluded.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- "private_key",
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ "private_key",
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1KeyCredential:
"""Create an instance of V1beta1KeyCredential from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1KeyCredential.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1KeyCredential.parse_obj({
"type": obj.get("type"),
"kid": obj.get("kid"),
- "principalId": obj.get("principalId"),
- "privateKey": obj.get("privateKey")
+ "principal_id": obj.get("principalId"),
+ "private_key": obj.get("privateKey")
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_all_organizations_response.py b/frontier_api/models/v1beta1_list_all_organizations_response.py
index f40a21f..cf42a59 100644
--- a/frontier_api/models/v1beta1_list_all_organizations_response.py
+++ b/frontier_api/models/v1beta1_list_all_organizations_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_organization import V1beta1Organization
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListAllOrganizationsResponse(BaseModel):
"""
V1beta1ListAllOrganizationsResponse
- """ # noqa: E501
- organizations: Optional[List[V1beta1Organization]] = None
- __properties: ClassVar[List[str]] = ["organizations"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ organizations: Optional[conlist(V1beta1Organization)] = None
+ __properties = ["organizations"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListAllOrganizationsResponse:
"""Create an instance of V1beta1ListAllOrganizationsResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in organizations (list)
_items = []
if self.organizations:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListAllOrganizationsResponse:
"""Create an instance of V1beta1ListAllOrganizationsResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListAllOrganizationsResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListAllOrganizationsResponse.parse_obj({
"organizations": [V1beta1Organization.from_dict(_item) for _item in obj.get("organizations")] if obj.get("organizations") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_all_users_response.py b/frontier_api/models/v1beta1_list_all_users_response.py
index e588141..f10c733 100644
--- a/frontier_api/models/v1beta1_list_all_users_response.py
+++ b/frontier_api/models/v1beta1_list_all_users_response.py
@@ -19,58 +19,42 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictInt
+from typing import List, Optional
+from pydantic import BaseModel, StrictInt, conlist
from frontier_api.models.v1beta1_user import V1beta1User
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListAllUsersResponse(BaseModel):
"""
V1beta1ListAllUsersResponse
- """ # noqa: E501
+ """
count: Optional[StrictInt] = None
- users: Optional[List[V1beta1User]] = None
- __properties: ClassVar[List[str]] = ["count", "users"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ users: Optional[conlist(V1beta1User)] = None
+ __properties = ["count", "users"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListAllUsersResponse:
"""Create an instance of V1beta1ListAllUsersResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in users (list)
_items = []
if self.users:
@@ -81,15 +65,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListAllUsersResponse:
"""Create an instance of V1beta1ListAllUsersResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListAllUsersResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListAllUsersResponse.parse_obj({
"count": obj.get("count"),
"users": [V1beta1User.from_dict(_item) for _item in obj.get("users")] if obj.get("users") is not None else None
})
diff --git a/frontier_api/models/v1beta1_list_auth_strategies_response.py b/frontier_api/models/v1beta1_list_auth_strategies_response.py
index d0ea3b4..fc3b95b 100644
--- a/frontier_api/models/v1beta1_list_auth_strategies_response.py
+++ b/frontier_api/models/v1beta1_list_auth_strategies_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_auth_strategy import V1beta1AuthStrategy
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListAuthStrategiesResponse(BaseModel):
"""
V1beta1ListAuthStrategiesResponse
- """ # noqa: E501
- strategies: Optional[List[V1beta1AuthStrategy]] = None
- __properties: ClassVar[List[str]] = ["strategies"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ strategies: Optional[conlist(V1beta1AuthStrategy)] = None
+ __properties = ["strategies"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListAuthStrategiesResponse:
"""Create an instance of V1beta1ListAuthStrategiesResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in strategies (list)
_items = []
if self.strategies:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListAuthStrategiesResponse:
"""Create an instance of V1beta1ListAuthStrategiesResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListAuthStrategiesResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListAuthStrategiesResponse.parse_obj({
"strategies": [V1beta1AuthStrategy.from_dict(_item) for _item in obj.get("strategies")] if obj.get("strategies") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_billing_accounts_response.py b/frontier_api/models/v1beta1_list_billing_accounts_response.py
index 5af2c91..9b9d345 100644
--- a/frontier_api/models/v1beta1_list_billing_accounts_response.py
+++ b/frontier_api/models/v1beta1_list_billing_accounts_response.py
@@ -19,58 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
-from pydantic import Field
+from typing import List, Optional
+from pydantic import BaseModel, Field, conlist
from frontier_api.models.v1beta1_billing_account import V1beta1BillingAccount
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListBillingAccountsResponse(BaseModel):
"""
V1beta1ListBillingAccountsResponse
- """ # noqa: E501
- billing_accounts: Optional[List[V1beta1BillingAccount]] = Field(default=None, alias="billingAccounts")
- __properties: ClassVar[List[str]] = ["billingAccounts"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ billing_accounts: Optional[conlist(V1beta1BillingAccount)] = Field(None, alias="billingAccounts")
+ __properties = ["billingAccounts"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListBillingAccountsResponse:
"""Create an instance of V1beta1ListBillingAccountsResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in billing_accounts (list)
_items = []
if self.billing_accounts:
@@ -81,16 +64,16 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListBillingAccountsResponse:
"""Create an instance of V1beta1ListBillingAccountsResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListBillingAccountsResponse.parse_obj(obj)
- _obj = cls.model_validate({
- "billingAccounts": [V1beta1BillingAccount.from_dict(_item) for _item in obj.get("billingAccounts")] if obj.get("billingAccounts") is not None else None
+ _obj = V1beta1ListBillingAccountsResponse.parse_obj({
+ "billing_accounts": [V1beta1BillingAccount.from_dict(_item) for _item in obj.get("billingAccounts")] if obj.get("billingAccounts") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_billing_transactions_response.py b/frontier_api/models/v1beta1_list_billing_transactions_response.py
index 8605d48..d817a32 100644
--- a/frontier_api/models/v1beta1_list_billing_transactions_response.py
+++ b/frontier_api/models/v1beta1_list_billing_transactions_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_billing_transaction import V1beta1BillingTransaction
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListBillingTransactionsResponse(BaseModel):
"""
V1beta1ListBillingTransactionsResponse
- """ # noqa: E501
- transactions: Optional[List[V1beta1BillingTransaction]] = None
- __properties: ClassVar[List[str]] = ["transactions"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ transactions: Optional[conlist(V1beta1BillingTransaction)] = None
+ __properties = ["transactions"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListBillingTransactionsResponse:
"""Create an instance of V1beta1ListBillingTransactionsResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in transactions (list)
_items = []
if self.transactions:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListBillingTransactionsResponse:
"""Create an instance of V1beta1ListBillingTransactionsResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListBillingTransactionsResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListBillingTransactionsResponse.parse_obj({
"transactions": [V1beta1BillingTransaction.from_dict(_item) for _item in obj.get("transactions")] if obj.get("transactions") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_checkouts_response.py b/frontier_api/models/v1beta1_list_checkouts_response.py
index 19fc73f..63fda0e 100644
--- a/frontier_api/models/v1beta1_list_checkouts_response.py
+++ b/frontier_api/models/v1beta1_list_checkouts_response.py
@@ -19,58 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
-from pydantic import Field
+from typing import List, Optional
+from pydantic import BaseModel, Field, conlist
from frontier_api.models.v1beta1_checkout_session import V1beta1CheckoutSession
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListCheckoutsResponse(BaseModel):
"""
V1beta1ListCheckoutsResponse
- """ # noqa: E501
- checkout_sessions: Optional[List[V1beta1CheckoutSession]] = Field(default=None, alias="checkoutSessions")
- __properties: ClassVar[List[str]] = ["checkoutSessions"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ checkout_sessions: Optional[conlist(V1beta1CheckoutSession)] = Field(None, alias="checkoutSessions")
+ __properties = ["checkoutSessions"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListCheckoutsResponse:
"""Create an instance of V1beta1ListCheckoutsResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in checkout_sessions (list)
_items = []
if self.checkout_sessions:
@@ -81,16 +64,16 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListCheckoutsResponse:
"""Create an instance of V1beta1ListCheckoutsResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListCheckoutsResponse.parse_obj(obj)
- _obj = cls.model_validate({
- "checkoutSessions": [V1beta1CheckoutSession.from_dict(_item) for _item in obj.get("checkoutSessions")] if obj.get("checkoutSessions") is not None else None
+ _obj = V1beta1ListCheckoutsResponse.parse_obj({
+ "checkout_sessions": [V1beta1CheckoutSession.from_dict(_item) for _item in obj.get("checkoutSessions")] if obj.get("checkoutSessions") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_current_user_groups_response.py b/frontier_api/models/v1beta1_list_current_user_groups_response.py
index 784fb74..16cfa88 100644
--- a/frontier_api/models/v1beta1_list_current_user_groups_response.py
+++ b/frontier_api/models/v1beta1_list_current_user_groups_response.py
@@ -19,60 +19,43 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
-from pydantic import Field
+from typing import List, Optional
+from pydantic import BaseModel, Field, conlist
from frontier_api.models.v1beta1_group import V1beta1Group
from frontier_api.models.v1beta1_list_current_user_groups_response_access_pair import V1beta1ListCurrentUserGroupsResponseAccessPair
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListCurrentUserGroupsResponse(BaseModel):
"""
V1beta1ListCurrentUserGroupsResponse
- """ # noqa: E501
- groups: Optional[List[V1beta1Group]] = None
- access_pairs: Optional[List[V1beta1ListCurrentUserGroupsResponseAccessPair]] = Field(default=None, alias="accessPairs")
- __properties: ClassVar[List[str]] = ["groups", "accessPairs"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ groups: Optional[conlist(V1beta1Group)] = None
+ access_pairs: Optional[conlist(V1beta1ListCurrentUserGroupsResponseAccessPair)] = Field(None, alias="accessPairs")
+ __properties = ["groups", "accessPairs"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListCurrentUserGroupsResponse:
"""Create an instance of V1beta1ListCurrentUserGroupsResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in groups (list)
_items = []
if self.groups:
@@ -90,17 +73,17 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListCurrentUserGroupsResponse:
"""Create an instance of V1beta1ListCurrentUserGroupsResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListCurrentUserGroupsResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListCurrentUserGroupsResponse.parse_obj({
"groups": [V1beta1Group.from_dict(_item) for _item in obj.get("groups")] if obj.get("groups") is not None else None,
- "accessPairs": [V1beta1ListCurrentUserGroupsResponseAccessPair.from_dict(_item) for _item in obj.get("accessPairs")] if obj.get("accessPairs") is not None else None
+ "access_pairs": [V1beta1ListCurrentUserGroupsResponseAccessPair.from_dict(_item) for _item in obj.get("accessPairs")] if obj.get("accessPairs") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_current_user_groups_response_access_pair.py b/frontier_api/models/v1beta1_list_current_user_groups_response_access_pair.py
index 6256969..5ed2087 100644
--- a/frontier_api/models/v1beta1_list_current_user_groups_response_access_pair.py
+++ b/frontier_api/models/v1beta1_list_current_user_groups_response_access_pair.py
@@ -19,71 +19,54 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import List, Optional
+from pydantic import BaseModel, Field, StrictStr, conlist
class V1beta1ListCurrentUserGroupsResponseAccessPair(BaseModel):
"""
V1beta1ListCurrentUserGroupsResponseAccessPair
- """ # noqa: E501
- group_id: Optional[StrictStr] = Field(default=None, alias="groupId")
- permissions: Optional[List[StrictStr]] = None
- __properties: ClassVar[List[str]] = ["groupId", "permissions"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ group_id: Optional[StrictStr] = Field(None, alias="groupId")
+ permissions: Optional[conlist(StrictStr)] = None
+ __properties = ["groupId", "permissions"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListCurrentUserGroupsResponseAccessPair:
"""Create an instance of V1beta1ListCurrentUserGroupsResponseAccessPair 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListCurrentUserGroupsResponseAccessPair:
"""Create an instance of V1beta1ListCurrentUserGroupsResponseAccessPair from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListCurrentUserGroupsResponseAccessPair.parse_obj(obj)
- _obj = cls.model_validate({
- "groupId": obj.get("groupId"),
+ _obj = V1beta1ListCurrentUserGroupsResponseAccessPair.parse_obj({
+ "group_id": obj.get("groupId"),
"permissions": obj.get("permissions")
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_current_user_invitations_response.py b/frontier_api/models/v1beta1_list_current_user_invitations_response.py
index 3089590..246916e 100644
--- a/frontier_api/models/v1beta1_list_current_user_invitations_response.py
+++ b/frontier_api/models/v1beta1_list_current_user_invitations_response.py
@@ -19,59 +19,43 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_invitation import V1beta1Invitation
from frontier_api.models.v1beta1_organization import V1beta1Organization
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListCurrentUserInvitationsResponse(BaseModel):
"""
V1beta1ListCurrentUserInvitationsResponse
- """ # noqa: E501
- invitations: Optional[List[V1beta1Invitation]] = None
- orgs: Optional[List[V1beta1Organization]] = None
- __properties: ClassVar[List[str]] = ["invitations", "orgs"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ invitations: Optional[conlist(V1beta1Invitation)] = None
+ orgs: Optional[conlist(V1beta1Organization)] = None
+ __properties = ["invitations", "orgs"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListCurrentUserInvitationsResponse:
"""Create an instance of V1beta1ListCurrentUserInvitationsResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in invitations (list)
_items = []
if self.invitations:
@@ -89,15 +73,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListCurrentUserInvitationsResponse:
"""Create an instance of V1beta1ListCurrentUserInvitationsResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListCurrentUserInvitationsResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListCurrentUserInvitationsResponse.parse_obj({
"invitations": [V1beta1Invitation.from_dict(_item) for _item in obj.get("invitations")] if obj.get("invitations") is not None else None,
"orgs": [V1beta1Organization.from_dict(_item) for _item in obj.get("orgs")] if obj.get("orgs") is not None else None
})
diff --git a/frontier_api/models/v1beta1_list_current_user_preferences_response.py b/frontier_api/models/v1beta1_list_current_user_preferences_response.py
index da97bdf..578463b 100644
--- a/frontier_api/models/v1beta1_list_current_user_preferences_response.py
+++ b/frontier_api/models/v1beta1_list_current_user_preferences_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_preference import V1beta1Preference
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListCurrentUserPreferencesResponse(BaseModel):
"""
V1beta1ListCurrentUserPreferencesResponse
- """ # noqa: E501
- preferences: Optional[List[V1beta1Preference]] = None
- __properties: ClassVar[List[str]] = ["preferences"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ preferences: Optional[conlist(V1beta1Preference)] = None
+ __properties = ["preferences"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListCurrentUserPreferencesResponse:
"""Create an instance of V1beta1ListCurrentUserPreferencesResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in preferences (list)
_items = []
if self.preferences:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListCurrentUserPreferencesResponse:
"""Create an instance of V1beta1ListCurrentUserPreferencesResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListCurrentUserPreferencesResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListCurrentUserPreferencesResponse.parse_obj({
"preferences": [V1beta1Preference.from_dict(_item) for _item in obj.get("preferences")] if obj.get("preferences") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_features_response.py b/frontier_api/models/v1beta1_list_features_response.py
index 5979f16..e1303ec 100644
--- a/frontier_api/models/v1beta1_list_features_response.py
+++ b/frontier_api/models/v1beta1_list_features_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_feature import V1beta1Feature
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListFeaturesResponse(BaseModel):
"""
V1beta1ListFeaturesResponse
- """ # noqa: E501
- features: Optional[List[V1beta1Feature]] = None
- __properties: ClassVar[List[str]] = ["features"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ features: Optional[conlist(V1beta1Feature)] = None
+ __properties = ["features"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListFeaturesResponse:
"""Create an instance of V1beta1ListFeaturesResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in features (list)
_items = []
if self.features:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListFeaturesResponse:
"""Create an instance of V1beta1ListFeaturesResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListFeaturesResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListFeaturesResponse.parse_obj({
"features": [V1beta1Feature.from_dict(_item) for _item in obj.get("features")] if obj.get("features") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_group_preferences_response.py b/frontier_api/models/v1beta1_list_group_preferences_response.py
index 312868f..f94b230 100644
--- a/frontier_api/models/v1beta1_list_group_preferences_response.py
+++ b/frontier_api/models/v1beta1_list_group_preferences_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_preference import V1beta1Preference
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListGroupPreferencesResponse(BaseModel):
"""
V1beta1ListGroupPreferencesResponse
- """ # noqa: E501
- preferences: Optional[List[V1beta1Preference]] = None
- __properties: ClassVar[List[str]] = ["preferences"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ preferences: Optional[conlist(V1beta1Preference)] = None
+ __properties = ["preferences"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListGroupPreferencesResponse:
"""Create an instance of V1beta1ListGroupPreferencesResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in preferences (list)
_items = []
if self.preferences:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListGroupPreferencesResponse:
"""Create an instance of V1beta1ListGroupPreferencesResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListGroupPreferencesResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListGroupPreferencesResponse.parse_obj({
"preferences": [V1beta1Preference.from_dict(_item) for _item in obj.get("preferences")] if obj.get("preferences") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_group_users_response.py b/frontier_api/models/v1beta1_list_group_users_response.py
index 93f037a..586ef11 100644
--- a/frontier_api/models/v1beta1_list_group_users_response.py
+++ b/frontier_api/models/v1beta1_list_group_users_response.py
@@ -19,60 +19,43 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
-from pydantic import Field
+from typing import List, Optional
+from pydantic import BaseModel, Field, conlist
from frontier_api.models.v1beta1_list_group_users_response_role_pair import V1beta1ListGroupUsersResponseRolePair
from frontier_api.models.v1beta1_user import V1beta1User
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListGroupUsersResponse(BaseModel):
"""
V1beta1ListGroupUsersResponse
- """ # noqa: E501
- users: Optional[List[V1beta1User]] = None
- role_pairs: Optional[List[V1beta1ListGroupUsersResponseRolePair]] = Field(default=None, alias="rolePairs")
- __properties: ClassVar[List[str]] = ["users", "rolePairs"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ users: Optional[conlist(V1beta1User)] = None
+ role_pairs: Optional[conlist(V1beta1ListGroupUsersResponseRolePair)] = Field(None, alias="rolePairs")
+ __properties = ["users", "rolePairs"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListGroupUsersResponse:
"""Create an instance of V1beta1ListGroupUsersResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in users (list)
_items = []
if self.users:
@@ -90,17 +73,17 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListGroupUsersResponse:
"""Create an instance of V1beta1ListGroupUsersResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListGroupUsersResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListGroupUsersResponse.parse_obj({
"users": [V1beta1User.from_dict(_item) for _item in obj.get("users")] if obj.get("users") is not None else None,
- "rolePairs": [V1beta1ListGroupUsersResponseRolePair.from_dict(_item) for _item in obj.get("rolePairs")] if obj.get("rolePairs") is not None else None
+ "role_pairs": [V1beta1ListGroupUsersResponseRolePair.from_dict(_item) for _item in obj.get("rolePairs")] if obj.get("rolePairs") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_group_users_response_role_pair.py b/frontier_api/models/v1beta1_list_group_users_response_role_pair.py
index 25e755d..0487dce 100644
--- a/frontier_api/models/v1beta1_list_group_users_response_role_pair.py
+++ b/frontier_api/models/v1beta1_list_group_users_response_role_pair.py
@@ -19,59 +19,42 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
+from typing import List, Optional
+from pydantic import BaseModel, Field, StrictStr, conlist
from frontier_api.models.v1beta1_role import V1beta1Role
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListGroupUsersResponseRolePair(BaseModel):
"""
V1beta1ListGroupUsersResponseRolePair
- """ # noqa: E501
- user_id: Optional[StrictStr] = Field(default=None, alias="userId")
- roles: Optional[List[V1beta1Role]] = None
- __properties: ClassVar[List[str]] = ["userId", "roles"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ user_id: Optional[StrictStr] = Field(None, alias="userId")
+ roles: Optional[conlist(V1beta1Role)] = None
+ __properties = ["userId", "roles"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListGroupUsersResponseRolePair:
"""Create an instance of V1beta1ListGroupUsersResponseRolePair 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in roles (list)
_items = []
if self.roles:
@@ -82,16 +65,16 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListGroupUsersResponseRolePair:
"""Create an instance of V1beta1ListGroupUsersResponseRolePair from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListGroupUsersResponseRolePair.parse_obj(obj)
- _obj = cls.model_validate({
- "userId": obj.get("userId"),
+ _obj = V1beta1ListGroupUsersResponseRolePair.parse_obj({
+ "user_id": obj.get("userId"),
"roles": [V1beta1Role.from_dict(_item) for _item in obj.get("roles")] if obj.get("roles") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_groups_response.py b/frontier_api/models/v1beta1_list_groups_response.py
index 4afe82f..526aa38 100644
--- a/frontier_api/models/v1beta1_list_groups_response.py
+++ b/frontier_api/models/v1beta1_list_groups_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_group import V1beta1Group
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListGroupsResponse(BaseModel):
"""
V1beta1ListGroupsResponse
- """ # noqa: E501
- groups: Optional[List[V1beta1Group]] = None
- __properties: ClassVar[List[str]] = ["groups"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ groups: Optional[conlist(V1beta1Group)] = None
+ __properties = ["groups"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListGroupsResponse:
"""Create an instance of V1beta1ListGroupsResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in groups (list)
_items = []
if self.groups:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListGroupsResponse:
"""Create an instance of V1beta1ListGroupsResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListGroupsResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListGroupsResponse.parse_obj({
"groups": [V1beta1Group.from_dict(_item) for _item in obj.get("groups")] if obj.get("groups") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_meta_schemas_response.py b/frontier_api/models/v1beta1_list_meta_schemas_response.py
index af32253..4cf131e 100644
--- a/frontier_api/models/v1beta1_list_meta_schemas_response.py
+++ b/frontier_api/models/v1beta1_list_meta_schemas_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_meta_schema import V1beta1MetaSchema
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListMetaSchemasResponse(BaseModel):
"""
V1beta1ListMetaSchemasResponse
- """ # noqa: E501
- metaschemas: Optional[List[V1beta1MetaSchema]] = None
- __properties: ClassVar[List[str]] = ["metaschemas"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ metaschemas: Optional[conlist(V1beta1MetaSchema)] = None
+ __properties = ["metaschemas"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListMetaSchemasResponse:
"""Create an instance of V1beta1ListMetaSchemasResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in metaschemas (list)
_items = []
if self.metaschemas:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListMetaSchemasResponse:
"""Create an instance of V1beta1ListMetaSchemasResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListMetaSchemasResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListMetaSchemasResponse.parse_obj({
"metaschemas": [V1beta1MetaSchema.from_dict(_item) for _item in obj.get("metaschemas")] if obj.get("metaschemas") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_namespaces_response.py b/frontier_api/models/v1beta1_list_namespaces_response.py
index aa969e7..cc83742 100644
--- a/frontier_api/models/v1beta1_list_namespaces_response.py
+++ b/frontier_api/models/v1beta1_list_namespaces_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_namespace import V1beta1Namespace
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListNamespacesResponse(BaseModel):
"""
V1beta1ListNamespacesResponse
- """ # noqa: E501
- namespaces: Optional[List[V1beta1Namespace]] = None
- __properties: ClassVar[List[str]] = ["namespaces"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ namespaces: Optional[conlist(V1beta1Namespace)] = None
+ __properties = ["namespaces"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListNamespacesResponse:
"""Create an instance of V1beta1ListNamespacesResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in namespaces (list)
_items = []
if self.namespaces:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListNamespacesResponse:
"""Create an instance of V1beta1ListNamespacesResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListNamespacesResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListNamespacesResponse.parse_obj({
"namespaces": [V1beta1Namespace.from_dict(_item) for _item in obj.get("namespaces")] if obj.get("namespaces") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_organization_admins_response.py b/frontier_api/models/v1beta1_list_organization_admins_response.py
index c4d1e1d..6f8431e 100644
--- a/frontier_api/models/v1beta1_list_organization_admins_response.py
+++ b/frontier_api/models/v1beta1_list_organization_admins_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_user import V1beta1User
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListOrganizationAdminsResponse(BaseModel):
"""
V1beta1ListOrganizationAdminsResponse
- """ # noqa: E501
- users: Optional[List[V1beta1User]] = None
- __properties: ClassVar[List[str]] = ["users"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ users: Optional[conlist(V1beta1User)] = None
+ __properties = ["users"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListOrganizationAdminsResponse:
"""Create an instance of V1beta1ListOrganizationAdminsResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in users (list)
_items = []
if self.users:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListOrganizationAdminsResponse:
"""Create an instance of V1beta1ListOrganizationAdminsResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListOrganizationAdminsResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListOrganizationAdminsResponse.parse_obj({
"users": [V1beta1User.from_dict(_item) for _item in obj.get("users")] if obj.get("users") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_organization_audit_logs_response.py b/frontier_api/models/v1beta1_list_organization_audit_logs_response.py
index 4643a45..c3ef14f 100644
--- a/frontier_api/models/v1beta1_list_organization_audit_logs_response.py
+++ b/frontier_api/models/v1beta1_list_organization_audit_logs_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_audit_log import V1beta1AuditLog
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListOrganizationAuditLogsResponse(BaseModel):
"""
V1beta1ListOrganizationAuditLogsResponse
- """ # noqa: E501
- logs: Optional[List[V1beta1AuditLog]] = None
- __properties: ClassVar[List[str]] = ["logs"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ logs: Optional[conlist(V1beta1AuditLog)] = None
+ __properties = ["logs"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListOrganizationAuditLogsResponse:
"""Create an instance of V1beta1ListOrganizationAuditLogsResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in logs (list)
_items = []
if self.logs:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListOrganizationAuditLogsResponse:
"""Create an instance of V1beta1ListOrganizationAuditLogsResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListOrganizationAuditLogsResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListOrganizationAuditLogsResponse.parse_obj({
"logs": [V1beta1AuditLog.from_dict(_item) for _item in obj.get("logs")] if obj.get("logs") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_organization_domains_response.py b/frontier_api/models/v1beta1_list_organization_domains_response.py
index 26c64da..51ea9be 100644
--- a/frontier_api/models/v1beta1_list_organization_domains_response.py
+++ b/frontier_api/models/v1beta1_list_organization_domains_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_domain import V1beta1Domain
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListOrganizationDomainsResponse(BaseModel):
"""
V1beta1ListOrganizationDomainsResponse
- """ # noqa: E501
- domains: Optional[List[V1beta1Domain]] = None
- __properties: ClassVar[List[str]] = ["domains"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ domains: Optional[conlist(V1beta1Domain)] = None
+ __properties = ["domains"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListOrganizationDomainsResponse:
"""Create an instance of V1beta1ListOrganizationDomainsResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in domains (list)
_items = []
if self.domains:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListOrganizationDomainsResponse:
"""Create an instance of V1beta1ListOrganizationDomainsResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListOrganizationDomainsResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListOrganizationDomainsResponse.parse_obj({
"domains": [V1beta1Domain.from_dict(_item) for _item in obj.get("domains")] if obj.get("domains") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_organization_groups_response.py b/frontier_api/models/v1beta1_list_organization_groups_response.py
index c8174ec..eb6f819 100644
--- a/frontier_api/models/v1beta1_list_organization_groups_response.py
+++ b/frontier_api/models/v1beta1_list_organization_groups_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_group import V1beta1Group
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListOrganizationGroupsResponse(BaseModel):
"""
V1beta1ListOrganizationGroupsResponse
- """ # noqa: E501
- groups: Optional[List[V1beta1Group]] = None
- __properties: ClassVar[List[str]] = ["groups"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ groups: Optional[conlist(V1beta1Group)] = None
+ __properties = ["groups"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListOrganizationGroupsResponse:
"""Create an instance of V1beta1ListOrganizationGroupsResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in groups (list)
_items = []
if self.groups:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListOrganizationGroupsResponse:
"""Create an instance of V1beta1ListOrganizationGroupsResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListOrganizationGroupsResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListOrganizationGroupsResponse.parse_obj({
"groups": [V1beta1Group.from_dict(_item) for _item in obj.get("groups")] if obj.get("groups") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_organization_invitations_response.py b/frontier_api/models/v1beta1_list_organization_invitations_response.py
index 3cf8fe2..5c44fa0 100644
--- a/frontier_api/models/v1beta1_list_organization_invitations_response.py
+++ b/frontier_api/models/v1beta1_list_organization_invitations_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_invitation import V1beta1Invitation
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListOrganizationInvitationsResponse(BaseModel):
"""
V1beta1ListOrganizationInvitationsResponse
- """ # noqa: E501
- invitations: Optional[List[V1beta1Invitation]] = None
- __properties: ClassVar[List[str]] = ["invitations"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ invitations: Optional[conlist(V1beta1Invitation)] = None
+ __properties = ["invitations"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListOrganizationInvitationsResponse:
"""Create an instance of V1beta1ListOrganizationInvitationsResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in invitations (list)
_items = []
if self.invitations:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListOrganizationInvitationsResponse:
"""Create an instance of V1beta1ListOrganizationInvitationsResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListOrganizationInvitationsResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListOrganizationInvitationsResponse.parse_obj({
"invitations": [V1beta1Invitation.from_dict(_item) for _item in obj.get("invitations")] if obj.get("invitations") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_organization_preferences_response.py b/frontier_api/models/v1beta1_list_organization_preferences_response.py
index e8a3ff3..8340264 100644
--- a/frontier_api/models/v1beta1_list_organization_preferences_response.py
+++ b/frontier_api/models/v1beta1_list_organization_preferences_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_preference import V1beta1Preference
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListOrganizationPreferencesResponse(BaseModel):
"""
V1beta1ListOrganizationPreferencesResponse
- """ # noqa: E501
- preferences: Optional[List[V1beta1Preference]] = None
- __properties: ClassVar[List[str]] = ["preferences"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ preferences: Optional[conlist(V1beta1Preference)] = None
+ __properties = ["preferences"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListOrganizationPreferencesResponse:
"""Create an instance of V1beta1ListOrganizationPreferencesResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in preferences (list)
_items = []
if self.preferences:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListOrganizationPreferencesResponse:
"""Create an instance of V1beta1ListOrganizationPreferencesResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListOrganizationPreferencesResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListOrganizationPreferencesResponse.parse_obj({
"preferences": [V1beta1Preference.from_dict(_item) for _item in obj.get("preferences")] if obj.get("preferences") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_organization_projects_response.py b/frontier_api/models/v1beta1_list_organization_projects_response.py
index 13cfde8..97728e4 100644
--- a/frontier_api/models/v1beta1_list_organization_projects_response.py
+++ b/frontier_api/models/v1beta1_list_organization_projects_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_project import V1beta1Project
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListOrganizationProjectsResponse(BaseModel):
"""
V1beta1ListOrganizationProjectsResponse
- """ # noqa: E501
- projects: Optional[List[V1beta1Project]] = None
- __properties: ClassVar[List[str]] = ["projects"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ projects: Optional[conlist(V1beta1Project)] = None
+ __properties = ["projects"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListOrganizationProjectsResponse:
"""Create an instance of V1beta1ListOrganizationProjectsResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in projects (list)
_items = []
if self.projects:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListOrganizationProjectsResponse:
"""Create an instance of V1beta1ListOrganizationProjectsResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListOrganizationProjectsResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListOrganizationProjectsResponse.parse_obj({
"projects": [V1beta1Project.from_dict(_item) for _item in obj.get("projects")] if obj.get("projects") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_organization_roles_response.py b/frontier_api/models/v1beta1_list_organization_roles_response.py
index bfc7528..0d27bf4 100644
--- a/frontier_api/models/v1beta1_list_organization_roles_response.py
+++ b/frontier_api/models/v1beta1_list_organization_roles_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_role import V1beta1Role
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListOrganizationRolesResponse(BaseModel):
"""
V1beta1ListOrganizationRolesResponse
- """ # noqa: E501
- roles: Optional[List[V1beta1Role]] = None
- __properties: ClassVar[List[str]] = ["roles"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ roles: Optional[conlist(V1beta1Role)] = None
+ __properties = ["roles"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListOrganizationRolesResponse:
"""Create an instance of V1beta1ListOrganizationRolesResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in roles (list)
_items = []
if self.roles:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListOrganizationRolesResponse:
"""Create an instance of V1beta1ListOrganizationRolesResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListOrganizationRolesResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListOrganizationRolesResponse.parse_obj({
"roles": [V1beta1Role.from_dict(_item) for _item in obj.get("roles")] if obj.get("roles") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_organization_service_users_response.py b/frontier_api/models/v1beta1_list_organization_service_users_response.py
index 66990a8..3706bf3 100644
--- a/frontier_api/models/v1beta1_list_organization_service_users_response.py
+++ b/frontier_api/models/v1beta1_list_organization_service_users_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_service_user import V1beta1ServiceUser
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListOrganizationServiceUsersResponse(BaseModel):
"""
V1beta1ListOrganizationServiceUsersResponse
- """ # noqa: E501
- serviceusers: Optional[List[V1beta1ServiceUser]] = None
- __properties: ClassVar[List[str]] = ["serviceusers"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ serviceusers: Optional[conlist(V1beta1ServiceUser)] = None
+ __properties = ["serviceusers"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListOrganizationServiceUsersResponse:
"""Create an instance of V1beta1ListOrganizationServiceUsersResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in serviceusers (list)
_items = []
if self.serviceusers:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListOrganizationServiceUsersResponse:
"""Create an instance of V1beta1ListOrganizationServiceUsersResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListOrganizationServiceUsersResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListOrganizationServiceUsersResponse.parse_obj({
"serviceusers": [V1beta1ServiceUser.from_dict(_item) for _item in obj.get("serviceusers")] if obj.get("serviceusers") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_organization_users_response.py b/frontier_api/models/v1beta1_list_organization_users_response.py
index 073ec79..3d484ef 100644
--- a/frontier_api/models/v1beta1_list_organization_users_response.py
+++ b/frontier_api/models/v1beta1_list_organization_users_response.py
@@ -19,60 +19,43 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
-from pydantic import Field
+from typing import List, Optional
+from pydantic import BaseModel, Field, conlist
from frontier_api.models.v1beta1_list_organization_users_response_role_pair import V1beta1ListOrganizationUsersResponseRolePair
from frontier_api.models.v1beta1_user import V1beta1User
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListOrganizationUsersResponse(BaseModel):
"""
V1beta1ListOrganizationUsersResponse
- """ # noqa: E501
- users: Optional[List[V1beta1User]] = None
- role_pairs: Optional[List[V1beta1ListOrganizationUsersResponseRolePair]] = Field(default=None, alias="rolePairs")
- __properties: ClassVar[List[str]] = ["users", "rolePairs"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ users: Optional[conlist(V1beta1User)] = None
+ role_pairs: Optional[conlist(V1beta1ListOrganizationUsersResponseRolePair)] = Field(None, alias="rolePairs")
+ __properties = ["users", "rolePairs"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListOrganizationUsersResponse:
"""Create an instance of V1beta1ListOrganizationUsersResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in users (list)
_items = []
if self.users:
@@ -90,17 +73,17 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListOrganizationUsersResponse:
"""Create an instance of V1beta1ListOrganizationUsersResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListOrganizationUsersResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListOrganizationUsersResponse.parse_obj({
"users": [V1beta1User.from_dict(_item) for _item in obj.get("users")] if obj.get("users") is not None else None,
- "rolePairs": [V1beta1ListOrganizationUsersResponseRolePair.from_dict(_item) for _item in obj.get("rolePairs")] if obj.get("rolePairs") is not None else None
+ "role_pairs": [V1beta1ListOrganizationUsersResponseRolePair.from_dict(_item) for _item in obj.get("rolePairs")] if obj.get("rolePairs") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_organization_users_response_role_pair.py b/frontier_api/models/v1beta1_list_organization_users_response_role_pair.py
index d69fecb..3934df7 100644
--- a/frontier_api/models/v1beta1_list_organization_users_response_role_pair.py
+++ b/frontier_api/models/v1beta1_list_organization_users_response_role_pair.py
@@ -19,59 +19,42 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
+from typing import List, Optional
+from pydantic import BaseModel, Field, StrictStr, conlist
from frontier_api.models.v1beta1_role import V1beta1Role
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListOrganizationUsersResponseRolePair(BaseModel):
"""
V1beta1ListOrganizationUsersResponseRolePair
- """ # noqa: E501
- user_id: Optional[StrictStr] = Field(default=None, alias="userId")
- roles: Optional[List[V1beta1Role]] = None
- __properties: ClassVar[List[str]] = ["userId", "roles"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ user_id: Optional[StrictStr] = Field(None, alias="userId")
+ roles: Optional[conlist(V1beta1Role)] = None
+ __properties = ["userId", "roles"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListOrganizationUsersResponseRolePair:
"""Create an instance of V1beta1ListOrganizationUsersResponseRolePair 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in roles (list)
_items = []
if self.roles:
@@ -82,16 +65,16 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListOrganizationUsersResponseRolePair:
"""Create an instance of V1beta1ListOrganizationUsersResponseRolePair from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListOrganizationUsersResponseRolePair.parse_obj(obj)
- _obj = cls.model_validate({
- "userId": obj.get("userId"),
+ _obj = V1beta1ListOrganizationUsersResponseRolePair.parse_obj({
+ "user_id": obj.get("userId"),
"roles": [V1beta1Role.from_dict(_item) for _item in obj.get("roles")] if obj.get("roles") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_organizations_by_current_user_response.py b/frontier_api/models/v1beta1_list_organizations_by_current_user_response.py
index 597da63..5502604 100644
--- a/frontier_api/models/v1beta1_list_organizations_by_current_user_response.py
+++ b/frontier_api/models/v1beta1_list_organizations_by_current_user_response.py
@@ -19,59 +19,42 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
-from pydantic import Field
+from typing import List, Optional
+from pydantic import BaseModel, Field, conlist
from frontier_api.models.v1beta1_organization import V1beta1Organization
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListOrganizationsByCurrentUserResponse(BaseModel):
"""
V1beta1ListOrganizationsByCurrentUserResponse
- """ # noqa: E501
- organizations: Optional[List[V1beta1Organization]] = None
- joinable_via_domain: Optional[List[V1beta1Organization]] = Field(default=None, alias="joinableViaDomain")
- __properties: ClassVar[List[str]] = ["organizations", "joinableViaDomain"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ organizations: Optional[conlist(V1beta1Organization)] = None
+ joinable_via_domain: Optional[conlist(V1beta1Organization)] = Field(None, alias="joinableViaDomain")
+ __properties = ["organizations", "joinableViaDomain"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListOrganizationsByCurrentUserResponse:
"""Create an instance of V1beta1ListOrganizationsByCurrentUserResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in organizations (list)
_items = []
if self.organizations:
@@ -89,17 +72,17 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListOrganizationsByCurrentUserResponse:
"""Create an instance of V1beta1ListOrganizationsByCurrentUserResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListOrganizationsByCurrentUserResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListOrganizationsByCurrentUserResponse.parse_obj({
"organizations": [V1beta1Organization.from_dict(_item) for _item in obj.get("organizations")] if obj.get("organizations") is not None else None,
- "joinableViaDomain": [V1beta1Organization.from_dict(_item) for _item in obj.get("joinableViaDomain")] if obj.get("joinableViaDomain") is not None else None
+ "joinable_via_domain": [V1beta1Organization.from_dict(_item) for _item in obj.get("joinableViaDomain")] if obj.get("joinableViaDomain") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_organizations_by_user_response.py b/frontier_api/models/v1beta1_list_organizations_by_user_response.py
index 8a1e80e..ee3b5ba 100644
--- a/frontier_api/models/v1beta1_list_organizations_by_user_response.py
+++ b/frontier_api/models/v1beta1_list_organizations_by_user_response.py
@@ -19,59 +19,42 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
-from pydantic import Field
+from typing import List, Optional
+from pydantic import BaseModel, Field, conlist
from frontier_api.models.v1beta1_organization import V1beta1Organization
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListOrganizationsByUserResponse(BaseModel):
"""
V1beta1ListOrganizationsByUserResponse
- """ # noqa: E501
- organizations: Optional[List[V1beta1Organization]] = None
- joinable_via_domain: Optional[List[V1beta1Organization]] = Field(default=None, alias="joinableViaDomain")
- __properties: ClassVar[List[str]] = ["organizations", "joinableViaDomain"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ organizations: Optional[conlist(V1beta1Organization)] = None
+ joinable_via_domain: Optional[conlist(V1beta1Organization)] = Field(None, alias="joinableViaDomain")
+ __properties = ["organizations", "joinableViaDomain"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListOrganizationsByUserResponse:
"""Create an instance of V1beta1ListOrganizationsByUserResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in organizations (list)
_items = []
if self.organizations:
@@ -89,17 +72,17 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListOrganizationsByUserResponse:
"""Create an instance of V1beta1ListOrganizationsByUserResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListOrganizationsByUserResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListOrganizationsByUserResponse.parse_obj({
"organizations": [V1beta1Organization.from_dict(_item) for _item in obj.get("organizations")] if obj.get("organizations") is not None else None,
- "joinableViaDomain": [V1beta1Organization.from_dict(_item) for _item in obj.get("joinableViaDomain")] if obj.get("joinableViaDomain") is not None else None
+ "joinable_via_domain": [V1beta1Organization.from_dict(_item) for _item in obj.get("joinableViaDomain")] if obj.get("joinableViaDomain") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_organizations_response.py b/frontier_api/models/v1beta1_list_organizations_response.py
index eb168b5..14c1483 100644
--- a/frontier_api/models/v1beta1_list_organizations_response.py
+++ b/frontier_api/models/v1beta1_list_organizations_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_organization import V1beta1Organization
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListOrganizationsResponse(BaseModel):
"""
V1beta1ListOrganizationsResponse
- """ # noqa: E501
- organizations: Optional[List[V1beta1Organization]] = None
- __properties: ClassVar[List[str]] = ["organizations"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ organizations: Optional[conlist(V1beta1Organization)] = None
+ __properties = ["organizations"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListOrganizationsResponse:
"""Create an instance of V1beta1ListOrganizationsResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in organizations (list)
_items = []
if self.organizations:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListOrganizationsResponse:
"""Create an instance of V1beta1ListOrganizationsResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListOrganizationsResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListOrganizationsResponse.parse_obj({
"organizations": [V1beta1Organization.from_dict(_item) for _item in obj.get("organizations")] if obj.get("organizations") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_permissions_response.py b/frontier_api/models/v1beta1_list_permissions_response.py
index 15a9473..3076ff2 100644
--- a/frontier_api/models/v1beta1_list_permissions_response.py
+++ b/frontier_api/models/v1beta1_list_permissions_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_permission import V1beta1Permission
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListPermissionsResponse(BaseModel):
"""
V1beta1ListPermissionsResponse
- """ # noqa: E501
- permissions: Optional[List[V1beta1Permission]] = None
- __properties: ClassVar[List[str]] = ["permissions"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ permissions: Optional[conlist(V1beta1Permission)] = None
+ __properties = ["permissions"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListPermissionsResponse:
"""Create an instance of V1beta1ListPermissionsResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in permissions (list)
_items = []
if self.permissions:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListPermissionsResponse:
"""Create an instance of V1beta1ListPermissionsResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListPermissionsResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListPermissionsResponse.parse_obj({
"permissions": [V1beta1Permission.from_dict(_item) for _item in obj.get("permissions")] if obj.get("permissions") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_plans_response.py b/frontier_api/models/v1beta1_list_plans_response.py
index 74bc0be..80b4cd6 100644
--- a/frontier_api/models/v1beta1_list_plans_response.py
+++ b/frontier_api/models/v1beta1_list_plans_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_plan import V1beta1Plan
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListPlansResponse(BaseModel):
"""
V1beta1ListPlansResponse
- """ # noqa: E501
- plans: Optional[List[V1beta1Plan]] = None
- __properties: ClassVar[List[str]] = ["plans"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ plans: Optional[conlist(V1beta1Plan)] = None
+ __properties = ["plans"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListPlansResponse:
"""Create an instance of V1beta1ListPlansResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in plans (list)
_items = []
if self.plans:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListPlansResponse:
"""Create an instance of V1beta1ListPlansResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListPlansResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListPlansResponse.parse_obj({
"plans": [V1beta1Plan.from_dict(_item) for _item in obj.get("plans")] if obj.get("plans") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_platform_users_response.py b/frontier_api/models/v1beta1_list_platform_users_response.py
new file mode 100644
index 0000000..232c0b7
--- /dev/null
+++ b/frontier_api/models/v1beta1_list_platform_users_response.py
@@ -0,0 +1,90 @@
+# coding: utf-8
+
+"""
+ Frontier Administration API
+
+ The Frontier APIs adhere to the OpenAPI specification, also known as Swagger, which provides a standardized approach for designing, documenting, and consuming RESTful APIs. With OpenAPI, you gain a clear understanding of the API endpoints, request/response structures, and authentication mechanisms supported by the Frontier APIs. By leveraging the OpenAPI specification, developers can easily explore and interact with the Frontier APIs using a variety of tools and libraries. The OpenAPI specification enables automatic code generation, interactive API documentation, and seamless integration with API testing frameworks, making it easier than ever to integrate Frontier into your existing applications and workflows.
+
+ The version of the OpenAPI document: 0.2.0
+ Contact: hello@raystack.org
+ 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 typing import List, Optional
+from pydantic import BaseModel, conlist
+from frontier_api.models.v1beta1_service_user import V1beta1ServiceUser
+from frontier_api.models.v1beta1_user import V1beta1User
+
+class V1beta1ListPlatformUsersResponse(BaseModel):
+ """
+ V1beta1ListPlatformUsersResponse
+ """
+ users: Optional[conlist(V1beta1User)] = None
+ serviceusers: Optional[conlist(V1beta1ServiceUser)] = None
+ __properties = ["users", "serviceusers"]
+
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.dict(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> V1beta1ListPlatformUsersResponse:
+ """Create an instance of V1beta1ListPlatformUsersResponse from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
+ # override the default output from pydantic by calling `to_dict()` of each item in users (list)
+ _items = []
+ if self.users:
+ for _item in self.users:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['users'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in serviceusers (list)
+ _items = []
+ if self.serviceusers:
+ for _item in self.serviceusers:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['serviceusers'] = _items
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: dict) -> V1beta1ListPlatformUsersResponse:
+ """Create an instance of V1beta1ListPlatformUsersResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return V1beta1ListPlatformUsersResponse.parse_obj(obj)
+
+ _obj = V1beta1ListPlatformUsersResponse.parse_obj({
+ "users": [V1beta1User.from_dict(_item) for _item in obj.get("users")] if obj.get("users") is not None else None,
+ "serviceusers": [V1beta1ServiceUser.from_dict(_item) for _item in obj.get("serviceusers")] if obj.get("serviceusers") is not None else None
+ })
+ return _obj
+
+
diff --git a/frontier_api/models/v1beta1_list_policies_response.py b/frontier_api/models/v1beta1_list_policies_response.py
index 8228790..a8d55d8 100644
--- a/frontier_api/models/v1beta1_list_policies_response.py
+++ b/frontier_api/models/v1beta1_list_policies_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_policy import V1beta1Policy
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListPoliciesResponse(BaseModel):
"""
V1beta1ListPoliciesResponse
- """ # noqa: E501
- policies: Optional[List[V1beta1Policy]] = None
- __properties: ClassVar[List[str]] = ["policies"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ policies: Optional[conlist(V1beta1Policy)] = None
+ __properties = ["policies"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListPoliciesResponse:
"""Create an instance of V1beta1ListPoliciesResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in policies (list)
_items = []
if self.policies:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListPoliciesResponse:
"""Create an instance of V1beta1ListPoliciesResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListPoliciesResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListPoliciesResponse.parse_obj({
"policies": [V1beta1Policy.from_dict(_item) for _item in obj.get("policies")] if obj.get("policies") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_preferences_response.py b/frontier_api/models/v1beta1_list_preferences_response.py
index 23270f9..1e6452e 100644
--- a/frontier_api/models/v1beta1_list_preferences_response.py
+++ b/frontier_api/models/v1beta1_list_preferences_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_preference import V1beta1Preference
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListPreferencesResponse(BaseModel):
"""
V1beta1ListPreferencesResponse
- """ # noqa: E501
- preferences: Optional[List[V1beta1Preference]] = None
- __properties: ClassVar[List[str]] = ["preferences"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ preferences: Optional[conlist(V1beta1Preference)] = None
+ __properties = ["preferences"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListPreferencesResponse:
"""Create an instance of V1beta1ListPreferencesResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in preferences (list)
_items = []
if self.preferences:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListPreferencesResponse:
"""Create an instance of V1beta1ListPreferencesResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListPreferencesResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListPreferencesResponse.parse_obj({
"preferences": [V1beta1Preference.from_dict(_item) for _item in obj.get("preferences")] if obj.get("preferences") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_project_admins_response.py b/frontier_api/models/v1beta1_list_project_admins_response.py
index 0364858..27f2471 100644
--- a/frontier_api/models/v1beta1_list_project_admins_response.py
+++ b/frontier_api/models/v1beta1_list_project_admins_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_user import V1beta1User
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListProjectAdminsResponse(BaseModel):
"""
V1beta1ListProjectAdminsResponse
- """ # noqa: E501
- users: Optional[List[V1beta1User]] = None
- __properties: ClassVar[List[str]] = ["users"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ users: Optional[conlist(V1beta1User)] = None
+ __properties = ["users"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListProjectAdminsResponse:
"""Create an instance of V1beta1ListProjectAdminsResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in users (list)
_items = []
if self.users:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListProjectAdminsResponse:
"""Create an instance of V1beta1ListProjectAdminsResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListProjectAdminsResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListProjectAdminsResponse.parse_obj({
"users": [V1beta1User.from_dict(_item) for _item in obj.get("users")] if obj.get("users") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_project_groups_response.py b/frontier_api/models/v1beta1_list_project_groups_response.py
index 62af607..81c0a2a 100644
--- a/frontier_api/models/v1beta1_list_project_groups_response.py
+++ b/frontier_api/models/v1beta1_list_project_groups_response.py
@@ -19,60 +19,43 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
-from pydantic import Field
+from typing import List, Optional
+from pydantic import BaseModel, Field, conlist
from frontier_api.models.v1beta1_group import V1beta1Group
from frontier_api.models.v1beta1_list_project_groups_response_role_pair import V1beta1ListProjectGroupsResponseRolePair
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListProjectGroupsResponse(BaseModel):
"""
V1beta1ListProjectGroupsResponse
- """ # noqa: E501
- groups: Optional[List[V1beta1Group]] = None
- role_pairs: Optional[List[V1beta1ListProjectGroupsResponseRolePair]] = Field(default=None, alias="rolePairs")
- __properties: ClassVar[List[str]] = ["groups", "rolePairs"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ groups: Optional[conlist(V1beta1Group)] = None
+ role_pairs: Optional[conlist(V1beta1ListProjectGroupsResponseRolePair)] = Field(None, alias="rolePairs")
+ __properties = ["groups", "rolePairs"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListProjectGroupsResponse:
"""Create an instance of V1beta1ListProjectGroupsResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in groups (list)
_items = []
if self.groups:
@@ -90,17 +73,17 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListProjectGroupsResponse:
"""Create an instance of V1beta1ListProjectGroupsResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListProjectGroupsResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListProjectGroupsResponse.parse_obj({
"groups": [V1beta1Group.from_dict(_item) for _item in obj.get("groups")] if obj.get("groups") is not None else None,
- "rolePairs": [V1beta1ListProjectGroupsResponseRolePair.from_dict(_item) for _item in obj.get("rolePairs")] if obj.get("rolePairs") is not None else None
+ "role_pairs": [V1beta1ListProjectGroupsResponseRolePair.from_dict(_item) for _item in obj.get("rolePairs")] if obj.get("rolePairs") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_project_groups_response_role_pair.py b/frontier_api/models/v1beta1_list_project_groups_response_role_pair.py
index 1d2a872..d6af57b 100644
--- a/frontier_api/models/v1beta1_list_project_groups_response_role_pair.py
+++ b/frontier_api/models/v1beta1_list_project_groups_response_role_pair.py
@@ -19,59 +19,42 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
+from typing import List, Optional
+from pydantic import BaseModel, Field, StrictStr, conlist
from frontier_api.models.v1beta1_role import V1beta1Role
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListProjectGroupsResponseRolePair(BaseModel):
"""
V1beta1ListProjectGroupsResponseRolePair
- """ # noqa: E501
- group_id: Optional[StrictStr] = Field(default=None, alias="groupId")
- roles: Optional[List[V1beta1Role]] = None
- __properties: ClassVar[List[str]] = ["groupId", "roles"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ group_id: Optional[StrictStr] = Field(None, alias="groupId")
+ roles: Optional[conlist(V1beta1Role)] = None
+ __properties = ["groupId", "roles"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListProjectGroupsResponseRolePair:
"""Create an instance of V1beta1ListProjectGroupsResponseRolePair 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in roles (list)
_items = []
if self.roles:
@@ -82,16 +65,16 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListProjectGroupsResponseRolePair:
"""Create an instance of V1beta1ListProjectGroupsResponseRolePair from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListProjectGroupsResponseRolePair.parse_obj(obj)
- _obj = cls.model_validate({
- "groupId": obj.get("groupId"),
+ _obj = V1beta1ListProjectGroupsResponseRolePair.parse_obj({
+ "group_id": obj.get("groupId"),
"roles": [V1beta1Role.from_dict(_item) for _item in obj.get("roles")] if obj.get("roles") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_project_preferences_response.py b/frontier_api/models/v1beta1_list_project_preferences_response.py
index 048e0f2..f170322 100644
--- a/frontier_api/models/v1beta1_list_project_preferences_response.py
+++ b/frontier_api/models/v1beta1_list_project_preferences_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_preference import V1beta1Preference
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListProjectPreferencesResponse(BaseModel):
"""
V1beta1ListProjectPreferencesResponse
- """ # noqa: E501
- preferences: Optional[List[V1beta1Preference]] = None
- __properties: ClassVar[List[str]] = ["preferences"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ preferences: Optional[conlist(V1beta1Preference)] = None
+ __properties = ["preferences"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListProjectPreferencesResponse:
"""Create an instance of V1beta1ListProjectPreferencesResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in preferences (list)
_items = []
if self.preferences:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListProjectPreferencesResponse:
"""Create an instance of V1beta1ListProjectPreferencesResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListProjectPreferencesResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListProjectPreferencesResponse.parse_obj({
"preferences": [V1beta1Preference.from_dict(_item) for _item in obj.get("preferences")] if obj.get("preferences") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_project_resources_response.py b/frontier_api/models/v1beta1_list_project_resources_response.py
index a19e07a..187c742 100644
--- a/frontier_api/models/v1beta1_list_project_resources_response.py
+++ b/frontier_api/models/v1beta1_list_project_resources_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_resource import V1beta1Resource
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListProjectResourcesResponse(BaseModel):
"""
V1beta1ListProjectResourcesResponse
- """ # noqa: E501
- resources: Optional[List[V1beta1Resource]] = None
- __properties: ClassVar[List[str]] = ["resources"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ resources: Optional[conlist(V1beta1Resource)] = None
+ __properties = ["resources"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListProjectResourcesResponse:
"""Create an instance of V1beta1ListProjectResourcesResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in resources (list)
_items = []
if self.resources:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListProjectResourcesResponse:
"""Create an instance of V1beta1ListProjectResourcesResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListProjectResourcesResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListProjectResourcesResponse.parse_obj({
"resources": [V1beta1Resource.from_dict(_item) for _item in obj.get("resources")] if obj.get("resources") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_project_service_users_response.py b/frontier_api/models/v1beta1_list_project_service_users_response.py
index a675215..90cc082 100644
--- a/frontier_api/models/v1beta1_list_project_service_users_response.py
+++ b/frontier_api/models/v1beta1_list_project_service_users_response.py
@@ -19,60 +19,43 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
-from pydantic import Field
+from typing import List, Optional
+from pydantic import BaseModel, Field, conlist
from frontier_api.models.v1beta1_list_project_service_users_response_role_pair import V1beta1ListProjectServiceUsersResponseRolePair
from frontier_api.models.v1beta1_service_user import V1beta1ServiceUser
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListProjectServiceUsersResponse(BaseModel):
"""
V1beta1ListProjectServiceUsersResponse
- """ # noqa: E501
- serviceusers: Optional[List[V1beta1ServiceUser]] = None
- role_pairs: Optional[List[V1beta1ListProjectServiceUsersResponseRolePair]] = Field(default=None, alias="rolePairs")
- __properties: ClassVar[List[str]] = ["serviceusers", "rolePairs"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ serviceusers: Optional[conlist(V1beta1ServiceUser)] = None
+ role_pairs: Optional[conlist(V1beta1ListProjectServiceUsersResponseRolePair)] = Field(None, alias="rolePairs")
+ __properties = ["serviceusers", "rolePairs"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListProjectServiceUsersResponse:
"""Create an instance of V1beta1ListProjectServiceUsersResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in serviceusers (list)
_items = []
if self.serviceusers:
@@ -90,17 +73,17 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListProjectServiceUsersResponse:
"""Create an instance of V1beta1ListProjectServiceUsersResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListProjectServiceUsersResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListProjectServiceUsersResponse.parse_obj({
"serviceusers": [V1beta1ServiceUser.from_dict(_item) for _item in obj.get("serviceusers")] if obj.get("serviceusers") is not None else None,
- "rolePairs": [V1beta1ListProjectServiceUsersResponseRolePair.from_dict(_item) for _item in obj.get("rolePairs")] if obj.get("rolePairs") is not None else None
+ "role_pairs": [V1beta1ListProjectServiceUsersResponseRolePair.from_dict(_item) for _item in obj.get("rolePairs")] if obj.get("rolePairs") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_project_service_users_response_role_pair.py b/frontier_api/models/v1beta1_list_project_service_users_response_role_pair.py
index 8b86da5..b1c84d7 100644
--- a/frontier_api/models/v1beta1_list_project_service_users_response_role_pair.py
+++ b/frontier_api/models/v1beta1_list_project_service_users_response_role_pair.py
@@ -19,59 +19,42 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
+from typing import List, Optional
+from pydantic import BaseModel, Field, StrictStr, conlist
from frontier_api.models.v1beta1_role import V1beta1Role
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListProjectServiceUsersResponseRolePair(BaseModel):
"""
V1beta1ListProjectServiceUsersResponseRolePair
- """ # noqa: E501
- serviceuser_id: Optional[StrictStr] = Field(default=None, alias="serviceuserId")
- roles: Optional[List[V1beta1Role]] = None
- __properties: ClassVar[List[str]] = ["serviceuserId", "roles"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ serviceuser_id: Optional[StrictStr] = Field(None, alias="serviceuserId")
+ roles: Optional[conlist(V1beta1Role)] = None
+ __properties = ["serviceuserId", "roles"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListProjectServiceUsersResponseRolePair:
"""Create an instance of V1beta1ListProjectServiceUsersResponseRolePair 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in roles (list)
_items = []
if self.roles:
@@ -82,16 +65,16 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListProjectServiceUsersResponseRolePair:
"""Create an instance of V1beta1ListProjectServiceUsersResponseRolePair from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListProjectServiceUsersResponseRolePair.parse_obj(obj)
- _obj = cls.model_validate({
- "serviceuserId": obj.get("serviceuserId"),
+ _obj = V1beta1ListProjectServiceUsersResponseRolePair.parse_obj({
+ "serviceuser_id": obj.get("serviceuserId"),
"roles": [V1beta1Role.from_dict(_item) for _item in obj.get("roles")] if obj.get("roles") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_project_users_response.py b/frontier_api/models/v1beta1_list_project_users_response.py
index d7a04f2..fef965e 100644
--- a/frontier_api/models/v1beta1_list_project_users_response.py
+++ b/frontier_api/models/v1beta1_list_project_users_response.py
@@ -19,60 +19,43 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
-from pydantic import Field
+from typing import List, Optional
+from pydantic import BaseModel, Field, conlist
from frontier_api.models.v1beta1_list_project_users_response_role_pair import V1beta1ListProjectUsersResponseRolePair
from frontier_api.models.v1beta1_user import V1beta1User
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListProjectUsersResponse(BaseModel):
"""
V1beta1ListProjectUsersResponse
- """ # noqa: E501
- users: Optional[List[V1beta1User]] = None
- role_pairs: Optional[List[V1beta1ListProjectUsersResponseRolePair]] = Field(default=None, alias="rolePairs")
- __properties: ClassVar[List[str]] = ["users", "rolePairs"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ users: Optional[conlist(V1beta1User)] = None
+ role_pairs: Optional[conlist(V1beta1ListProjectUsersResponseRolePair)] = Field(None, alias="rolePairs")
+ __properties = ["users", "rolePairs"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListProjectUsersResponse:
"""Create an instance of V1beta1ListProjectUsersResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in users (list)
_items = []
if self.users:
@@ -90,17 +73,17 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListProjectUsersResponse:
"""Create an instance of V1beta1ListProjectUsersResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListProjectUsersResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListProjectUsersResponse.parse_obj({
"users": [V1beta1User.from_dict(_item) for _item in obj.get("users")] if obj.get("users") is not None else None,
- "rolePairs": [V1beta1ListProjectUsersResponseRolePair.from_dict(_item) for _item in obj.get("rolePairs")] if obj.get("rolePairs") is not None else None
+ "role_pairs": [V1beta1ListProjectUsersResponseRolePair.from_dict(_item) for _item in obj.get("rolePairs")] if obj.get("rolePairs") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_project_users_response_role_pair.py b/frontier_api/models/v1beta1_list_project_users_response_role_pair.py
index 007ad68..ebe8e68 100644
--- a/frontier_api/models/v1beta1_list_project_users_response_role_pair.py
+++ b/frontier_api/models/v1beta1_list_project_users_response_role_pair.py
@@ -19,59 +19,42 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
+from typing import List, Optional
+from pydantic import BaseModel, Field, StrictStr, conlist
from frontier_api.models.v1beta1_role import V1beta1Role
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListProjectUsersResponseRolePair(BaseModel):
"""
V1beta1ListProjectUsersResponseRolePair
- """ # noqa: E501
- user_id: Optional[StrictStr] = Field(default=None, alias="userId")
- roles: Optional[List[V1beta1Role]] = None
- __properties: ClassVar[List[str]] = ["userId", "roles"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ user_id: Optional[StrictStr] = Field(None, alias="userId")
+ roles: Optional[conlist(V1beta1Role)] = None
+ __properties = ["userId", "roles"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListProjectUsersResponseRolePair:
"""Create an instance of V1beta1ListProjectUsersResponseRolePair 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in roles (list)
_items = []
if self.roles:
@@ -82,16 +65,16 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListProjectUsersResponseRolePair:
"""Create an instance of V1beta1ListProjectUsersResponseRolePair from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListProjectUsersResponseRolePair.parse_obj(obj)
- _obj = cls.model_validate({
- "userId": obj.get("userId"),
+ _obj = V1beta1ListProjectUsersResponseRolePair.parse_obj({
+ "user_id": obj.get("userId"),
"roles": [V1beta1Role.from_dict(_item) for _item in obj.get("roles")] if obj.get("roles") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_projects_by_current_user_response.py b/frontier_api/models/v1beta1_list_projects_by_current_user_response.py
index 9bb9224..8a52b96 100644
--- a/frontier_api/models/v1beta1_list_projects_by_current_user_response.py
+++ b/frontier_api/models/v1beta1_list_projects_by_current_user_response.py
@@ -19,60 +19,43 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
-from pydantic import Field
+from typing import List, Optional
+from pydantic import BaseModel, Field, conlist
from frontier_api.models.v1beta1_list_projects_by_current_user_response_access_pair import V1beta1ListProjectsByCurrentUserResponseAccessPair
from frontier_api.models.v1beta1_project import V1beta1Project
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListProjectsByCurrentUserResponse(BaseModel):
"""
V1beta1ListProjectsByCurrentUserResponse
- """ # noqa: E501
- projects: Optional[List[V1beta1Project]] = None
- access_pairs: Optional[List[V1beta1ListProjectsByCurrentUserResponseAccessPair]] = Field(default=None, alias="accessPairs")
- __properties: ClassVar[List[str]] = ["projects", "accessPairs"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ projects: Optional[conlist(V1beta1Project)] = None
+ access_pairs: Optional[conlist(V1beta1ListProjectsByCurrentUserResponseAccessPair)] = Field(None, alias="accessPairs")
+ __properties = ["projects", "accessPairs"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListProjectsByCurrentUserResponse:
"""Create an instance of V1beta1ListProjectsByCurrentUserResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in projects (list)
_items = []
if self.projects:
@@ -90,17 +73,17 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListProjectsByCurrentUserResponse:
"""Create an instance of V1beta1ListProjectsByCurrentUserResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListProjectsByCurrentUserResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListProjectsByCurrentUserResponse.parse_obj({
"projects": [V1beta1Project.from_dict(_item) for _item in obj.get("projects")] if obj.get("projects") is not None else None,
- "accessPairs": [V1beta1ListProjectsByCurrentUserResponseAccessPair.from_dict(_item) for _item in obj.get("accessPairs")] if obj.get("accessPairs") is not None else None
+ "access_pairs": [V1beta1ListProjectsByCurrentUserResponseAccessPair.from_dict(_item) for _item in obj.get("accessPairs")] if obj.get("accessPairs") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_projects_by_current_user_response_access_pair.py b/frontier_api/models/v1beta1_list_projects_by_current_user_response_access_pair.py
index e9a1e6c..188219c 100644
--- a/frontier_api/models/v1beta1_list_projects_by_current_user_response_access_pair.py
+++ b/frontier_api/models/v1beta1_list_projects_by_current_user_response_access_pair.py
@@ -19,71 +19,54 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import List, Optional
+from pydantic import BaseModel, Field, StrictStr, conlist
class V1beta1ListProjectsByCurrentUserResponseAccessPair(BaseModel):
"""
V1beta1ListProjectsByCurrentUserResponseAccessPair
- """ # noqa: E501
- project_id: Optional[StrictStr] = Field(default=None, alias="projectId")
- permissions: Optional[List[StrictStr]] = None
- __properties: ClassVar[List[str]] = ["projectId", "permissions"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ project_id: Optional[StrictStr] = Field(None, alias="projectId")
+ permissions: Optional[conlist(StrictStr)] = None
+ __properties = ["projectId", "permissions"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListProjectsByCurrentUserResponseAccessPair:
"""Create an instance of V1beta1ListProjectsByCurrentUserResponseAccessPair 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListProjectsByCurrentUserResponseAccessPair:
"""Create an instance of V1beta1ListProjectsByCurrentUserResponseAccessPair from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListProjectsByCurrentUserResponseAccessPair.parse_obj(obj)
- _obj = cls.model_validate({
- "projectId": obj.get("projectId"),
+ _obj = V1beta1ListProjectsByCurrentUserResponseAccessPair.parse_obj({
+ "project_id": obj.get("projectId"),
"permissions": obj.get("permissions")
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_projects_by_user_response.py b/frontier_api/models/v1beta1_list_projects_by_user_response.py
index 2848040..6185af3 100644
--- a/frontier_api/models/v1beta1_list_projects_by_user_response.py
+++ b/frontier_api/models/v1beta1_list_projects_by_user_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_project import V1beta1Project
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListProjectsByUserResponse(BaseModel):
"""
V1beta1ListProjectsByUserResponse
- """ # noqa: E501
- projects: Optional[List[V1beta1Project]] = None
- __properties: ClassVar[List[str]] = ["projects"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ projects: Optional[conlist(V1beta1Project)] = None
+ __properties = ["projects"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListProjectsByUserResponse:
"""Create an instance of V1beta1ListProjectsByUserResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in projects (list)
_items = []
if self.projects:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListProjectsByUserResponse:
"""Create an instance of V1beta1ListProjectsByUserResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListProjectsByUserResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListProjectsByUserResponse.parse_obj({
"projects": [V1beta1Project.from_dict(_item) for _item in obj.get("projects")] if obj.get("projects") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_projects_response.py b/frontier_api/models/v1beta1_list_projects_response.py
index 928d433..f2fe8eb 100644
--- a/frontier_api/models/v1beta1_list_projects_response.py
+++ b/frontier_api/models/v1beta1_list_projects_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_project import V1beta1Project
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListProjectsResponse(BaseModel):
"""
V1beta1ListProjectsResponse
- """ # noqa: E501
- projects: Optional[List[V1beta1Project]] = None
- __properties: ClassVar[List[str]] = ["projects"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ projects: Optional[conlist(V1beta1Project)] = None
+ __properties = ["projects"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListProjectsResponse:
"""Create an instance of V1beta1ListProjectsResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in projects (list)
_items = []
if self.projects:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListProjectsResponse:
"""Create an instance of V1beta1ListProjectsResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListProjectsResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListProjectsResponse.parse_obj({
"projects": [V1beta1Project.from_dict(_item) for _item in obj.get("projects")] if obj.get("projects") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_relations_response.py b/frontier_api/models/v1beta1_list_relations_response.py
index 100da01..a94ed8a 100644
--- a/frontier_api/models/v1beta1_list_relations_response.py
+++ b/frontier_api/models/v1beta1_list_relations_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_relation import V1beta1Relation
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListRelationsResponse(BaseModel):
"""
V1beta1ListRelationsResponse
- """ # noqa: E501
- relations: Optional[List[V1beta1Relation]] = None
- __properties: ClassVar[List[str]] = ["relations"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ relations: Optional[conlist(V1beta1Relation)] = None
+ __properties = ["relations"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListRelationsResponse:
"""Create an instance of V1beta1ListRelationsResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in relations (list)
_items = []
if self.relations:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListRelationsResponse:
"""Create an instance of V1beta1ListRelationsResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListRelationsResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListRelationsResponse.parse_obj({
"relations": [V1beta1Relation.from_dict(_item) for _item in obj.get("relations")] if obj.get("relations") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_resources_response.py b/frontier_api/models/v1beta1_list_resources_response.py
index d351597..9837c37 100644
--- a/frontier_api/models/v1beta1_list_resources_response.py
+++ b/frontier_api/models/v1beta1_list_resources_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_resource import V1beta1Resource
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListResourcesResponse(BaseModel):
"""
V1beta1ListResourcesResponse
- """ # noqa: E501
- resources: Optional[List[V1beta1Resource]] = None
- __properties: ClassVar[List[str]] = ["resources"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ resources: Optional[conlist(V1beta1Resource)] = None
+ __properties = ["resources"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListResourcesResponse:
"""Create an instance of V1beta1ListResourcesResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in resources (list)
_items = []
if self.resources:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListResourcesResponse:
"""Create an instance of V1beta1ListResourcesResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListResourcesResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListResourcesResponse.parse_obj({
"resources": [V1beta1Resource.from_dict(_item) for _item in obj.get("resources")] if obj.get("resources") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_roles_response.py b/frontier_api/models/v1beta1_list_roles_response.py
index b362fda..b359226 100644
--- a/frontier_api/models/v1beta1_list_roles_response.py
+++ b/frontier_api/models/v1beta1_list_roles_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_role import V1beta1Role
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListRolesResponse(BaseModel):
"""
V1beta1ListRolesResponse
- """ # noqa: E501
- roles: Optional[List[V1beta1Role]] = None
- __properties: ClassVar[List[str]] = ["roles"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ roles: Optional[conlist(V1beta1Role)] = None
+ __properties = ["roles"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListRolesResponse:
"""Create an instance of V1beta1ListRolesResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in roles (list)
_items = []
if self.roles:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListRolesResponse:
"""Create an instance of V1beta1ListRolesResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListRolesResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListRolesResponse.parse_obj({
"roles": [V1beta1Role.from_dict(_item) for _item in obj.get("roles")] if obj.get("roles") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_service_user_keys_response.py b/frontier_api/models/v1beta1_list_service_user_keys_response.py
index 3b40463..a4a7ed4 100644
--- a/frontier_api/models/v1beta1_list_service_user_keys_response.py
+++ b/frontier_api/models/v1beta1_list_service_user_keys_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_service_user_key import V1beta1ServiceUserKey
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListServiceUserKeysResponse(BaseModel):
"""
V1beta1ListServiceUserKeysResponse
- """ # noqa: E501
- keys: Optional[List[V1beta1ServiceUserKey]] = None
- __properties: ClassVar[List[str]] = ["keys"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ keys: Optional[conlist(V1beta1ServiceUserKey)] = None
+ __properties = ["keys"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListServiceUserKeysResponse:
"""Create an instance of V1beta1ListServiceUserKeysResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in keys (list)
_items = []
if self.keys:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListServiceUserKeysResponse:
"""Create an instance of V1beta1ListServiceUserKeysResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListServiceUserKeysResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListServiceUserKeysResponse.parse_obj({
"keys": [V1beta1ServiceUserKey.from_dict(_item) for _item in obj.get("keys")] if obj.get("keys") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_service_user_secrets_response.py b/frontier_api/models/v1beta1_list_service_user_secrets_response.py
index d660151..5321975 100644
--- a/frontier_api/models/v1beta1_list_service_user_secrets_response.py
+++ b/frontier_api/models/v1beta1_list_service_user_secrets_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_secret_credential import V1beta1SecretCredential
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListServiceUserSecretsResponse(BaseModel):
"""
V1beta1ListServiceUserSecretsResponse
- """ # noqa: E501
- secrets: Optional[List[V1beta1SecretCredential]] = None
- __properties: ClassVar[List[str]] = ["secrets"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ secrets: Optional[conlist(V1beta1SecretCredential)] = None
+ __properties = ["secrets"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListServiceUserSecretsResponse:
"""Create an instance of V1beta1ListServiceUserSecretsResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in secrets (list)
_items = []
if self.secrets:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListServiceUserSecretsResponse:
"""Create an instance of V1beta1ListServiceUserSecretsResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListServiceUserSecretsResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListServiceUserSecretsResponse.parse_obj({
"secrets": [V1beta1SecretCredential.from_dict(_item) for _item in obj.get("secrets")] if obj.get("secrets") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_service_users_response.py b/frontier_api/models/v1beta1_list_service_users_response.py
index 1671783..42159f3 100644
--- a/frontier_api/models/v1beta1_list_service_users_response.py
+++ b/frontier_api/models/v1beta1_list_service_users_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_service_user import V1beta1ServiceUser
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListServiceUsersResponse(BaseModel):
"""
V1beta1ListServiceUsersResponse
- """ # noqa: E501
- serviceusers: Optional[List[V1beta1ServiceUser]] = None
- __properties: ClassVar[List[str]] = ["serviceusers"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ serviceusers: Optional[conlist(V1beta1ServiceUser)] = None
+ __properties = ["serviceusers"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListServiceUsersResponse:
"""Create an instance of V1beta1ListServiceUsersResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in serviceusers (list)
_items = []
if self.serviceusers:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListServiceUsersResponse:
"""Create an instance of V1beta1ListServiceUsersResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListServiceUsersResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListServiceUsersResponse.parse_obj({
"serviceusers": [V1beta1ServiceUser.from_dict(_item) for _item in obj.get("serviceusers")] if obj.get("serviceusers") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_subscriptions_response.py b/frontier_api/models/v1beta1_list_subscriptions_response.py
index a96dad5..da631df 100644
--- a/frontier_api/models/v1beta1_list_subscriptions_response.py
+++ b/frontier_api/models/v1beta1_list_subscriptions_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_subscription import V1beta1Subscription
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListSubscriptionsResponse(BaseModel):
"""
V1beta1ListSubscriptionsResponse
- """ # noqa: E501
- subscriptions: Optional[List[V1beta1Subscription]] = None
- __properties: ClassVar[List[str]] = ["subscriptions"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ subscriptions: Optional[conlist(V1beta1Subscription)] = None
+ __properties = ["subscriptions"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListSubscriptionsResponse:
"""Create an instance of V1beta1ListSubscriptionsResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in subscriptions (list)
_items = []
if self.subscriptions:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListSubscriptionsResponse:
"""Create an instance of V1beta1ListSubscriptionsResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListSubscriptionsResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListSubscriptionsResponse.parse_obj({
"subscriptions": [V1beta1Subscription.from_dict(_item) for _item in obj.get("subscriptions")] if obj.get("subscriptions") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_user_groups_response.py b/frontier_api/models/v1beta1_list_user_groups_response.py
index f3ccf21..3dc97cc 100644
--- a/frontier_api/models/v1beta1_list_user_groups_response.py
+++ b/frontier_api/models/v1beta1_list_user_groups_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_group import V1beta1Group
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListUserGroupsResponse(BaseModel):
"""
V1beta1ListUserGroupsResponse
- """ # noqa: E501
- groups: Optional[List[V1beta1Group]] = None
- __properties: ClassVar[List[str]] = ["groups"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ groups: Optional[conlist(V1beta1Group)] = None
+ __properties = ["groups"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListUserGroupsResponse:
"""Create an instance of V1beta1ListUserGroupsResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in groups (list)
_items = []
if self.groups:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListUserGroupsResponse:
"""Create an instance of V1beta1ListUserGroupsResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListUserGroupsResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListUserGroupsResponse.parse_obj({
"groups": [V1beta1Group.from_dict(_item) for _item in obj.get("groups")] if obj.get("groups") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_user_invitations_response.py b/frontier_api/models/v1beta1_list_user_invitations_response.py
index f20d5dc..2a38f57 100644
--- a/frontier_api/models/v1beta1_list_user_invitations_response.py
+++ b/frontier_api/models/v1beta1_list_user_invitations_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_invitation import V1beta1Invitation
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListUserInvitationsResponse(BaseModel):
"""
V1beta1ListUserInvitationsResponse
- """ # noqa: E501
- invitations: Optional[List[V1beta1Invitation]] = None
- __properties: ClassVar[List[str]] = ["invitations"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ invitations: Optional[conlist(V1beta1Invitation)] = None
+ __properties = ["invitations"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListUserInvitationsResponse:
"""Create an instance of V1beta1ListUserInvitationsResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in invitations (list)
_items = []
if self.invitations:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListUserInvitationsResponse:
"""Create an instance of V1beta1ListUserInvitationsResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListUserInvitationsResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListUserInvitationsResponse.parse_obj({
"invitations": [V1beta1Invitation.from_dict(_item) for _item in obj.get("invitations")] if obj.get("invitations") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_user_preferences_response.py b/frontier_api/models/v1beta1_list_user_preferences_response.py
index b584b9c..34eb796 100644
--- a/frontier_api/models/v1beta1_list_user_preferences_response.py
+++ b/frontier_api/models/v1beta1_list_user_preferences_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_preference import V1beta1Preference
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListUserPreferencesResponse(BaseModel):
"""
V1beta1ListUserPreferencesResponse
- """ # noqa: E501
- preferences: Optional[List[V1beta1Preference]] = None
- __properties: ClassVar[List[str]] = ["preferences"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ preferences: Optional[conlist(V1beta1Preference)] = None
+ __properties = ["preferences"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListUserPreferencesResponse:
"""Create an instance of V1beta1ListUserPreferencesResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in preferences (list)
_items = []
if self.preferences:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListUserPreferencesResponse:
"""Create an instance of V1beta1ListUserPreferencesResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListUserPreferencesResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListUserPreferencesResponse.parse_obj({
"preferences": [V1beta1Preference.from_dict(_item) for _item in obj.get("preferences")] if obj.get("preferences") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_list_users_response.py b/frontier_api/models/v1beta1_list_users_response.py
index 1febd09..47c33ec 100644
--- a/frontier_api/models/v1beta1_list_users_response.py
+++ b/frontier_api/models/v1beta1_list_users_response.py
@@ -19,58 +19,42 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictInt
+from typing import List, Optional
+from pydantic import BaseModel, StrictInt, conlist
from frontier_api.models.v1beta1_user import V1beta1User
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1ListUsersResponse(BaseModel):
"""
V1beta1ListUsersResponse
- """ # noqa: E501
+ """
count: Optional[StrictInt] = None
- users: Optional[List[V1beta1User]] = None
- __properties: ClassVar[List[str]] = ["count", "users"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ users: Optional[conlist(V1beta1User)] = None
+ __properties = ["count", "users"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ListUsersResponse:
"""Create an instance of V1beta1ListUsersResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in users (list)
_items = []
if self.users:
@@ -81,15 +65,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ListUsersResponse:
"""Create an instance of V1beta1ListUsersResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ListUsersResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ListUsersResponse.parse_obj({
"count": obj.get("count"),
"users": [V1beta1User.from_dict(_item) for _item in obj.get("users")] if obj.get("users") is not None else None
})
diff --git a/frontier_api/models/v1beta1_meta_schema.py b/frontier_api/models/v1beta1_meta_schema.py
index 18f542a..311c81a 100644
--- a/frontier_api/models/v1beta1_meta_schema.py
+++ b/frontier_api/models/v1beta1_meta_schema.py
@@ -19,78 +19,61 @@
import json
from datetime import datetime
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1MetaSchema(BaseModel):
"""
V1beta1MetaSchema
- """ # noqa: E501
- id: Optional[StrictStr] = Field(default=None, description="The unique metaschema uuid.")
+ """
+ id: Optional[StrictStr] = Field(None, description="The unique metaschema uuid.")
name: Optional[StrictStr] = None
- var_schema: Optional[StrictStr] = Field(default=None, description="The metaschema json schema.", alias="schema")
- created_at: Optional[datetime] = Field(default=None, description="The time when the metaschema was created.", alias="createdAt")
- updated_at: Optional[datetime] = Field(default=None, description="The time when the metaschema was updated.", alias="updatedAt")
- __properties: ClassVar[List[str]] = ["id", "name", "schema", "createdAt", "updatedAt"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ var_schema: Optional[StrictStr] = Field(None, alias="schema", description="The metaschema json schema.")
+ created_at: Optional[datetime] = Field(None, alias="createdAt", description="The time when the metaschema was created.")
+ updated_at: Optional[datetime] = Field(None, alias="updatedAt", description="The time when the metaschema was updated.")
+ __properties = ["id", "name", "schema", "createdAt", "updatedAt"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1MetaSchema:
"""Create an instance of V1beta1MetaSchema 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1MetaSchema:
"""Create an instance of V1beta1MetaSchema from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1MetaSchema.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1MetaSchema.parse_obj({
"id": obj.get("id"),
"name": obj.get("name"),
- "schema": obj.get("schema"),
- "createdAt": obj.get("createdAt"),
- "updatedAt": obj.get("updatedAt")
+ "var_schema": obj.get("schema"),
+ "created_at": obj.get("createdAt"),
+ "updated_at": obj.get("updatedAt")
})
return _obj
diff --git a/frontier_api/models/v1beta1_meta_schema_request_body.py b/frontier_api/models/v1beta1_meta_schema_request_body.py
index cc1ab71..b756811 100644
--- a/frontier_api/models/v1beta1_meta_schema_request_body.py
+++ b/frontier_api/models/v1beta1_meta_schema_request_body.py
@@ -19,72 +19,55 @@
import json
-from typing import Any, ClassVar, Dict, List
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+
+from pydantic import BaseModel, Field, StrictStr
class V1beta1MetaSchemaRequestBody(BaseModel):
"""
V1beta1MetaSchemaRequestBody
- """ # noqa: E501
- name: StrictStr = Field(description="The name of the metaschema. The name must be unique within the entire Frontier instance. The name can contain only alphanumeric characters, dashes and underscores.")
- var_schema: StrictStr = Field(description="The schema of the metaschema. The schema must be a valid JSON schema.Please refer to https://json-schema.org/ to know more about json schema.", alias="schema")
- __properties: ClassVar[List[str]] = ["name", "schema"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ name: StrictStr = Field(..., description="The name of the metaschema. The name must be unique within the entire Frontier instance. The name can contain only alphanumeric characters, dashes and underscores.")
+ var_schema: StrictStr = Field(..., alias="schema", description="The schema of the metaschema. The schema must be a valid JSON schema.Please refer to https://json-schema.org/ to know more about json schema.")
+ __properties = ["name", "schema"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1MetaSchemaRequestBody:
"""Create an instance of V1beta1MetaSchemaRequestBody 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1MetaSchemaRequestBody:
"""Create an instance of V1beta1MetaSchemaRequestBody from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1MetaSchemaRequestBody.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1MetaSchemaRequestBody.parse_obj({
"name": obj.get("name"),
- "schema": obj.get("schema")
+ "var_schema": obj.get("schema")
})
return _obj
diff --git a/frontier_api/models/v1beta1_namespace.py b/frontier_api/models/v1beta1_namespace.py
index 54f89d3..3af8c4d 100644
--- a/frontier_api/models/v1beta1_namespace.py
+++ b/frontier_api/models/v1beta1_namespace.py
@@ -19,78 +19,61 @@
import json
from datetime import datetime
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Any, Dict, Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1Namespace(BaseModel):
"""
V1beta1Namespace
- """ # noqa: E501
+ """
id: Optional[StrictStr] = None
name: Optional[StrictStr] = None
- metadata: Optional[Union[str, Any]] = None
- created_at: Optional[datetime] = Field(default=None, description="The time the namespace was created.", alias="createdAt")
- updated_at: Optional[datetime] = Field(default=None, description="The time the namespace was last updated.", alias="updatedAt")
- __properties: ClassVar[List[str]] = ["id", "name", "metadata", "createdAt", "updatedAt"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ metadata: Optional[Dict[str, Any]] = None
+ created_at: Optional[datetime] = Field(None, alias="createdAt", description="The time the namespace was created.")
+ updated_at: Optional[datetime] = Field(None, alias="updatedAt", description="The time the namespace was last updated.")
+ __properties = ["id", "name", "metadata", "createdAt", "updatedAt"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1Namespace:
"""Create an instance of V1beta1Namespace 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1Namespace:
"""Create an instance of V1beta1Namespace from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1Namespace.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1Namespace.parse_obj({
"id": obj.get("id"),
"name": obj.get("name"),
"metadata": obj.get("metadata"),
- "createdAt": obj.get("createdAt"),
- "updatedAt": obj.get("updatedAt")
+ "created_at": obj.get("createdAt"),
+ "updated_at": obj.get("updatedAt")
})
return _obj
diff --git a/frontier_api/models/v1beta1_organization.py b/frontier_api/models/v1beta1_organization.py
index bf71231..c0a5f7b 100644
--- a/frontier_api/models/v1beta1_organization.py
+++ b/frontier_api/models/v1beta1_organization.py
@@ -19,82 +19,65 @@
import json
from datetime import datetime
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Any, Dict, Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1Organization(BaseModel):
"""
V1beta1Organization
- """ # noqa: E501
+ """
id: Optional[StrictStr] = None
name: Optional[StrictStr] = None
title: Optional[StrictStr] = None
- metadata: Optional[Union[str, Any]] = None
- created_at: Optional[datetime] = Field(default=None, description="The time the organization was created.", alias="createdAt")
- updated_at: Optional[datetime] = Field(default=None, description="The time the organization was last updated.", alias="updatedAt")
- state: Optional[StrictStr] = Field(default=None, description="The state of the organization (enabled or disabled).")
- avatar: Optional[StrictStr] = Field(default=None, description="The base64 encoded image string of the organization avatar. Should be less than 2MB.")
- __properties: ClassVar[List[str]] = ["id", "name", "title", "metadata", "createdAt", "updatedAt", "state", "avatar"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
-
+ metadata: Optional[Dict[str, Any]] = None
+ created_at: Optional[datetime] = Field(None, alias="createdAt", description="The time the organization was created.")
+ updated_at: Optional[datetime] = Field(None, alias="updatedAt", description="The time the organization was last updated.")
+ state: Optional[StrictStr] = Field(None, description="The state of the organization (enabled or disabled).")
+ avatar: Optional[StrictStr] = Field(None, description="The base64 encoded image string of the organization avatar. Should be less than 2MB.")
+ __properties = ["id", "name", "title", "metadata", "createdAt", "updatedAt", "state", "avatar"]
+
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1Organization:
"""Create an instance of V1beta1Organization 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1Organization:
"""Create an instance of V1beta1Organization from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1Organization.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1Organization.parse_obj({
"id": obj.get("id"),
"name": obj.get("name"),
"title": obj.get("title"),
"metadata": obj.get("metadata"),
- "createdAt": obj.get("createdAt"),
- "updatedAt": obj.get("updatedAt"),
+ "created_at": obj.get("createdAt"),
+ "updated_at": obj.get("updatedAt"),
"state": obj.get("state"),
"avatar": obj.get("avatar")
})
diff --git a/frontier_api/models/v1beta1_organization_request_body.py b/frontier_api/models/v1beta1_organization_request_body.py
index 43f63f3..3fedd8f 100644
--- a/frontier_api/models/v1beta1_organization_request_body.py
+++ b/frontier_api/models/v1beta1_organization_request_body.py
@@ -19,72 +19,55 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Any, Dict, Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1OrganizationRequestBody(BaseModel):
"""
V1beta1OrganizationRequestBody
- """ # noqa: E501
- name: StrictStr = Field(description="The name of the organization. The name must be unique within the entire Frontier instance. The name can contain only alphanumeric characters, dashes and underscores.
*Example:*`\"frontier-org1-acme\"`")
- title: Optional[StrictStr] = Field(default=None, description="The title can contain any UTF-8 character, used to provide a human-readable name for the organization. Can also be left empty.
*Example*: `\"Acme Inc\"`")
- metadata: Optional[Union[str, Any]] = Field(default=None, description="Metadata object for organizations that can hold key value pairs defined in Organization Metaschema. The metadata object can be used to store arbitrary information about the organization such as labels, descriptions etc. The default Organization Metaschema contains labels and descripton fields. Update the Organization Metaschema to add more fields.
*Example*:`{\"labels\": {\"key\": \"value\"}, \"description\": \"Organization description\"}`")
- avatar: Optional[StrictStr] = Field(default=None, description="The avatar is base64 encoded image data of the user. Can also be left empty. The image should be less than 200KB. Should follow the regex pattern `^data:image/(png|jpg|jpeg|gif);base64,([a-zA-Z0-9+/]+={0,2})+$`.")
- __properties: ClassVar[List[str]] = ["name", "title", "metadata", "avatar"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ name: StrictStr = Field(..., description="The name of the organization. The name must be unique within the entire Frontier instance. The name can contain only alphanumeric characters, dashes and underscores.
*Example:*`\"frontier-org1-acme\"`")
+ title: Optional[StrictStr] = Field(None, description="The title can contain any UTF-8 character, used to provide a human-readable name for the organization. Can also be left empty.
*Example*: `\"Acme Inc\"`")
+ metadata: Optional[Dict[str, Any]] = Field(None, description="Metadata object for organizations that can hold key value pairs defined in Organization Metaschema. The metadata object can be used to store arbitrary information about the organization such as labels, descriptions etc. The default Organization Metaschema contains labels and descripton fields. Update the Organization Metaschema to add more fields.
*Example*:`{\"labels\": {\"key\": \"value\"}, \"description\": \"Organization description\"}`")
+ avatar: Optional[StrictStr] = Field(None, description="The avatar is base64 encoded image data of the user. Can also be left empty. The image should be less than 200KB. Should follow the regex pattern `^data:image/(png|jpg|jpeg|gif);base64,([a-zA-Z0-9+/]+={0,2})+$`.")
+ __properties = ["name", "title", "metadata", "avatar"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1OrganizationRequestBody:
"""Create an instance of V1beta1OrganizationRequestBody 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1OrganizationRequestBody:
"""Create an instance of V1beta1OrganizationRequestBody from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1OrganizationRequestBody.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1OrganizationRequestBody.parse_obj({
"name": obj.get("name"),
"title": obj.get("title"),
"metadata": obj.get("metadata"),
diff --git a/frontier_api/models/v1beta1_permission.py b/frontier_api/models/v1beta1_permission.py
index 1b7629c..402f0d2 100644
--- a/frontier_api/models/v1beta1_permission.py
+++ b/frontier_api/models/v1beta1_permission.py
@@ -19,81 +19,64 @@
import json
from datetime import datetime
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Any, Dict, Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1Permission(BaseModel):
"""
V1beta1Permission
- """ # noqa: E501
+ """
id: Optional[StrictStr] = None
name: Optional[StrictStr] = None
title: Optional[StrictStr] = None
- created_at: Optional[datetime] = Field(default=None, description="The time the permission was created.", alias="createdAt")
- updated_at: Optional[datetime] = Field(default=None, description="The time the permission was last updated.", alias="updatedAt")
+ created_at: Optional[datetime] = Field(None, alias="createdAt", description="The time the permission was created.")
+ updated_at: Optional[datetime] = Field(None, alias="updatedAt", description="The time the permission was last updated.")
namespace: Optional[StrictStr] = None
- metadata: Optional[Union[str, Any]] = None
- key: Optional[StrictStr] = Field(default=None, description="Permission path key is composed of three parts, 'service.resource.verb'. Where 'service.resource' works as a namespace for the 'verb'.")
- __properties: ClassVar[List[str]] = ["id", "name", "title", "createdAt", "updatedAt", "namespace", "metadata", "key"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ metadata: Optional[Dict[str, Any]] = None
+ key: Optional[StrictStr] = Field(None, description="Permission path key is composed of three parts, 'service.resource.verb'. Where 'service.resource' works as a namespace for the 'verb'.")
+ __properties = ["id", "name", "title", "createdAt", "updatedAt", "namespace", "metadata", "key"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1Permission:
"""Create an instance of V1beta1Permission 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1Permission:
"""Create an instance of V1beta1Permission from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1Permission.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1Permission.parse_obj({
"id": obj.get("id"),
"name": obj.get("name"),
"title": obj.get("title"),
- "createdAt": obj.get("createdAt"),
- "updatedAt": obj.get("updatedAt"),
+ "created_at": obj.get("createdAt"),
+ "updated_at": obj.get("updatedAt"),
"namespace": obj.get("namespace"),
"metadata": obj.get("metadata"),
"key": obj.get("key")
diff --git a/frontier_api/models/v1beta1_permission_request_body.py b/frontier_api/models/v1beta1_permission_request_body.py
index 0a73553..e9a26ca 100644
--- a/frontier_api/models/v1beta1_permission_request_body.py
+++ b/frontier_api/models/v1beta1_permission_request_body.py
@@ -19,73 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Any, Dict, Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1PermissionRequestBody(BaseModel):
"""
V1beta1PermissionRequestBody
- """ # noqa: E501
- name: Optional[StrictStr] = Field(default=None, description="The name of the permission. It should be unique across a Frontier instance and can contain only alphanumeric characters.")
- namespace: Optional[StrictStr] = Field(default=None, description="The namespace of the permission. The namespace should be in service/resource format.
*Example:*`compute/guardian`")
- metadata: Optional[Union[str, Any]] = Field(default=None, description="The metadata object for permissions that can hold key value pairs.")
- title: Optional[StrictStr] = Field(default=None, description="The title can contain any UTF-8 character, used to provide a human-readable name for the permissions. Can also be left empty.")
- key: Optional[StrictStr] = Field(default=None, description="Permission path key is composed of three parts, 'service.resource.verb'. Where 'service.resource' works as a namespace for the 'verb'. Namespace name cannot be `app` as it's reserved for core permissions.")
- __properties: ClassVar[List[str]] = ["name", "namespace", "metadata", "title", "key"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
-
+ """
+ name: Optional[StrictStr] = Field(None, description="The name of the permission. It should be unique across a Frontier instance and can contain only alphanumeric characters.")
+ namespace: Optional[StrictStr] = Field(None, description="The namespace of the permission. The namespace should be in service/resource format.
*Example:*`compute/guardian`")
+ metadata: Optional[Dict[str, Any]] = Field(None, description="The metadata object for permissions that can hold key value pairs.")
+ title: Optional[StrictStr] = Field(None, description="The title can contain any UTF-8 character, used to provide a human-readable name for the permissions. Can also be left empty.")
+ key: Optional[StrictStr] = Field(None, description="Permission path key is composed of three parts, 'service.resource.verb'. Where 'service.resource' works as a namespace for the 'verb'. Namespace name cannot be `app` as it's reserved for core permissions.")
+ __properties = ["name", "namespace", "metadata", "title", "key"]
+
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1PermissionRequestBody:
"""Create an instance of V1beta1PermissionRequestBody 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1PermissionRequestBody:
"""Create an instance of V1beta1PermissionRequestBody from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1PermissionRequestBody.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1PermissionRequestBody.parse_obj({
"name": obj.get("name"),
"namespace": obj.get("namespace"),
"metadata": obj.get("metadata"),
diff --git a/frontier_api/models/v1beta1_plan.py b/frontier_api/models/v1beta1_plan.py
index f83def8..463128d 100644
--- a/frontier_api/models/v1beta1_plan.py
+++ b/frontier_api/models/v1beta1_plan.py
@@ -19,66 +19,49 @@
import json
from datetime import datetime
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
+from typing import Any, Dict, List, Optional
+from pydantic import BaseModel, Field, StrictStr, conlist
from frontier_api.models.v1beta1_feature import V1beta1Feature
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1Plan(BaseModel):
"""
V1beta1Plan
- """ # noqa: E501
+ """
id: Optional[StrictStr] = None
name: Optional[StrictStr] = None
title: Optional[StrictStr] = None
description: Optional[StrictStr] = None
- features: Optional[List[V1beta1Feature]] = None
+ features: Optional[conlist(V1beta1Feature)] = None
interval: Optional[StrictStr] = None
- metadata: Optional[Union[str, Any]] = None
- created_at: Optional[datetime] = Field(default=None, alias="createdAt")
- updated_at: Optional[datetime] = Field(default=None, alias="updatedAt")
- __properties: ClassVar[List[str]] = ["id", "name", "title", "description", "features", "interval", "metadata", "createdAt", "updatedAt"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ metadata: Optional[Dict[str, Any]] = None
+ created_at: Optional[datetime] = Field(None, alias="createdAt")
+ updated_at: Optional[datetime] = Field(None, alias="updatedAt")
+ __properties = ["id", "name", "title", "description", "features", "interval", "metadata", "createdAt", "updatedAt"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1Plan:
"""Create an instance of V1beta1Plan 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in features (list)
_items = []
if self.features:
@@ -89,15 +72,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1Plan:
"""Create an instance of V1beta1Plan from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1Plan.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1Plan.parse_obj({
"id": obj.get("id"),
"name": obj.get("name"),
"title": obj.get("title"),
@@ -105,8 +88,8 @@ def from_dict(cls, obj: Dict) -> Self:
"features": [V1beta1Feature.from_dict(_item) for _item in obj.get("features")] if obj.get("features") is not None else None,
"interval": obj.get("interval"),
"metadata": obj.get("metadata"),
- "createdAt": obj.get("createdAt"),
- "updatedAt": obj.get("updatedAt")
+ "created_at": obj.get("createdAt"),
+ "updated_at": obj.get("updatedAt")
})
return _obj
diff --git a/frontier_api/models/v1beta1_plan_request_body.py b/frontier_api/models/v1beta1_plan_request_body.py
index e0301f7..e24b944 100644
--- a/frontier_api/models/v1beta1_plan_request_body.py
+++ b/frontier_api/models/v1beta1_plan_request_body.py
@@ -19,62 +19,46 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
+from typing import Any, Dict, List, Optional
+from pydantic import BaseModel, StrictStr, conlist
from frontier_api.models.v1beta1_feature import V1beta1Feature
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1PlanRequestBody(BaseModel):
"""
V1beta1PlanRequestBody
- """ # noqa: E501
+ """
name: Optional[StrictStr] = None
title: Optional[StrictStr] = None
description: Optional[StrictStr] = None
- features: Optional[List[V1beta1Feature]] = None
+ features: Optional[conlist(V1beta1Feature)] = None
interval: Optional[StrictStr] = None
- metadata: Optional[Union[str, Any]] = None
- __properties: ClassVar[List[str]] = ["name", "title", "description", "features", "interval", "metadata"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ metadata: Optional[Dict[str, Any]] = None
+ __properties = ["name", "title", "description", "features", "interval", "metadata"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1PlanRequestBody:
"""Create an instance of V1beta1PlanRequestBody 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in features (list)
_items = []
if self.features:
@@ -85,15 +69,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1PlanRequestBody:
"""Create an instance of V1beta1PlanRequestBody from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1PlanRequestBody.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1PlanRequestBody.parse_obj({
"name": obj.get("name"),
"title": obj.get("title"),
"description": obj.get("description"),
diff --git a/frontier_api/models/v1beta1_policy.py b/frontier_api/models/v1beta1_policy.py
index da189a7..3251467 100644
--- a/frontier_api/models/v1beta1_policy.py
+++ b/frontier_api/models/v1beta1_policy.py
@@ -19,81 +19,64 @@
import json
from datetime import datetime
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Any, Dict, Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1Policy(BaseModel):
"""
V1beta1Policy
- """ # noqa: E501
+ """
id: Optional[StrictStr] = None
title: Optional[StrictStr] = None
- created_at: Optional[datetime] = Field(default=None, description="The time the policy was created.", alias="createdAt")
- updated_at: Optional[datetime] = Field(default=None, description="The time the policy was last updated.", alias="updatedAt")
- role_id: Optional[StrictStr] = Field(default=None, alias="roleId")
+ created_at: Optional[datetime] = Field(None, alias="createdAt", description="The time the policy was created.")
+ updated_at: Optional[datetime] = Field(None, alias="updatedAt", description="The time the policy was last updated.")
+ role_id: Optional[StrictStr] = Field(None, alias="roleId")
resource: Optional[StrictStr] = None
principal: Optional[StrictStr] = None
- metadata: Optional[Union[str, Any]] = None
- __properties: ClassVar[List[str]] = ["id", "title", "createdAt", "updatedAt", "roleId", "resource", "principal", "metadata"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ metadata: Optional[Dict[str, Any]] = None
+ __properties = ["id", "title", "createdAt", "updatedAt", "roleId", "resource", "principal", "metadata"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1Policy:
"""Create an instance of V1beta1Policy 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1Policy:
"""Create an instance of V1beta1Policy from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1Policy.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1Policy.parse_obj({
"id": obj.get("id"),
"title": obj.get("title"),
- "createdAt": obj.get("createdAt"),
- "updatedAt": obj.get("updatedAt"),
- "roleId": obj.get("roleId"),
+ "created_at": obj.get("createdAt"),
+ "updated_at": obj.get("updatedAt"),
+ "role_id": obj.get("roleId"),
"resource": obj.get("resource"),
"principal": obj.get("principal"),
"metadata": obj.get("metadata")
diff --git a/frontier_api/models/v1beta1_policy_request_body.py b/frontier_api/models/v1beta1_policy_request_body.py
index c5cd8d9..9a57029 100644
--- a/frontier_api/models/v1beta1_policy_request_body.py
+++ b/frontier_api/models/v1beta1_policy_request_body.py
@@ -19,74 +19,57 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Any, Dict, Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1PolicyRequestBody(BaseModel):
"""
V1beta1PolicyRequestBody
- """ # noqa: E501
- role_id: StrictStr = Field(description="unique id of the role to which policy is assigned", alias="roleId")
- title: Optional[StrictStr] = Field(default=None, description="The title can contain any UTF-8 character, used to provide a human-readable name for the policy. Can also be left empty.
*Example:* `Policy title`")
- resource: StrictStr = Field(description="The resource to which policy is assigned in this format `namespace:uuid`.
*Example:* `app/guardian:70f69c3a-334b-4f25-90b8-4d4f3be6b8e2`")
- principal: StrictStr = Field(description="principal is the user or group to which policy is assigned. The principal id must be prefixed with its namespace id in this format `namespace:uuid`. The namespace can be `app/user`, `app/group` or `app/serviceuser` (coming up!) and uuid is the unique id of the principal.
*Example:* `app/user:92f69c3a-334b-4f25-90b8-4d4f3be6b825`")
- metadata: Optional[Union[str, Any]] = Field(default=None, description="Metadata object for policies that can hold key value pairs defined in Policy Metaschema.
*Example:* `{\"labels\": {\"key\": \"value\"}, \"description\": \"Policy description\"}`")
- __properties: ClassVar[List[str]] = ["roleId", "title", "resource", "principal", "metadata"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
-
+ """
+ role_id: StrictStr = Field(..., alias="roleId", description="unique id of the role to which policy is assigned")
+ title: Optional[StrictStr] = Field(None, description="The title can contain any UTF-8 character, used to provide a human-readable name for the policy. Can also be left empty.
*Example:* `Policy title`")
+ resource: StrictStr = Field(..., description="The resource to which policy is assigned in this format `namespace:uuid`.
*Example:* `app/guardian:70f69c3a-334b-4f25-90b8-4d4f3be6b8e2`")
+ principal: StrictStr = Field(..., description="principal is the user or group to which policy is assigned. The principal id must be prefixed with its namespace id in this format `namespace:uuid`. The namespace can be `app/user`, `app/group` or `app/serviceuser` (coming up!) and uuid is the unique id of the principal.
*Example:* `app/user:92f69c3a-334b-4f25-90b8-4d4f3be6b825`")
+ metadata: Optional[Dict[str, Any]] = Field(None, description="Metadata object for policies that can hold key value pairs defined in Policy Metaschema.
*Example:* `{\"labels\": {\"key\": \"value\"}, \"description\": \"Policy description\"}`")
+ __properties = ["roleId", "title", "resource", "principal", "metadata"]
+
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1PolicyRequestBody:
"""Create an instance of V1beta1PolicyRequestBody 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1PolicyRequestBody:
"""Create an instance of V1beta1PolicyRequestBody from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1PolicyRequestBody.parse_obj(obj)
- _obj = cls.model_validate({
- "roleId": obj.get("roleId"),
+ _obj = V1beta1PolicyRequestBody.parse_obj({
+ "role_id": obj.get("roleId"),
"title": obj.get("title"),
"resource": obj.get("resource"),
"principal": obj.get("principal"),
diff --git a/frontier_api/models/v1beta1_preference.py b/frontier_api/models/v1beta1_preference.py
index 711cfbd..35c2de2 100644
--- a/frontier_api/models/v1beta1_preference.py
+++ b/frontier_api/models/v1beta1_preference.py
@@ -19,82 +19,65 @@
import json
from datetime import datetime
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1Preference(BaseModel):
"""
V1beta1Preference
- """ # noqa: E501
+ """
id: Optional[StrictStr] = None
name: Optional[StrictStr] = None
value: Optional[StrictStr] = None
- resource_id: Optional[StrictStr] = Field(default=None, alias="resourceId")
- resource_type: Optional[StrictStr] = Field(default=None, alias="resourceType")
- created_at: Optional[datetime] = Field(default=None, description="The time when the preference was created.", alias="createdAt")
- updated_at: Optional[datetime] = Field(default=None, description="The time when the preference was updated.", alias="updatedAt")
- __properties: ClassVar[List[str]] = ["id", "name", "value", "resourceId", "resourceType", "createdAt", "updatedAt"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ resource_id: Optional[StrictStr] = Field(None, alias="resourceId")
+ resource_type: Optional[StrictStr] = Field(None, alias="resourceType")
+ created_at: Optional[datetime] = Field(None, alias="createdAt", description="The time when the preference was created.")
+ updated_at: Optional[datetime] = Field(None, alias="updatedAt", description="The time when the preference was updated.")
+ __properties = ["id", "name", "value", "resourceId", "resourceType", "createdAt", "updatedAt"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1Preference:
"""Create an instance of V1beta1Preference 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1Preference:
"""Create an instance of V1beta1Preference from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1Preference.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1Preference.parse_obj({
"id": obj.get("id"),
"name": obj.get("name"),
"value": obj.get("value"),
- "resourceId": obj.get("resourceId"),
- "resourceType": obj.get("resourceType"),
- "createdAt": obj.get("createdAt"),
- "updatedAt": obj.get("updatedAt")
+ "resource_id": obj.get("resourceId"),
+ "resource_type": obj.get("resourceType"),
+ "created_at": obj.get("createdAt"),
+ "updated_at": obj.get("updatedAt")
})
return _obj
diff --git a/frontier_api/models/v1beta1_preference_request_body.py b/frontier_api/models/v1beta1_preference_request_body.py
index ccece1b..b3168c4 100644
--- a/frontier_api/models/v1beta1_preference_request_body.py
+++ b/frontier_api/models/v1beta1_preference_request_body.py
@@ -19,69 +19,53 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel, StrictStr
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1PreferenceRequestBody(BaseModel):
"""
V1beta1PreferenceRequestBody
- """ # noqa: E501
+ """
name: Optional[StrictStr] = None
value: Optional[StrictStr] = None
- __properties: ClassVar[List[str]] = ["name", "value"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["name", "value"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1PreferenceRequestBody:
"""Create an instance of V1beta1PreferenceRequestBody 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1PreferenceRequestBody:
"""Create an instance of V1beta1PreferenceRequestBody from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1PreferenceRequestBody.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1PreferenceRequestBody.parse_obj({
"name": obj.get("name"),
"value": obj.get("value")
})
diff --git a/frontier_api/models/v1beta1_preference_trait.py b/frontier_api/models/v1beta1_preference_trait.py
index f5c6ab9..9fa8896 100644
--- a/frontier_api/models/v1beta1_preference_trait.py
+++ b/frontier_api/models/v1beta1_preference_trait.py
@@ -19,28 +19,23 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1PreferenceTrait(BaseModel):
"""
V1beta1PreferenceTrait
- """ # noqa: E501
- resource_type: Optional[StrictStr] = Field(default=None, alias="resourceType")
+ """
+ resource_type: Optional[StrictStr] = Field(None, alias="resourceType")
name: Optional[StrictStr] = None
title: Optional[StrictStr] = None
description: Optional[StrictStr] = None
- long_description: Optional[StrictStr] = Field(default=None, alias="longDescription")
+ long_description: Optional[StrictStr] = Field(None, alias="longDescription")
heading: Optional[StrictStr] = None
- sub_heading: Optional[StrictStr] = Field(default=None, alias="subHeading")
+ sub_heading: Optional[StrictStr] = Field(None, alias="subHeading")
breadcrumb: Optional[StrictStr] = None
default: Optional[StrictStr] = None
- input_hints: Optional[StrictStr] = Field(default=None, alias="inputHints")
+ input_hints: Optional[StrictStr] = Field(None, alias="inputHints")
text: Optional[StrictStr] = None
textarea: Optional[StrictStr] = None
select: Optional[StrictStr] = None
@@ -48,66 +43,54 @@ class V1beta1PreferenceTrait(BaseModel):
checkbox: Optional[StrictStr] = None
multiselect: Optional[StrictStr] = None
number: Optional[StrictStr] = None
- __properties: ClassVar[List[str]] = ["resourceType", "name", "title", "description", "longDescription", "heading", "subHeading", "breadcrumb", "default", "inputHints", "text", "textarea", "select", "combobox", "checkbox", "multiselect", "number"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["resourceType", "name", "title", "description", "longDescription", "heading", "subHeading", "breadcrumb", "default", "inputHints", "text", "textarea", "select", "combobox", "checkbox", "multiselect", "number"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1PreferenceTrait:
"""Create an instance of V1beta1PreferenceTrait 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1PreferenceTrait:
"""Create an instance of V1beta1PreferenceTrait from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1PreferenceTrait.parse_obj(obj)
- _obj = cls.model_validate({
- "resourceType": obj.get("resourceType"),
+ _obj = V1beta1PreferenceTrait.parse_obj({
+ "resource_type": obj.get("resourceType"),
"name": obj.get("name"),
"title": obj.get("title"),
"description": obj.get("description"),
- "longDescription": obj.get("longDescription"),
+ "long_description": obj.get("longDescription"),
"heading": obj.get("heading"),
- "subHeading": obj.get("subHeading"),
+ "sub_heading": obj.get("subHeading"),
"breadcrumb": obj.get("breadcrumb"),
"default": obj.get("default"),
- "inputHints": obj.get("inputHints"),
+ "input_hints": obj.get("inputHints"),
"text": obj.get("text"),
"textarea": obj.get("textarea"),
"select": obj.get("select"),
diff --git a/frontier_api/models/v1beta1_price.py b/frontier_api/models/v1beta1_price.py
index 2b0a621..1af9481 100644
--- a/frontier_api/models/v1beta1_price.py
+++ b/frontier_api/models/v1beta1_price.py
@@ -19,98 +19,81 @@
import json
from datetime import datetime
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Any, Dict, Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1Price(BaseModel):
"""
V1beta1Price
- """ # noqa: E501
+ """
id: Optional[StrictStr] = None
- feature_id: Optional[StrictStr] = Field(default=None, alias="featureId")
- provider_id: Optional[StrictStr] = Field(default=None, alias="providerId")
+ feature_id: Optional[StrictStr] = Field(None, alias="featureId")
+ provider_id: Optional[StrictStr] = Field(None, alias="providerId")
name: Optional[StrictStr] = None
interval: Optional[StrictStr] = None
- usage_type: Optional[StrictStr] = Field(default=None, alias="usageType")
- billing_scheme: Optional[StrictStr] = Field(default=None, alias="billingScheme")
+ usage_type: Optional[StrictStr] = Field(None, alias="usageType")
+ billing_scheme: Optional[StrictStr] = Field(None, alias="billingScheme")
state: Optional[StrictStr] = None
currency: Optional[StrictStr] = None
amount: Optional[StrictStr] = None
- metered_aggregate: Optional[StrictStr] = Field(default=None, alias="meteredAggregate")
- tier_mode: Optional[StrictStr] = Field(default=None, alias="tierMode")
- metadata: Optional[Union[str, Any]] = None
- created_at: Optional[datetime] = Field(default=None, alias="createdAt")
- updated_at: Optional[datetime] = Field(default=None, alias="updatedAt")
- __properties: ClassVar[List[str]] = ["id", "featureId", "providerId", "name", "interval", "usageType", "billingScheme", "state", "currency", "amount", "meteredAggregate", "tierMode", "metadata", "createdAt", "updatedAt"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
-
+ metered_aggregate: Optional[StrictStr] = Field(None, alias="meteredAggregate")
+ tier_mode: Optional[StrictStr] = Field(None, alias="tierMode")
+ metadata: Optional[Dict[str, Any]] = None
+ created_at: Optional[datetime] = Field(None, alias="createdAt")
+ updated_at: Optional[datetime] = Field(None, alias="updatedAt")
+ __properties = ["id", "featureId", "providerId", "name", "interval", "usageType", "billingScheme", "state", "currency", "amount", "meteredAggregate", "tierMode", "metadata", "createdAt", "updatedAt"]
+
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1Price:
"""Create an instance of V1beta1Price 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1Price:
"""Create an instance of V1beta1Price from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1Price.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1Price.parse_obj({
"id": obj.get("id"),
- "featureId": obj.get("featureId"),
- "providerId": obj.get("providerId"),
+ "feature_id": obj.get("featureId"),
+ "provider_id": obj.get("providerId"),
"name": obj.get("name"),
"interval": obj.get("interval"),
- "usageType": obj.get("usageType"),
- "billingScheme": obj.get("billingScheme"),
+ "usage_type": obj.get("usageType"),
+ "billing_scheme": obj.get("billingScheme"),
"state": obj.get("state"),
"currency": obj.get("currency"),
"amount": obj.get("amount"),
- "meteredAggregate": obj.get("meteredAggregate"),
- "tierMode": obj.get("tierMode"),
+ "metered_aggregate": obj.get("meteredAggregate"),
+ "tier_mode": obj.get("tierMode"),
"metadata": obj.get("metadata"),
- "createdAt": obj.get("createdAt"),
- "updatedAt": obj.get("updatedAt")
+ "created_at": obj.get("createdAt"),
+ "updated_at": obj.get("updatedAt")
})
return _obj
diff --git a/frontier_api/models/v1beta1_project.py b/frontier_api/models/v1beta1_project.py
index 57ac6cc..8138f1f 100644
--- a/frontier_api/models/v1beta1_project.py
+++ b/frontier_api/models/v1beta1_project.py
@@ -19,82 +19,68 @@
import json
from datetime import datetime
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Any, Dict, Optional
+from pydantic import BaseModel, Field, StrictInt, StrictStr
class V1beta1Project(BaseModel):
"""
V1beta1Project
- """ # noqa: E501
+ """
id: Optional[StrictStr] = None
name: Optional[StrictStr] = None
title: Optional[StrictStr] = None
- org_id: Optional[StrictStr] = Field(default=None, alias="orgId")
- metadata: Optional[Union[str, Any]] = None
- created_at: Optional[datetime] = Field(default=None, description="The time the project was created.", alias="createdAt")
- updated_at: Optional[datetime] = Field(default=None, description="The time the project was last updated.", alias="updatedAt")
- __properties: ClassVar[List[str]] = ["id", "name", "title", "orgId", "metadata", "createdAt", "updatedAt"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
-
+ org_id: Optional[StrictStr] = Field(None, alias="orgId")
+ metadata: Optional[Dict[str, Any]] = None
+ created_at: Optional[datetime] = Field(None, alias="createdAt", description="The time the project was created.")
+ updated_at: Optional[datetime] = Field(None, alias="updatedAt", description="The time the project was last updated.")
+ members_count: Optional[StrictInt] = Field(None, alias="membersCount", description="The number of members explicitly added in the project.")
+ __properties = ["id", "name", "title", "orgId", "metadata", "createdAt", "updatedAt", "membersCount"]
+
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1Project:
"""Create an instance of V1beta1Project 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ "members_count",
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1Project:
"""Create an instance of V1beta1Project from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1Project.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1Project.parse_obj({
"id": obj.get("id"),
"name": obj.get("name"),
"title": obj.get("title"),
- "orgId": obj.get("orgId"),
+ "org_id": obj.get("orgId"),
"metadata": obj.get("metadata"),
- "createdAt": obj.get("createdAt"),
- "updatedAt": obj.get("updatedAt")
+ "created_at": obj.get("createdAt"),
+ "updated_at": obj.get("updatedAt"),
+ "members_count": obj.get("membersCount")
})
return _obj
diff --git a/frontier_api/models/v1beta1_project_request_body.py b/frontier_api/models/v1beta1_project_request_body.py
index 5463472..af6ba6a 100644
--- a/frontier_api/models/v1beta1_project_request_body.py
+++ b/frontier_api/models/v1beta1_project_request_body.py
@@ -19,76 +19,59 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Any, Dict, Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1ProjectRequestBody(BaseModel):
"""
V1beta1ProjectRequestBody
- """ # noqa: E501
- name: StrictStr = Field(description="The name of the project. The name must be unique within the entire Frontier instance. The name can contain only alphanumeric characters, dashes and underscores.
*Example:* `frontier-playground`")
- title: Optional[StrictStr] = Field(default=None, description="The title can contain any UTF-8 character, used to provide a human-readable name for the project. Can also be left empty.
*Example:* `Frontier Playground`")
- metadata: Optional[Union[str, Any]] = Field(default=None, description="Metadata object for projects that can hold key value pairs defined in Project Metaschema.")
- org_id: StrictStr = Field(description="unique id of the organization to which project belongs", alias="orgId")
- __properties: ClassVar[List[str]] = ["name", "title", "metadata", "orgId"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ name: StrictStr = Field(..., description="The name of the project. The name must be unique within the entire Frontier instance. The name can contain only alphanumeric characters, dashes and underscores.
*Example:* `frontier-playground`")
+ title: Optional[StrictStr] = Field(None, description="The title can contain any UTF-8 character, used to provide a human-readable name for the project. Can also be left empty.
*Example:* `Frontier Playground`")
+ metadata: Optional[Dict[str, Any]] = Field(None, description="Metadata object for projects that can hold key value pairs defined in Project Metaschema.")
+ org_id: StrictStr = Field(..., alias="orgId", description="unique id of the organization to which project belongs")
+ __properties = ["name", "title", "metadata", "orgId"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ProjectRequestBody:
"""Create an instance of V1beta1ProjectRequestBody 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ProjectRequestBody:
"""Create an instance of V1beta1ProjectRequestBody from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ProjectRequestBody.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ProjectRequestBody.parse_obj({
"name": obj.get("name"),
"title": obj.get("title"),
"metadata": obj.get("metadata"),
- "orgId": obj.get("orgId")
+ "org_id": obj.get("orgId")
})
return _obj
diff --git a/frontier_api/models/v1beta1_relation.py b/frontier_api/models/v1beta1_relation.py
index adeeaf9..d9258cc 100644
--- a/frontier_api/models/v1beta1_relation.py
+++ b/frontier_api/models/v1beta1_relation.py
@@ -19,79 +19,62 @@
import json
from datetime import datetime
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1Relation(BaseModel):
"""
V1beta1Relation
- """ # noqa: E501
+ """
id: Optional[StrictStr] = None
- created_at: Optional[datetime] = Field(default=None, description="The time the relation was created.", alias="createdAt")
- updated_at: Optional[datetime] = Field(default=None, description="The time the relation was last updated.", alias="updatedAt")
- subject_sub_relation: Optional[StrictStr] = Field(default=None, alias="subjectSubRelation")
+ created_at: Optional[datetime] = Field(None, alias="createdAt", description="The time the relation was created.")
+ updated_at: Optional[datetime] = Field(None, alias="updatedAt", description="The time the relation was last updated.")
+ subject_sub_relation: Optional[StrictStr] = Field(None, alias="subjectSubRelation")
relation: Optional[StrictStr] = None
object: Optional[StrictStr] = None
subject: Optional[StrictStr] = None
- __properties: ClassVar[List[str]] = ["id", "createdAt", "updatedAt", "subjectSubRelation", "relation", "object", "subject"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["id", "createdAt", "updatedAt", "subjectSubRelation", "relation", "object", "subject"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1Relation:
"""Create an instance of V1beta1Relation 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1Relation:
"""Create an instance of V1beta1Relation from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1Relation.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1Relation.parse_obj({
"id": obj.get("id"),
- "createdAt": obj.get("createdAt"),
- "updatedAt": obj.get("updatedAt"),
- "subjectSubRelation": obj.get("subjectSubRelation"),
+ "created_at": obj.get("createdAt"),
+ "updated_at": obj.get("updatedAt"),
+ "subject_sub_relation": obj.get("subjectSubRelation"),
"relation": obj.get("relation"),
"object": obj.get("object"),
"subject": obj.get("subject")
diff --git a/frontier_api/models/v1beta1_relation_request_body.py b/frontier_api/models/v1beta1_relation_request_body.py
index 3034bfa..4d92ae2 100644
--- a/frontier_api/models/v1beta1_relation_request_body.py
+++ b/frontier_api/models/v1beta1_relation_request_body.py
@@ -19,76 +19,59 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1RelationRequestBody(BaseModel):
"""
V1beta1RelationRequestBody
- """ # noqa: E501
+ """
object: Optional[StrictStr] = None
subject: Optional[StrictStr] = None
relation: Optional[StrictStr] = None
- subject_sub_relation: Optional[StrictStr] = Field(default=None, alias="subjectSubRelation")
- __properties: ClassVar[List[str]] = ["object", "subject", "relation", "subjectSubRelation"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ subject_sub_relation: Optional[StrictStr] = Field(None, alias="subjectSubRelation")
+ __properties = ["object", "subject", "relation", "subjectSubRelation"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1RelationRequestBody:
"""Create an instance of V1beta1RelationRequestBody 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1RelationRequestBody:
"""Create an instance of V1beta1RelationRequestBody from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1RelationRequestBody.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1RelationRequestBody.parse_obj({
"object": obj.get("object"),
"subject": obj.get("subject"),
"relation": obj.get("relation"),
- "subjectSubRelation": obj.get("subjectSubRelation")
+ "subject_sub_relation": obj.get("subjectSubRelation")
})
return _obj
diff --git a/frontier_api/models/v1beta1_resource.py b/frontier_api/models/v1beta1_resource.py
index 8b25bc2..6283767 100644
--- a/frontier_api/models/v1beta1_resource.py
+++ b/frontier_api/models/v1beta1_resource.py
@@ -19,84 +19,67 @@
import json
from datetime import datetime
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Any, Dict, Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1Resource(BaseModel):
"""
V1beta1Resource
- """ # noqa: E501
+ """
id: Optional[StrictStr] = None
- name: Optional[StrictStr] = Field(default=None, description="Name of the resource. Must be unique within the project.")
- created_at: Optional[datetime] = Field(default=None, description="The time the resource was created.", alias="createdAt")
- updated_at: Optional[datetime] = Field(default=None, description="The time the resource was last updated.", alias="updatedAt")
+ name: Optional[StrictStr] = Field(None, description="Name of the resource. Must be unique within the project.")
+ created_at: Optional[datetime] = Field(None, alias="createdAt", description="The time the resource was created.")
+ updated_at: Optional[datetime] = Field(None, alias="updatedAt", description="The time the resource was last updated.")
urn: Optional[StrictStr] = None
- project_id: Optional[StrictStr] = Field(default=None, alias="projectId")
+ project_id: Optional[StrictStr] = Field(None, alias="projectId")
namespace: Optional[StrictStr] = None
principal: Optional[StrictStr] = None
- metadata: Optional[Union[str, Any]] = None
+ metadata: Optional[Dict[str, Any]] = None
title: Optional[StrictStr] = None
- __properties: ClassVar[List[str]] = ["id", "name", "createdAt", "updatedAt", "urn", "projectId", "namespace", "principal", "metadata", "title"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["id", "name", "createdAt", "updatedAt", "urn", "projectId", "namespace", "principal", "metadata", "title"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1Resource:
"""Create an instance of V1beta1Resource 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1Resource:
"""Create an instance of V1beta1Resource from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1Resource.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1Resource.parse_obj({
"id": obj.get("id"),
"name": obj.get("name"),
- "createdAt": obj.get("createdAt"),
- "updatedAt": obj.get("updatedAt"),
+ "created_at": obj.get("createdAt"),
+ "updated_at": obj.get("updatedAt"),
"urn": obj.get("urn"),
- "projectId": obj.get("projectId"),
+ "project_id": obj.get("projectId"),
"namespace": obj.get("namespace"),
"principal": obj.get("principal"),
"metadata": obj.get("metadata"),
diff --git a/frontier_api/models/v1beta1_resource_request_body.py b/frontier_api/models/v1beta1_resource_request_body.py
index 2362cbc..1fc40a8 100644
--- a/frontier_api/models/v1beta1_resource_request_body.py
+++ b/frontier_api/models/v1beta1_resource_request_body.py
@@ -19,73 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Any, Dict, Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1ResourceRequestBody(BaseModel):
"""
V1beta1ResourceRequestBody
- """ # noqa: E501
- name: StrictStr = Field(description="The name of the resource. Must be unique within the project.
*Example:* `my-resource`")
- title: Optional[StrictStr] = Field(default=None, description="The title can contain any UTF-8 character, used to provide a human-readable name for the resource. Can also be left empty.")
- namespace: StrictStr = Field(description="The namespace of the resource. The resource namespace are created when permissions for that resource is created in Frontier. If namespace doesn't exists the request will fail.
*Example:* `compute/instance`")
- principal: Optional[StrictStr] = Field(default=None, description="UserID or ServiceUserID that should be marked as owner of the resource. If not provided, the current logged in user will be made the resource owner.
*Example:* `user:92f69c3a-334b-4f25-90b8-4d4f3be6b825`")
- metadata: Optional[Union[str, Any]] = None
- __properties: ClassVar[List[str]] = ["name", "title", "namespace", "principal", "metadata"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
-
+ """
+ name: StrictStr = Field(..., description="The name of the resource. Must be unique within the project.
*Example:* `my-resource`")
+ title: Optional[StrictStr] = Field(None, description="The title can contain any UTF-8 character, used to provide a human-readable name for the resource. Can also be left empty.")
+ namespace: StrictStr = Field(..., description="The namespace of the resource. The resource namespace are created when permissions for that resource is created in Frontier. If namespace doesn't exists the request will fail.
*Example:* `compute/instance`")
+ principal: Optional[StrictStr] = Field(None, description="UserID or ServiceUserID that should be marked as owner of the resource. If not provided, the current logged in user will be made the resource owner.
*Example:* `user:92f69c3a-334b-4f25-90b8-4d4f3be6b825`")
+ metadata: Optional[Dict[str, Any]] = None
+ __properties = ["name", "title", "namespace", "principal", "metadata"]
+
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ResourceRequestBody:
"""Create an instance of V1beta1ResourceRequestBody 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ResourceRequestBody:
"""Create an instance of V1beta1ResourceRequestBody from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ResourceRequestBody.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ResourceRequestBody.parse_obj({
"name": obj.get("name"),
"title": obj.get("title"),
"namespace": obj.get("namespace"),
diff --git a/frontier_api/models/v1beta1_role.py b/frontier_api/models/v1beta1_role.py
index b35effd..c626a5a 100644
--- a/frontier_api/models/v1beta1_role.py
+++ b/frontier_api/models/v1beta1_role.py
@@ -19,86 +19,69 @@
import json
from datetime import datetime
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Any, Dict, List, Optional
+from pydantic import BaseModel, Field, StrictStr, conlist
class V1beta1Role(BaseModel):
"""
V1beta1Role
- """ # noqa: E501
+ """
id: Optional[StrictStr] = None
name: Optional[StrictStr] = None
- permissions: Optional[List[StrictStr]] = None
+ permissions: Optional[conlist(StrictStr)] = None
title: Optional[StrictStr] = None
- metadata: Optional[Union[str, Any]] = None
- created_at: Optional[datetime] = Field(default=None, description="The time the role was created.", alias="createdAt")
- updated_at: Optional[datetime] = Field(default=None, description="The time the role was last updated.", alias="updatedAt")
- org_id: Optional[StrictStr] = Field(default=None, alias="orgId")
+ metadata: Optional[Dict[str, Any]] = None
+ created_at: Optional[datetime] = Field(None, alias="createdAt", description="The time the role was created.")
+ updated_at: Optional[datetime] = Field(None, alias="updatedAt", description="The time the role was last updated.")
+ org_id: Optional[StrictStr] = Field(None, alias="orgId")
state: Optional[StrictStr] = None
- scopes: Optional[List[StrictStr]] = None
- __properties: ClassVar[List[str]] = ["id", "name", "permissions", "title", "metadata", "createdAt", "updatedAt", "orgId", "state", "scopes"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ scopes: Optional[conlist(StrictStr)] = None
+ __properties = ["id", "name", "permissions", "title", "metadata", "createdAt", "updatedAt", "orgId", "state", "scopes"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1Role:
"""Create an instance of V1beta1Role 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1Role:
"""Create an instance of V1beta1Role from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1Role.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1Role.parse_obj({
"id": obj.get("id"),
"name": obj.get("name"),
"permissions": obj.get("permissions"),
"title": obj.get("title"),
"metadata": obj.get("metadata"),
- "createdAt": obj.get("createdAt"),
- "updatedAt": obj.get("updatedAt"),
- "orgId": obj.get("orgId"),
+ "created_at": obj.get("createdAt"),
+ "updated_at": obj.get("updatedAt"),
+ "org_id": obj.get("orgId"),
"state": obj.get("state"),
"scopes": obj.get("scopes")
})
diff --git a/frontier_api/models/v1beta1_role_request_body.py b/frontier_api/models/v1beta1_role_request_body.py
index 20523e5..972411e 100644
--- a/frontier_api/models/v1beta1_role_request_body.py
+++ b/frontier_api/models/v1beta1_role_request_body.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Any, Dict, List, Optional
+from pydantic import BaseModel, StrictStr, conlist
class V1beta1RoleRequestBody(BaseModel):
"""
V1beta1RoleRequestBody
- """ # noqa: E501
+ """
name: Optional[StrictStr] = None
- permissions: Optional[List[StrictStr]] = None
- metadata: Optional[Union[str, Any]] = None
+ permissions: Optional[conlist(StrictStr)] = None
+ metadata: Optional[Dict[str, Any]] = None
title: Optional[StrictStr] = None
- scopes: Optional[List[StrictStr]] = None
- __properties: ClassVar[List[str]] = ["name", "permissions", "metadata", "title", "scopes"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ scopes: Optional[conlist(StrictStr)] = None
+ __properties = ["name", "permissions", "metadata", "title", "scopes"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1RoleRequestBody:
"""Create an instance of V1beta1RoleRequestBody 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1RoleRequestBody:
"""Create an instance of V1beta1RoleRequestBody from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1RoleRequestBody.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1RoleRequestBody.parse_obj({
"name": obj.get("name"),
"permissions": obj.get("permissions"),
"metadata": obj.get("metadata"),
diff --git a/frontier_api/models/v1beta1_secret_credential.py b/frontier_api/models/v1beta1_secret_credential.py
index fa63380..0494cf0 100644
--- a/frontier_api/models/v1beta1_secret_credential.py
+++ b/frontier_api/models/v1beta1_secret_credential.py
@@ -19,78 +19,60 @@
import json
from datetime import datetime
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1SecretCredential(BaseModel):
"""
V1beta1SecretCredential
- """ # noqa: E501
+ """
id: Optional[StrictStr] = None
title: Optional[StrictStr] = None
secret: Optional[StrictStr] = None
- created_at: Optional[datetime] = Field(default=None, description="The time when the secret was created.", alias="createdAt")
- __properties: ClassVar[List[str]] = ["id", "title", "secret", "createdAt"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ created_at: Optional[datetime] = Field(None, alias="createdAt", description="The time when the secret was created.")
+ __properties = ["id", "title", "secret", "createdAt"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1SecretCredential:
"""Create an instance of V1beta1SecretCredential 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.
- * OpenAPI `readOnly` fields are excluded.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- "secret",
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ "secret",
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1SecretCredential:
"""Create an instance of V1beta1SecretCredential from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1SecretCredential.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1SecretCredential.parse_obj({
"id": obj.get("id"),
"title": obj.get("title"),
"secret": obj.get("secret"),
- "createdAt": obj.get("createdAt")
+ "created_at": obj.get("createdAt")
})
return _obj
diff --git a/frontier_api/models/v1beta1_service_user.py b/frontier_api/models/v1beta1_service_user.py
index 04e3a98..930c3b8 100644
--- a/frontier_api/models/v1beta1_service_user.py
+++ b/frontier_api/models/v1beta1_service_user.py
@@ -19,82 +19,65 @@
import json
from datetime import datetime
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Any, Dict, Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1ServiceUser(BaseModel):
"""
V1beta1ServiceUser
- """ # noqa: E501
+ """
id: Optional[StrictStr] = None
- title: Optional[StrictStr] = Field(default=None, description="User friendly name of the service user.")
- metadata: Optional[Union[str, Any]] = None
- created_at: Optional[datetime] = Field(default=None, description="The time the user was created.", alias="createdAt")
- updated_at: Optional[datetime] = Field(default=None, description="The time the user was last updated.", alias="updatedAt")
+ title: Optional[StrictStr] = Field(None, description="User friendly name of the service user.")
+ metadata: Optional[Dict[str, Any]] = None
+ created_at: Optional[datetime] = Field(None, alias="createdAt", description="The time the user was created.")
+ updated_at: Optional[datetime] = Field(None, alias="updatedAt", description="The time the user was last updated.")
state: Optional[StrictStr] = None
- org_id: Optional[StrictStr] = Field(default=None, alias="orgId")
- __properties: ClassVar[List[str]] = ["id", "title", "metadata", "createdAt", "updatedAt", "state", "orgId"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ org_id: Optional[StrictStr] = Field(None, alias="orgId")
+ __properties = ["id", "title", "metadata", "createdAt", "updatedAt", "state", "orgId"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ServiceUser:
"""Create an instance of V1beta1ServiceUser 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ServiceUser:
"""Create an instance of V1beta1ServiceUser from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ServiceUser.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ServiceUser.parse_obj({
"id": obj.get("id"),
"title": obj.get("title"),
"metadata": obj.get("metadata"),
- "createdAt": obj.get("createdAt"),
- "updatedAt": obj.get("updatedAt"),
+ "created_at": obj.get("createdAt"),
+ "updated_at": obj.get("updatedAt"),
"state": obj.get("state"),
- "orgId": obj.get("orgId")
+ "org_id": obj.get("orgId")
})
return _obj
diff --git a/frontier_api/models/v1beta1_service_user_key.py b/frontier_api/models/v1beta1_service_user_key.py
index 98c6365..714c25c 100644
--- a/frontier_api/models/v1beta1_service_user_key.py
+++ b/frontier_api/models/v1beta1_service_user_key.py
@@ -19,80 +19,62 @@
import json
from datetime import datetime
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1ServiceUserKey(BaseModel):
"""
V1beta1ServiceUserKey
- """ # noqa: E501
+ """
id: Optional[StrictStr] = None
title: Optional[StrictStr] = None
- principal_id: Optional[StrictStr] = Field(default=None, alias="principalId")
- public_key: Optional[StrictStr] = Field(default=None, alias="publicKey")
- created_at: Optional[datetime] = Field(default=None, description="The time when the secret was created.", alias="createdAt")
- __properties: ClassVar[List[str]] = ["id", "title", "principalId", "publicKey", "createdAt"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ principal_id: Optional[StrictStr] = Field(None, alias="principalId")
+ public_key: Optional[StrictStr] = Field(None, alias="publicKey")
+ created_at: Optional[datetime] = Field(None, alias="createdAt", description="The time when the secret was created.")
+ __properties = ["id", "title", "principalId", "publicKey", "createdAt"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ServiceUserKey:
"""Create an instance of V1beta1ServiceUserKey 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.
- * OpenAPI `readOnly` fields are excluded.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- "public_key",
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ "public_key",
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ServiceUserKey:
"""Create an instance of V1beta1ServiceUserKey from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ServiceUserKey.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ServiceUserKey.parse_obj({
"id": obj.get("id"),
"title": obj.get("title"),
- "principalId": obj.get("principalId"),
- "publicKey": obj.get("publicKey"),
- "createdAt": obj.get("createdAt")
+ "principal_id": obj.get("principalId"),
+ "public_key": obj.get("publicKey"),
+ "created_at": obj.get("createdAt")
})
return _obj
diff --git a/frontier_api/models/v1beta1_service_user_request_body.py b/frontier_api/models/v1beta1_service_user_request_body.py
index a1b6fa9..b4966f4 100644
--- a/frontier_api/models/v1beta1_service_user_request_body.py
+++ b/frontier_api/models/v1beta1_service_user_request_body.py
@@ -19,70 +19,53 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Any, Dict, Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1ServiceUserRequestBody(BaseModel):
"""
V1beta1ServiceUserRequestBody
- """ # noqa: E501
- title: Optional[StrictStr] = Field(default=None, description="User friendly name of the service user.")
- metadata: Optional[Union[str, Any]] = None
- __properties: ClassVar[List[str]] = ["title", "metadata"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ title: Optional[StrictStr] = Field(None, description="User friendly name of the service user.")
+ metadata: Optional[Dict[str, Any]] = None
+ __properties = ["title", "metadata"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1ServiceUserRequestBody:
"""Create an instance of V1beta1ServiceUserRequestBody 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1ServiceUserRequestBody:
"""Create an instance of V1beta1ServiceUserRequestBody from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1ServiceUserRequestBody.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1ServiceUserRequestBody.parse_obj({
"title": obj.get("title"),
"metadata": obj.get("metadata")
})
diff --git a/frontier_api/models/v1beta1_subscription.py b/frontier_api/models/v1beta1_subscription.py
index f78e4b7..2cc4134 100644
--- a/frontier_api/models/v1beta1_subscription.py
+++ b/frontier_api/models/v1beta1_subscription.py
@@ -19,90 +19,73 @@
import json
from datetime import datetime
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictInt, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Any, Dict, Optional
+from pydantic import BaseModel, Field, StrictInt, StrictStr
class V1beta1Subscription(BaseModel):
"""
V1beta1Subscription
- """ # noqa: E501
+ """
id: Optional[StrictStr] = None
- customer_id: Optional[StrictStr] = Field(default=None, alias="customerId")
- provider_id: Optional[StrictStr] = Field(default=None, alias="providerId")
- plan_id: Optional[StrictStr] = Field(default=None, alias="planId")
+ customer_id: Optional[StrictStr] = Field(None, alias="customerId")
+ provider_id: Optional[StrictStr] = Field(None, alias="providerId")
+ plan_id: Optional[StrictStr] = Field(None, alias="planId")
state: Optional[StrictStr] = None
- trial_days: Optional[StrictInt] = Field(default=None, alias="trialDays")
- metadata: Optional[Union[str, Any]] = None
- created_at: Optional[datetime] = Field(default=None, alias="createdAt")
- updated_at: Optional[datetime] = Field(default=None, alias="updatedAt")
- canceled_at: Optional[datetime] = Field(default=None, alias="canceledAt")
- ended_at: Optional[datetime] = Field(default=None, alias="endedAt")
- __properties: ClassVar[List[str]] = ["id", "customerId", "providerId", "planId", "state", "trialDays", "metadata", "createdAt", "updatedAt", "canceledAt", "endedAt"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
-
+ trial_days: Optional[StrictInt] = Field(None, alias="trialDays")
+ metadata: Optional[Dict[str, Any]] = None
+ created_at: Optional[datetime] = Field(None, alias="createdAt")
+ updated_at: Optional[datetime] = Field(None, alias="updatedAt")
+ canceled_at: Optional[datetime] = Field(None, alias="canceledAt")
+ ended_at: Optional[datetime] = Field(None, alias="endedAt")
+ __properties = ["id", "customerId", "providerId", "planId", "state", "trialDays", "metadata", "createdAt", "updatedAt", "canceledAt", "endedAt"]
+
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1Subscription:
"""Create an instance of V1beta1Subscription 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1Subscription:
"""Create an instance of V1beta1Subscription from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1Subscription.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1Subscription.parse_obj({
"id": obj.get("id"),
- "customerId": obj.get("customerId"),
- "providerId": obj.get("providerId"),
- "planId": obj.get("planId"),
+ "customer_id": obj.get("customerId"),
+ "provider_id": obj.get("providerId"),
+ "plan_id": obj.get("planId"),
"state": obj.get("state"),
- "trialDays": obj.get("trialDays"),
+ "trial_days": obj.get("trialDays"),
"metadata": obj.get("metadata"),
- "createdAt": obj.get("createdAt"),
- "updatedAt": obj.get("updatedAt"),
- "canceledAt": obj.get("canceledAt"),
- "endedAt": obj.get("endedAt")
+ "created_at": obj.get("createdAt"),
+ "updated_at": obj.get("updatedAt"),
+ "canceled_at": obj.get("canceledAt"),
+ "ended_at": obj.get("endedAt")
})
return _obj
diff --git a/frontier_api/models/v1beta1_update_billing_account_response.py b/frontier_api/models/v1beta1_update_billing_account_response.py
index 7427f47..bfa90fe 100644
--- a/frontier_api/models/v1beta1_update_billing_account_response.py
+++ b/frontier_api/models/v1beta1_update_billing_account_response.py
@@ -19,74 +19,57 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
-from pydantic import Field
+from typing import Optional
+from pydantic import BaseModel, Field
from frontier_api.models.v1beta1_billing_account import V1beta1BillingAccount
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1UpdateBillingAccountResponse(BaseModel):
"""
V1beta1UpdateBillingAccountResponse
- """ # noqa: E501
- billing_account: Optional[V1beta1BillingAccount] = Field(default=None, alias="billingAccount")
- __properties: ClassVar[List[str]] = ["billingAccount"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ billing_account: Optional[V1beta1BillingAccount] = Field(None, alias="billingAccount")
+ __properties = ["billingAccount"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1UpdateBillingAccountResponse:
"""Create an instance of V1beta1UpdateBillingAccountResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of billing_account
if self.billing_account:
_dict['billingAccount'] = self.billing_account.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1UpdateBillingAccountResponse:
"""Create an instance of V1beta1UpdateBillingAccountResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1UpdateBillingAccountResponse.parse_obj(obj)
- _obj = cls.model_validate({
- "billingAccount": V1beta1BillingAccount.from_dict(obj.get("billingAccount")) if obj.get("billingAccount") is not None else None
+ _obj = V1beta1UpdateBillingAccountResponse.parse_obj({
+ "billing_account": V1beta1BillingAccount.from_dict(obj.get("billingAccount")) if obj.get("billingAccount") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_update_current_user_response.py b/frontier_api/models/v1beta1_update_current_user_response.py
index ce9dba8..eee4113 100644
--- a/frontier_api/models/v1beta1_update_current_user_response.py
+++ b/frontier_api/models/v1beta1_update_current_user_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_user import V1beta1User
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1UpdateCurrentUserResponse(BaseModel):
"""
V1beta1UpdateCurrentUserResponse
- """ # noqa: E501
+ """
user: Optional[V1beta1User] = None
- __properties: ClassVar[List[str]] = ["user"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["user"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1UpdateCurrentUserResponse:
"""Create an instance of V1beta1UpdateCurrentUserResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of user
if self.user:
_dict['user'] = self.user.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1UpdateCurrentUserResponse:
"""Create an instance of V1beta1UpdateCurrentUserResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1UpdateCurrentUserResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1UpdateCurrentUserResponse.parse_obj({
"user": V1beta1User.from_dict(obj.get("user")) if obj.get("user") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_update_feature_response.py b/frontier_api/models/v1beta1_update_feature_response.py
index d2ebfb9..3df47cb 100644
--- a/frontier_api/models/v1beta1_update_feature_response.py
+++ b/frontier_api/models/v1beta1_update_feature_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_feature import V1beta1Feature
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1UpdateFeatureResponse(BaseModel):
"""
V1beta1UpdateFeatureResponse
- """ # noqa: E501
+ """
feature: Optional[V1beta1Feature] = None
- __properties: ClassVar[List[str]] = ["feature"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["feature"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1UpdateFeatureResponse:
"""Create an instance of V1beta1UpdateFeatureResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of feature
if self.feature:
_dict['feature'] = self.feature.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1UpdateFeatureResponse:
"""Create an instance of V1beta1UpdateFeatureResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1UpdateFeatureResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1UpdateFeatureResponse.parse_obj({
"feature": V1beta1Feature.from_dict(obj.get("feature")) if obj.get("feature") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_update_group_response.py b/frontier_api/models/v1beta1_update_group_response.py
index 543bf0c..901ce72 100644
--- a/frontier_api/models/v1beta1_update_group_response.py
+++ b/frontier_api/models/v1beta1_update_group_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_group import V1beta1Group
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1UpdateGroupResponse(BaseModel):
"""
V1beta1UpdateGroupResponse
- """ # noqa: E501
+ """
group: Optional[V1beta1Group] = None
- __properties: ClassVar[List[str]] = ["group"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["group"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1UpdateGroupResponse:
"""Create an instance of V1beta1UpdateGroupResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of group
if self.group:
_dict['group'] = self.group.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1UpdateGroupResponse:
"""Create an instance of V1beta1UpdateGroupResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1UpdateGroupResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1UpdateGroupResponse.parse_obj({
"group": V1beta1Group.from_dict(obj.get("group")) if obj.get("group") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_update_meta_schema_response.py b/frontier_api/models/v1beta1_update_meta_schema_response.py
index 34b16fb..89e4995 100644
--- a/frontier_api/models/v1beta1_update_meta_schema_response.py
+++ b/frontier_api/models/v1beta1_update_meta_schema_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_meta_schema import V1beta1MetaSchema
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1UpdateMetaSchemaResponse(BaseModel):
"""
V1beta1UpdateMetaSchemaResponse
- """ # noqa: E501
+ """
metaschema: Optional[V1beta1MetaSchema] = None
- __properties: ClassVar[List[str]] = ["metaschema"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["metaschema"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1UpdateMetaSchemaResponse:
"""Create an instance of V1beta1UpdateMetaSchemaResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of metaschema
if self.metaschema:
_dict['metaschema'] = self.metaschema.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1UpdateMetaSchemaResponse:
"""Create an instance of V1beta1UpdateMetaSchemaResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1UpdateMetaSchemaResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1UpdateMetaSchemaResponse.parse_obj({
"metaschema": V1beta1MetaSchema.from_dict(obj.get("metaschema")) if obj.get("metaschema") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_update_organization_response.py b/frontier_api/models/v1beta1_update_organization_response.py
index 55e63d3..1b90d24 100644
--- a/frontier_api/models/v1beta1_update_organization_response.py
+++ b/frontier_api/models/v1beta1_update_organization_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_organization import V1beta1Organization
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1UpdateOrganizationResponse(BaseModel):
"""
V1beta1UpdateOrganizationResponse
- """ # noqa: E501
+ """
organization: Optional[V1beta1Organization] = None
- __properties: ClassVar[List[str]] = ["organization"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["organization"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1UpdateOrganizationResponse:
"""Create an instance of V1beta1UpdateOrganizationResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of organization
if self.organization:
_dict['organization'] = self.organization.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1UpdateOrganizationResponse:
"""Create an instance of V1beta1UpdateOrganizationResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1UpdateOrganizationResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1UpdateOrganizationResponse.parse_obj({
"organization": V1beta1Organization.from_dict(obj.get("organization")) if obj.get("organization") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_update_organization_role_response.py b/frontier_api/models/v1beta1_update_organization_role_response.py
index 80e797f..1b19998 100644
--- a/frontier_api/models/v1beta1_update_organization_role_response.py
+++ b/frontier_api/models/v1beta1_update_organization_role_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_role import V1beta1Role
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1UpdateOrganizationRoleResponse(BaseModel):
"""
V1beta1UpdateOrganizationRoleResponse
- """ # noqa: E501
+ """
role: Optional[V1beta1Role] = None
- __properties: ClassVar[List[str]] = ["role"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["role"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1UpdateOrganizationRoleResponse:
"""Create an instance of V1beta1UpdateOrganizationRoleResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of role
if self.role:
_dict['role'] = self.role.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1UpdateOrganizationRoleResponse:
"""Create an instance of V1beta1UpdateOrganizationRoleResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1UpdateOrganizationRoleResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1UpdateOrganizationRoleResponse.parse_obj({
"role": V1beta1Role.from_dict(obj.get("role")) if obj.get("role") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_update_permission_response.py b/frontier_api/models/v1beta1_update_permission_response.py
index bf2197e..de015a0 100644
--- a/frontier_api/models/v1beta1_update_permission_response.py
+++ b/frontier_api/models/v1beta1_update_permission_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_permission import V1beta1Permission
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1UpdatePermissionResponse(BaseModel):
"""
V1beta1UpdatePermissionResponse
- """ # noqa: E501
+ """
permission: Optional[V1beta1Permission] = None
- __properties: ClassVar[List[str]] = ["permission"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["permission"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1UpdatePermissionResponse:
"""Create an instance of V1beta1UpdatePermissionResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of permission
if self.permission:
_dict['permission'] = self.permission.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1UpdatePermissionResponse:
"""Create an instance of V1beta1UpdatePermissionResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1UpdatePermissionResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1UpdatePermissionResponse.parse_obj({
"permission": V1beta1Permission.from_dict(obj.get("permission")) if obj.get("permission") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_update_plan_response.py b/frontier_api/models/v1beta1_update_plan_response.py
index adcbf3f..8b4dbf4 100644
--- a/frontier_api/models/v1beta1_update_plan_response.py
+++ b/frontier_api/models/v1beta1_update_plan_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_plan import V1beta1Plan
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1UpdatePlanResponse(BaseModel):
"""
V1beta1UpdatePlanResponse
- """ # noqa: E501
+ """
plan: Optional[V1beta1Plan] = None
- __properties: ClassVar[List[str]] = ["plan"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["plan"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1UpdatePlanResponse:
"""Create an instance of V1beta1UpdatePlanResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of plan
if self.plan:
_dict['plan'] = self.plan.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1UpdatePlanResponse:
"""Create an instance of V1beta1UpdatePlanResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1UpdatePlanResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1UpdatePlanResponse.parse_obj({
"plan": V1beta1Plan.from_dict(obj.get("plan")) if obj.get("plan") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_update_policy_response.py b/frontier_api/models/v1beta1_update_policy_response.py
index 7bf3ff9..0955699 100644
--- a/frontier_api/models/v1beta1_update_policy_response.py
+++ b/frontier_api/models/v1beta1_update_policy_response.py
@@ -19,57 +19,41 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
-from pydantic import BaseModel
+from typing import List, Optional
+from pydantic import BaseModel, conlist
from frontier_api.models.v1beta1_policy import V1beta1Policy
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1UpdatePolicyResponse(BaseModel):
"""
V1beta1UpdatePolicyResponse
- """ # noqa: E501
- policies: Optional[List[V1beta1Policy]] = None
- __properties: ClassVar[List[str]] = ["policies"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ """
+ policies: Optional[conlist(V1beta1Policy)] = None
+ __properties = ["policies"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1UpdatePolicyResponse:
"""Create an instance of V1beta1UpdatePolicyResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of each item in policies (list)
_items = []
if self.policies:
@@ -80,15 +64,15 @@ def to_dict(self) -> Dict[str, Any]:
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1UpdatePolicyResponse:
"""Create an instance of V1beta1UpdatePolicyResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1UpdatePolicyResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1UpdatePolicyResponse.parse_obj({
"policies": [V1beta1Policy.from_dict(_item) for _item in obj.get("policies")] if obj.get("policies") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_update_project_resource_response.py b/frontier_api/models/v1beta1_update_project_resource_response.py
index dcf5a74..d0f10bf 100644
--- a/frontier_api/models/v1beta1_update_project_resource_response.py
+++ b/frontier_api/models/v1beta1_update_project_resource_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_resource import V1beta1Resource
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1UpdateProjectResourceResponse(BaseModel):
"""
V1beta1UpdateProjectResourceResponse
- """ # noqa: E501
+ """
resource: Optional[V1beta1Resource] = None
- __properties: ClassVar[List[str]] = ["resource"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["resource"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1UpdateProjectResourceResponse:
"""Create an instance of V1beta1UpdateProjectResourceResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of resource
if self.resource:
_dict['resource'] = self.resource.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1UpdateProjectResourceResponse:
"""Create an instance of V1beta1UpdateProjectResourceResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1UpdateProjectResourceResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1UpdateProjectResourceResponse.parse_obj({
"resource": V1beta1Resource.from_dict(obj.get("resource")) if obj.get("resource") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_update_project_response.py b/frontier_api/models/v1beta1_update_project_response.py
index 617549a..52abf9f 100644
--- a/frontier_api/models/v1beta1_update_project_response.py
+++ b/frontier_api/models/v1beta1_update_project_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_project import V1beta1Project
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1UpdateProjectResponse(BaseModel):
"""
V1beta1UpdateProjectResponse
- """ # noqa: E501
+ """
project: Optional[V1beta1Project] = None
- __properties: ClassVar[List[str]] = ["project"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["project"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1UpdateProjectResponse:
"""Create an instance of V1beta1UpdateProjectResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of project
if self.project:
_dict['project'] = self.project.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1UpdateProjectResponse:
"""Create an instance of V1beta1UpdateProjectResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1UpdateProjectResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1UpdateProjectResponse.parse_obj({
"project": V1beta1Project.from_dict(obj.get("project")) if obj.get("project") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_update_role_response.py b/frontier_api/models/v1beta1_update_role_response.py
index 0a1b68a..94544c9 100644
--- a/frontier_api/models/v1beta1_update_role_response.py
+++ b/frontier_api/models/v1beta1_update_role_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_role import V1beta1Role
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1UpdateRoleResponse(BaseModel):
"""
V1beta1UpdateRoleResponse
- """ # noqa: E501
+ """
role: Optional[V1beta1Role] = None
- __properties: ClassVar[List[str]] = ["role"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["role"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1UpdateRoleResponse:
"""Create an instance of V1beta1UpdateRoleResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of role
if self.role:
_dict['role'] = self.role.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1UpdateRoleResponse:
"""Create an instance of V1beta1UpdateRoleResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1UpdateRoleResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1UpdateRoleResponse.parse_obj({
"role": V1beta1Role.from_dict(obj.get("role")) if obj.get("role") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_update_subscription_response.py b/frontier_api/models/v1beta1_update_subscription_response.py
index 812614d..bf03e7a 100644
--- a/frontier_api/models/v1beta1_update_subscription_response.py
+++ b/frontier_api/models/v1beta1_update_subscription_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_subscription import V1beta1Subscription
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1UpdateSubscriptionResponse(BaseModel):
"""
V1beta1UpdateSubscriptionResponse
- """ # noqa: E501
+ """
subscription: Optional[V1beta1Subscription] = None
- __properties: ClassVar[List[str]] = ["subscription"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["subscription"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1UpdateSubscriptionResponse:
"""Create an instance of V1beta1UpdateSubscriptionResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of subscription
if self.subscription:
_dict['subscription'] = self.subscription.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1UpdateSubscriptionResponse:
"""Create an instance of V1beta1UpdateSubscriptionResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1UpdateSubscriptionResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1UpdateSubscriptionResponse.parse_obj({
"subscription": V1beta1Subscription.from_dict(obj.get("subscription")) if obj.get("subscription") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_update_user_response.py b/frontier_api/models/v1beta1_update_user_response.py
index 2f318ae..2ecaed3 100644
--- a/frontier_api/models/v1beta1_update_user_response.py
+++ b/frontier_api/models/v1beta1_update_user_response.py
@@ -19,72 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel
from frontier_api.models.v1beta1_user import V1beta1User
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1UpdateUserResponse(BaseModel):
"""
V1beta1UpdateUserResponse
- """ # noqa: E501
+ """
user: Optional[V1beta1User] = None
- __properties: ClassVar[List[str]] = ["user"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["user"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1UpdateUserResponse:
"""Create an instance of V1beta1UpdateUserResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
# override the default output from pydantic by calling `to_dict()` of user
if self.user:
_dict['user'] = self.user.to_dict()
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1UpdateUserResponse:
"""Create an instance of V1beta1UpdateUserResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1UpdateUserResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1UpdateUserResponse.parse_obj({
"user": V1beta1User.from_dict(obj.get("user")) if obj.get("user") is not None else None
})
return _obj
diff --git a/frontier_api/models/v1beta1_usage.py b/frontier_api/models/v1beta1_usage.py
index c23d8db..8439999 100644
--- a/frontier_api/models/v1beta1_usage.py
+++ b/frontier_api/models/v1beta1_usage.py
@@ -19,86 +19,69 @@
import json
from datetime import datetime
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Any, Dict, Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1Usage(BaseModel):
"""
V1beta1Usage
- """ # noqa: E501
+ """
id: Optional[StrictStr] = None
- customer_id: Optional[StrictStr] = Field(default=None, alias="customerId")
+ customer_id: Optional[StrictStr] = Field(None, alias="customerId")
source: Optional[StrictStr] = None
description: Optional[StrictStr] = None
type: Optional[StrictStr] = None
amount: Optional[StrictStr] = None
- metadata: Optional[Union[str, Any]] = None
- created_at: Optional[datetime] = Field(default=None, alias="createdAt")
- updated_at: Optional[datetime] = Field(default=None, alias="updatedAt")
- __properties: ClassVar[List[str]] = ["id", "customerId", "source", "description", "type", "amount", "metadata", "createdAt", "updatedAt"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ metadata: Optional[Dict[str, Any]] = None
+ created_at: Optional[datetime] = Field(None, alias="createdAt")
+ updated_at: Optional[datetime] = Field(None, alias="updatedAt")
+ __properties = ["id", "customerId", "source", "description", "type", "amount", "metadata", "createdAt", "updatedAt"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1Usage:
"""Create an instance of V1beta1Usage 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1Usage:
"""Create an instance of V1beta1Usage from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1Usage.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1Usage.parse_obj({
"id": obj.get("id"),
- "customerId": obj.get("customerId"),
+ "customer_id": obj.get("customerId"),
"source": obj.get("source"),
"description": obj.get("description"),
"type": obj.get("type"),
"amount": obj.get("amount"),
"metadata": obj.get("metadata"),
- "createdAt": obj.get("createdAt"),
- "updatedAt": obj.get("updatedAt")
+ "created_at": obj.get("createdAt"),
+ "updated_at": obj.get("updatedAt")
})
return _obj
diff --git a/frontier_api/models/v1beta1_user.py b/frontier_api/models/v1beta1_user.py
index 76207ef..eac5da7 100644
--- a/frontier_api/models/v1beta1_user.py
+++ b/frontier_api/models/v1beta1_user.py
@@ -19,84 +19,67 @@
import json
from datetime import datetime
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Any, Dict, Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1User(BaseModel):
"""
V1beta1User
- """ # noqa: E501
+ """
id: Optional[StrictStr] = None
- name: Optional[StrictStr] = Field(default=None, description="Unique name of the user.")
- title: Optional[StrictStr] = Field(default=None, description="Name of the user.")
+ name: Optional[StrictStr] = Field(None, description="Unique name of the user.")
+ title: Optional[StrictStr] = Field(None, description="Name of the user.")
email: Optional[StrictStr] = None
- metadata: Optional[Union[str, Any]] = None
- created_at: Optional[datetime] = Field(default=None, description="The time the user was created.", alias="createdAt")
- updated_at: Optional[datetime] = Field(default=None, description="The time the user was last updated.", alias="updatedAt")
- state: Optional[StrictStr] = Field(default=None, description="The state of the user (enabled or disabled).")
- avatar: Optional[StrictStr] = Field(default=None, description="The base64 encoded image string of the user avatar. Should be less than 2MB.")
- __properties: ClassVar[List[str]] = ["id", "name", "title", "email", "metadata", "createdAt", "updatedAt", "state", "avatar"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
-
+ metadata: Optional[Dict[str, Any]] = None
+ created_at: Optional[datetime] = Field(None, alias="createdAt", description="The time the user was created.")
+ updated_at: Optional[datetime] = Field(None, alias="updatedAt", description="The time the user was last updated.")
+ state: Optional[StrictStr] = Field(None, description="The state of the user (enabled or disabled).")
+ avatar: Optional[StrictStr] = Field(None, description="The base64 encoded image string of the user avatar. Should be less than 2MB.")
+ __properties = ["id", "name", "title", "email", "metadata", "createdAt", "updatedAt", "state", "avatar"]
+
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1User:
"""Create an instance of V1beta1User 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1User:
"""Create an instance of V1beta1User from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1User.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1User.parse_obj({
"id": obj.get("id"),
"name": obj.get("name"),
"title": obj.get("title"),
"email": obj.get("email"),
"metadata": obj.get("metadata"),
- "createdAt": obj.get("createdAt"),
- "updatedAt": obj.get("updatedAt"),
+ "created_at": obj.get("createdAt"),
+ "updated_at": obj.get("updatedAt"),
"state": obj.get("state"),
"avatar": obj.get("avatar")
})
diff --git a/frontier_api/models/v1beta1_user_request_body.py b/frontier_api/models/v1beta1_user_request_body.py
index 2539bc2..6e6e336 100644
--- a/frontier_api/models/v1beta1_user_request_body.py
+++ b/frontier_api/models/v1beta1_user_request_body.py
@@ -19,73 +19,56 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional, Union
-from pydantic import BaseModel, StrictStr
-from pydantic import Field
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
+from typing import Any, Dict, Optional
+from pydantic import BaseModel, Field, StrictStr
class V1beta1UserRequestBody(BaseModel):
"""
V1beta1UserRequestBody
- """ # noqa: E501
- name: Optional[StrictStr] = Field(default=None, description="The name of the user. The name must be unique within the entire Frontier instance. The name can contain only alphanumeric characters, dashes and underscores and must start with a letter. If not provided, Frontier automatically generates a name from the user email. ")
- email: StrictStr = Field(description="The email of the user. The email must be unique within the entire Frontier instance.
*Example:*`\"john.doe@raystack.org\"`")
- metadata: Optional[Union[str, Any]] = Field(default=None, description="Metadata object for users that can hold key value pairs pre-defined in User Metaschema. The metadata object can be used to store arbitrary information about the user such as label, description etc. By default the user metaschema contains labels and descriptions for the user. Update the same to add more fields to the user metadata object.
*Example:*`{\"label\": {\"key1\": \"value1\"}, \"description\": \"User Description\"}`")
- title: Optional[StrictStr] = Field(default=None, description="The title can contain any UTF-8 character, used to provide a human-readable name for the user. Can also be left empty.
*Example:*`\"John Doe\"`")
- avatar: Optional[StrictStr] = Field(default=None, description="The avatar is base64 encoded image data of the user. Can also be left empty. The image should be less than 200KB. Should follow the regex pattern `^data:image/(png|jpg|jpeg|gif);base64,([a-zA-Z0-9+/]+={0,2})+$`.")
- __properties: ClassVar[List[str]] = ["name", "email", "metadata", "title", "avatar"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
-
+ """
+ name: Optional[StrictStr] = Field(None, description="The name of the user. The name must be unique within the entire Frontier instance. The name can contain only alphanumeric characters, dashes and underscores and must start with a letter. If not provided, Frontier automatically generates a name from the user email. ")
+ email: StrictStr = Field(..., description="The email of the user. The email must be unique within the entire Frontier instance.
*Example:*`\"john.doe@raystack.org\"`")
+ metadata: Optional[Dict[str, Any]] = Field(None, description="Metadata object for users that can hold key value pairs pre-defined in User Metaschema. The metadata object can be used to store arbitrary information about the user such as label, description etc. By default the user metaschema contains labels and descriptions for the user. Update the same to add more fields to the user metadata object.
*Example:*`{\"label\": {\"key1\": \"value1\"}, \"description\": \"User Description\"}`")
+ title: Optional[StrictStr] = Field(None, description="The title can contain any UTF-8 character, used to provide a human-readable name for the user. Can also be left empty.
*Example:*`\"John Doe\"`")
+ avatar: Optional[StrictStr] = Field(None, description="The avatar is base64 encoded image data of the user. Can also be left empty. The image should be less than 200KB. Should follow the regex pattern `^data:image/(png|jpg|jpeg|gif);base64,([a-zA-Z0-9+/]+={0,2})+$`.")
+ __properties = ["name", "email", "metadata", "title", "avatar"]
+
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1UserRequestBody:
"""Create an instance of V1beta1UserRequestBody 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1UserRequestBody:
"""Create an instance of V1beta1UserRequestBody from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1UserRequestBody.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1UserRequestBody.parse_obj({
"name": obj.get("name"),
"email": obj.get("email"),
"metadata": obj.get("metadata"),
diff --git a/frontier_api/models/v1beta1_verify_organization_domain_response.py b/frontier_api/models/v1beta1_verify_organization_domain_response.py
index d81af10..d82ed8a 100644
--- a/frontier_api/models/v1beta1_verify_organization_domain_response.py
+++ b/frontier_api/models/v1beta1_verify_organization_domain_response.py
@@ -19,68 +19,52 @@
import json
-from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional
from pydantic import BaseModel, StrictStr
-try:
- from typing import Self
-except ImportError:
- from typing_extensions import Self
class V1beta1VerifyOrganizationDomainResponse(BaseModel):
"""
V1beta1VerifyOrganizationDomainResponse
- """ # noqa: E501
+ """
state: Optional[StrictStr] = None
- __properties: ClassVar[List[str]] = ["state"]
-
- model_config = {
- "populate_by_name": True,
- "validate_assignment": True
- }
+ __properties = ["state"]
+ class Config:
+ """Pydantic configuration"""
+ allow_population_by_field_name = True
+ validate_assignment = True
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
- return pprint.pformat(self.model_dump(by_alias=True))
+ return pprint.pformat(self.dict(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) -> Self:
+ def from_json(cls, json_str: str) -> V1beta1VerifyOrganizationDomainResponse:
"""Create an instance of V1beta1VerifyOrganizationDomainResponse 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.
- """
- _dict = self.model_dump(
- by_alias=True,
- exclude={
- },
- exclude_none=True,
- )
+ def to_dict(self):
+ """Returns the dictionary representation of the model using alias"""
+ _dict = self.dict(by_alias=True,
+ exclude={
+ },
+ exclude_none=True)
return _dict
@classmethod
- def from_dict(cls, obj: Dict) -> Self:
+ def from_dict(cls, obj: dict) -> V1beta1VerifyOrganizationDomainResponse:
"""Create an instance of V1beta1VerifyOrganizationDomainResponse from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
- return cls.model_validate(obj)
+ return V1beta1VerifyOrganizationDomainResponse.parse_obj(obj)
- _obj = cls.model_validate({
+ _obj = V1beta1VerifyOrganizationDomainResponse.parse_obj({
"state": obj.get("state")
})
return _obj
diff --git a/frontier_api/rest.py b/frontier_api/rest.py
index 94fa012..8600001 100644
--- a/frontier_api/rest.py
+++ b/frontier_api/rest.py
@@ -15,43 +15,43 @@
import io
import json
+import logging
import re
import ssl
+from urllib.parse import urlencode, quote_plus
import urllib3
-from frontier_api.exceptions import ApiException, ApiValueError
+from frontier_api.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError, BadRequestException
+
+
+logger = logging.getLogger(__name__)
-RESTResponseType = urllib3.HTTPResponse
class RESTResponse(io.IOBase):
def __init__(self, resp) -> None:
- self.response = resp
+ self.urllib3_response = resp
self.status = resp.status
self.reason = resp.reason
- self.data = None
-
- def read(self):
- if self.data is None:
- self.data = self.response.data
- return self.data
+ self.data = resp.data
def getheaders(self):
"""Returns a dictionary of the response headers."""
- return self.response.headers
+ return self.urllib3_response.headers
def getheader(self, name, default=None):
"""Returns a given response header."""
- return self.response.headers.get(name, default)
+ return self.urllib3_response.headers.get(name, default)
class RESTClientObject:
- def __init__(self, configuration) -> None:
+ def __init__(self, configuration, pools_size=4, maxsize=None) -> None:
# urllib3.PoolManager will pass all kw parameters to connectionpool
# https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501
# https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501
+ # maxsize is the number of requests to host that are allowed in parallel # noqa: E501
# Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501
# cert_reqs
@@ -62,9 +62,7 @@ def __init__(self, configuration) -> None:
addition_pool_args = {}
if configuration.assert_hostname is not None:
- addition_pool_args['assert_hostname'] = (
- configuration.assert_hostname
- )
+ addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501
if configuration.retries is not None:
addition_pool_args['retries'] = configuration.retries
@@ -76,9 +74,17 @@ def __init__(self, configuration) -> None:
if configuration.socket_options is not None:
addition_pool_args['socket_options'] = configuration.socket_options
+ if maxsize is None:
+ if configuration.connection_pool_maxsize is not None:
+ maxsize = configuration.connection_pool_maxsize
+ else:
+ maxsize = 4
+
# https pool manager
if configuration.proxy:
self.pool_manager = urllib3.ProxyManager(
+ num_pools=pools_size,
+ maxsize=maxsize,
cert_reqs=cert_reqs,
ca_certs=configuration.ssl_ca_cert,
cert_file=configuration.cert_file,
@@ -89,6 +95,8 @@ def __init__(self, configuration) -> None:
)
else:
self.pool_manager = urllib3.PoolManager(
+ num_pools=pools_size,
+ maxsize=maxsize,
cert_reqs=cert_reqs,
ca_certs=configuration.ssl_ca_cert,
cert_file=configuration.cert_file,
@@ -96,39 +104,30 @@ def __init__(self, configuration) -> None:
**addition_pool_args
)
- def request(
- self,
- method,
- url,
- headers=None,
- body=None,
- post_params=None,
- _request_timeout=None
- ):
+ def request(self, method, url, query_params=None, headers=None,
+ body=None, post_params=None, _preload_content=True,
+ _request_timeout=None):
"""Perform requests.
:param method: http request method
:param url: http request url
+ :param query_params: query parameters in the url
:param headers: http request headers
:param body: request json body, for `application/json`
:param post_params: request post parameters,
`application/x-www-form-urlencoded`
and `multipart/form-data`
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
: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.
"""
method = method.upper()
- assert method in [
- 'GET',
- 'HEAD',
- 'DELETE',
- 'POST',
- 'PUT',
- 'PATCH',
- 'OPTIONS'
- ]
+ assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT',
+ 'PATCH', 'OPTIONS']
if post_params and body:
raise ApiValueError(
@@ -137,78 +136,65 @@ def request(
post_params = post_params or {}
headers = headers or {}
+ # url already contains the URL query string
+ # so reset query_params to empty dict
+ query_params = {}
timeout = None
if _request_timeout:
- if isinstance(_request_timeout, (int, float)):
+ if isinstance(_request_timeout, (int,float)): # noqa: E501,F821
timeout = urllib3.Timeout(total=_request_timeout)
- elif (
- isinstance(_request_timeout, tuple)
- and len(_request_timeout) == 2
- ):
+ elif (isinstance(_request_timeout, tuple) and
+ len(_request_timeout) == 2):
timeout = urllib3.Timeout(
- connect=_request_timeout[0],
- read=_request_timeout[1]
- )
+ connect=_request_timeout[0], read=_request_timeout[1])
try:
# For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE`
if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']:
# no content type provided or payload is json
- content_type = headers.get('Content-Type')
- if (
- not content_type
- or re.search('json', content_type, re.IGNORECASE)
- ):
+ if not headers.get('Content-Type') or re.search('json', headers['Content-Type'], re.IGNORECASE):
request_body = None
if body is not None:
request_body = json.dumps(body)
r = self.pool_manager.request(
- method,
- url,
+ method, url,
body=request_body,
+ preload_content=_preload_content,
timeout=timeout,
- headers=headers,
- preload_content=False
- )
- elif content_type == 'application/x-www-form-urlencoded':
+ headers=headers)
+ elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501
r = self.pool_manager.request(
- method,
- url,
+ method, url,
fields=post_params,
encode_multipart=False,
+ preload_content=_preload_content,
timeout=timeout,
- headers=headers,
- preload_content=False
- )
- elif content_type == 'multipart/form-data':
+ headers=headers)
+ elif headers['Content-Type'] == 'multipart/form-data':
# must del headers['Content-Type'], or the correct
# Content-Type which generated by urllib3 will be
# overwritten.
del headers['Content-Type']
r = self.pool_manager.request(
- method,
- url,
+ method, url,
fields=post_params,
encode_multipart=True,
+ preload_content=_preload_content,
timeout=timeout,
- headers=headers,
- preload_content=False
- )
+ headers=headers)
# Pass a `string` parameter directly in the body to support
# other content types than Json when `body` argument is
# provided in serialized form
elif isinstance(body, str) or isinstance(body, bytes):
request_body = body
r = self.pool_manager.request(
- method,
- url,
+ method, url,
body=request_body,
+ preload_content=_preload_content,
timeout=timeout,
- headers=headers,
- preload_content=False
- )
+ headers=headers)
else:
# Cannot generate the request from given parameters
msg = """Cannot prepare a request message for provided
@@ -217,16 +203,102 @@ def request(
raise ApiException(status=0, reason=msg)
# For `GET`, `HEAD`
else:
- r = self.pool_manager.request(
- method,
- url,
- fields={},
- timeout=timeout,
- headers=headers,
- preload_content=False
- )
+ r = self.pool_manager.request(method, url,
+ fields={},
+ preload_content=_preload_content,
+ timeout=timeout,
+ headers=headers)
except urllib3.exceptions.SSLError as e:
- msg = "\n".join([type(e).__name__, str(e)])
+ msg = "{0}\n{1}".format(type(e).__name__, str(e))
raise ApiException(status=0, reason=msg)
- return RESTResponse(r)
+ if _preload_content:
+ r = RESTResponse(r)
+
+ # log response body
+ logger.debug("response body: %s", r.data)
+
+ if not 200 <= r.status <= 299:
+ if r.status == 400:
+ raise BadRequestException(http_resp=r)
+
+ if r.status == 401:
+ raise UnauthorizedException(http_resp=r)
+
+ if r.status == 403:
+ raise ForbiddenException(http_resp=r)
+
+ if r.status == 404:
+ raise NotFoundException(http_resp=r)
+
+ if 500 <= r.status <= 599:
+ raise ServiceException(http_resp=r)
+
+ raise ApiException(http_resp=r)
+
+ return r
+
+ def get_request(self, url, headers=None, query_params=None, _preload_content=True,
+ _request_timeout=None):
+ return self.request("GET", url,
+ headers=headers,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ query_params=query_params)
+
+ def head_request(self, url, headers=None, query_params=None, _preload_content=True,
+ _request_timeout=None):
+ return self.request("HEAD", url,
+ headers=headers,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ query_params=query_params)
+
+ def options_request(self, url, headers=None, query_params=None, post_params=None,
+ body=None, _preload_content=True, _request_timeout=None):
+ return self.request("OPTIONS", url,
+ headers=headers,
+ query_params=query_params,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+
+ def delete_request(self, url, headers=None, query_params=None, body=None,
+ _preload_content=True, _request_timeout=None):
+ return self.request("DELETE", url,
+ headers=headers,
+ query_params=query_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+
+ def post_request(self, url, headers=None, query_params=None, post_params=None,
+ body=None, _preload_content=True, _request_timeout=None):
+ return self.request("POST", url,
+ headers=headers,
+ query_params=query_params,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+
+ def put_request(self, url, headers=None, query_params=None, post_params=None,
+ body=None, _preload_content=True, _request_timeout=None):
+ return self.request("PUT", url,
+ headers=headers,
+ query_params=query_params,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+
+ def patch_request(self, url, headers=None, query_params=None, post_params=None,
+ body=None, _preload_content=True, _request_timeout=None):
+ return self.request("PATCH", url,
+ headers=headers,
+ query_params=query_params,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
diff --git a/requirements.txt b/requirements.txt
index cc85509..258c179 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,5 +1,5 @@
python_dateutil >= 2.5.3
setuptools >= 21.0.0
urllib3 >= 1.25.3, < 2.1.0
-pydantic >= 2
-typing-extensions >= 4.7.1
+pydantic >= 1.10.5, < 2
+aenum >= 3.1.11
diff --git a/setup.py b/setup.py
index 398f949..b4548fe 100644
--- a/setup.py
+++ b/setup.py
@@ -22,13 +22,13 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools
NAME = "frontier-python"
-VERSION = "0.1.3"
+VERSION = "1.0.0"
PYTHON_REQUIRES = ">=3.7"
REQUIRES = [
"urllib3 >= 1.25.3, < 2.1.0",
"python-dateutil",
- "pydantic >= 2",
- "typing-extensions >= 4.7.1",
+ "pydantic >= 1.10.5, < 2",
+ "aenum"
]
setup(
diff --git a/test/test_admin_service_delegated_checkout_request.py b/test/test_admin_service_delegated_checkout_request.py
new file mode 100644
index 0000000..c41a5c9
--- /dev/null
+++ b/test/test_admin_service_delegated_checkout_request.py
@@ -0,0 +1,57 @@
+# coding: utf-8
+
+"""
+ Frontier Administration API
+
+ The Frontier APIs adhere to the OpenAPI specification, also known as Swagger, which provides a standardized approach for designing, documenting, and consuming RESTful APIs. With OpenAPI, you gain a clear understanding of the API endpoints, request/response structures, and authentication mechanisms supported by the Frontier APIs. By leveraging the OpenAPI specification, developers can easily explore and interact with the Frontier APIs using a variety of tools and libraries. The OpenAPI specification enables automatic code generation, interactive API documentation, and seamless integration with API testing frameworks, making it easier than ever to integrate Frontier into your existing applications and workflows.
+
+ The version of the OpenAPI document: 0.2.0
+ Contact: hello@raystack.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+import datetime
+
+from frontier_api.models.admin_service_delegated_checkout_request import AdminServiceDelegatedCheckoutRequest # noqa: E501
+
+class TestAdminServiceDelegatedCheckoutRequest(unittest.TestCase):
+ """AdminServiceDelegatedCheckoutRequest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> AdminServiceDelegatedCheckoutRequest:
+ """Test AdminServiceDelegatedCheckoutRequest
+ 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 `AdminServiceDelegatedCheckoutRequest`
+ """
+ model = AdminServiceDelegatedCheckoutRequest() # noqa: E501
+ if include_optional:
+ return AdminServiceDelegatedCheckoutRequest(
+ subscription_body = frontier_api.models.v1beta1_checkout_subscription_body.v1beta1CheckoutSubscriptionBody(
+ plan = '',
+ trail_days = 56, ),
+ feature_body = frontier_api.models.v1beta1_checkout_feature_body.v1beta1CheckoutFeatureBody(
+ feature = '', )
+ )
+ else:
+ return AdminServiceDelegatedCheckoutRequest(
+ )
+ """
+
+ def testAdminServiceDelegatedCheckoutRequest(self):
+ """Test AdminServiceDelegatedCheckoutRequest"""
+ # 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_audit_log_api.py b/test/test_audit_log_api.py
index f54ef6d..e50ba46 100644
--- a/test/test_audit_log_api.py
+++ b/test/test_audit_log_api.py
@@ -15,14 +15,14 @@
import unittest
-from frontier_api.api.audit_log_api import AuditLogApi
+from frontier_api.api.audit_log_api import AuditLogApi # noqa: E501
class TestAuditLogApi(unittest.TestCase):
"""AuditLogApi unit test stubs"""
def setUp(self) -> None:
- self.api = AuditLogApi()
+ self.api = AuditLogApi() # noqa: E501
def tearDown(self) -> None:
pass
@@ -30,21 +30,21 @@ def tearDown(self) -> None:
def test_frontier_service_create_organization_audit_logs(self) -> None:
"""Test case for frontier_service_create_organization_audit_logs
- Create audit log
+ Create audit log # noqa: E501
"""
pass
def test_frontier_service_get_organization_audit_log(self) -> None:
"""Test case for frontier_service_get_organization_audit_log
- Get audit log
+ Get audit log # noqa: E501
"""
pass
def test_frontier_service_list_organization_audit_logs(self) -> None:
"""Test case for frontier_service_list_organization_audit_logs
- List audit logs
+ List audit logs # noqa: E501
"""
pass
diff --git a/test/test_authn_api.py b/test/test_authn_api.py
index 1520e6e..2caa673 100644
--- a/test/test_authn_api.py
+++ b/test/test_authn_api.py
@@ -15,14 +15,14 @@
import unittest
-from frontier_api.api.authn_api import AuthnApi
+from frontier_api.api.authn_api import AuthnApi # noqa: E501
class TestAuthnApi(unittest.TestCase):
"""AuthnApi unit test stubs"""
def setUp(self) -> None:
- self.api = AuthnApi()
+ self.api = AuthnApi() # noqa: E501
def tearDown(self) -> None:
pass
@@ -30,56 +30,56 @@ def tearDown(self) -> None:
def test_frontier_service_auth_callback(self) -> None:
"""Test case for frontier_service_auth_callback
- Callback from a strategy
+ Callback from a strategy # noqa: E501
"""
pass
def test_frontier_service_auth_callback2(self) -> None:
"""Test case for frontier_service_auth_callback2
- Callback from a strategy
+ Callback from a strategy # noqa: E501
"""
pass
def test_frontier_service_auth_logout(self) -> None:
"""Test case for frontier_service_auth_logout
- Logout from a strategy
+ Logout from a strategy # noqa: E501
"""
pass
def test_frontier_service_auth_logout2(self) -> None:
"""Test case for frontier_service_auth_logout2
- Logout from a strategy
+ Logout from a strategy # noqa: E501
"""
pass
def test_frontier_service_auth_token(self) -> None:
"""Test case for frontier_service_auth_token
- Generate access token by given credentials
+ Generate access token by given credentials # noqa: E501
"""
pass
def test_frontier_service_authenticate(self) -> None:
"""Test case for frontier_service_authenticate
- Authenticate with a strategy
+ Authenticate with a strategy # noqa: E501
"""
pass
def test_frontier_service_authenticate2(self) -> None:
"""Test case for frontier_service_authenticate2
- Authenticate with a strategy
+ Authenticate with a strategy # noqa: E501
"""
pass
def test_frontier_service_list_auth_strategies(self) -> None:
"""Test case for frontier_service_list_auth_strategies
- List authentication strategies
+ List authentication strategies # noqa: E501
"""
pass
diff --git a/test/test_authz_api.py b/test/test_authz_api.py
index 339d7ca..5f31912 100644
--- a/test/test_authz_api.py
+++ b/test/test_authz_api.py
@@ -15,14 +15,14 @@
import unittest
-from frontier_api.api.authz_api import AuthzApi
+from frontier_api.api.authz_api import AuthzApi # noqa: E501
class TestAuthzApi(unittest.TestCase):
"""AuthzApi unit test stubs"""
def setUp(self) -> None:
- self.api = AuthzApi()
+ self.api = AuthzApi() # noqa: E501
def tearDown(self) -> None:
pass
@@ -30,35 +30,35 @@ def tearDown(self) -> None:
def test_admin_service_check_federated_resource_permission(self) -> None:
"""Test case for admin_service_check_federated_resource_permission
- Check
+ Check # noqa: E501
"""
pass
def test_frontier_service_batch_check_permission(self) -> None:
"""Test case for frontier_service_batch_check_permission
- Batch check
+ Batch check # noqa: E501
"""
pass
def test_frontier_service_check_resource_permission(self) -> None:
"""Test case for frontier_service_check_resource_permission
- Check
+ Check # noqa: E501
"""
pass
def test_frontier_service_get_jwks(self) -> None:
"""Test case for frontier_service_get_jwks
- Get well known JWKs
+ Get well known JWKs # noqa: E501
"""
pass
def test_frontier_service_get_jwks2(self) -> None:
"""Test case for frontier_service_get_jwks2
- Get well known JWKs
+ Get well known JWKs # noqa: E501
"""
pass
diff --git a/test/test_billing_account_address.py b/test/test_billing_account_address.py
index 22e691d..c306a7d 100644
--- a/test/test_billing_account_address.py
+++ b/test/test_billing_account_address.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.billing_account_address import BillingAccountAddress
+from frontier_api.models.billing_account_address import BillingAccountAddress # noqa: E501
class TestBillingAccountAddress(unittest.TestCase):
"""BillingAccountAddress unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> BillingAccountAddress:
optional params are included """
# uncomment below to create an instance of `BillingAccountAddress`
"""
- model = BillingAccountAddress()
+ model = BillingAccountAddress() # noqa: E501
if include_optional:
return BillingAccountAddress(
line1 = '',
diff --git a/test/test_billing_account_balance.py b/test/test_billing_account_balance.py
index 0599037..039982d 100644
--- a/test/test_billing_account_balance.py
+++ b/test/test_billing_account_balance.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.billing_account_balance import BillingAccountBalance
+from frontier_api.models.billing_account_balance import BillingAccountBalance # noqa: E501
class TestBillingAccountBalance(unittest.TestCase):
"""BillingAccountBalance unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> BillingAccountBalance:
optional params are included """
# uncomment below to create an instance of `BillingAccountBalance`
"""
- model = BillingAccountBalance()
+ model = BillingAccountBalance() # noqa: E501
if include_optional:
return BillingAccountBalance(
amount = '',
diff --git a/test/test_billing_api.py b/test/test_billing_api.py
index 6d30c3e..a4ad918 100644
--- a/test/test_billing_api.py
+++ b/test/test_billing_api.py
@@ -15,14 +15,14 @@
import unittest
-from frontier_api.api.billing_api import BillingApi
+from frontier_api.api.billing_api import BillingApi # noqa: E501
class TestBillingApi(unittest.TestCase):
"""BillingApi unit test stubs"""
def setUp(self) -> None:
- self.api = BillingApi()
+ self.api = BillingApi() # noqa: E501
def tearDown(self) -> None:
pass
@@ -30,42 +30,42 @@ def tearDown(self) -> None:
def test_frontier_service_create_billing_account(self) -> None:
"""Test case for frontier_service_create_billing_account
- Create billing account
+ Create billing account # noqa: E501
"""
pass
def test_frontier_service_delete_billing_account(self) -> None:
"""Test case for frontier_service_delete_billing_account
- Delete billing account
+ Delete billing account # noqa: E501
"""
pass
def test_frontier_service_get_billing_account(self) -> None:
"""Test case for frontier_service_get_billing_account
- Get billing account
+ Get billing account # noqa: E501
"""
pass
def test_frontier_service_get_billing_balance(self) -> None:
"""Test case for frontier_service_get_billing_balance
- Get billing balance
+ Get billing balance # noqa: E501
"""
pass
def test_frontier_service_list_billing_accounts(self) -> None:
"""Test case for frontier_service_list_billing_accounts
- List billing accounts
+ List billing accounts # noqa: E501
"""
pass
def test_frontier_service_update_billing_account(self) -> None:
"""Test case for frontier_service_update_billing_account
- Update billing account
+ Update billing account # noqa: E501
"""
pass
diff --git a/test/test_checkout_api.py b/test/test_checkout_api.py
index 6c88bfb..1220705 100644
--- a/test/test_checkout_api.py
+++ b/test/test_checkout_api.py
@@ -15,29 +15,36 @@
import unittest
-from frontier_api.api.checkout_api import CheckoutApi
+from frontier_api.api.checkout_api import CheckoutApi # noqa: E501
class TestCheckoutApi(unittest.TestCase):
"""CheckoutApi unit test stubs"""
def setUp(self) -> None:
- self.api = CheckoutApi()
+ self.api = CheckoutApi() # noqa: E501
def tearDown(self) -> None:
pass
+ def test_admin_service_delegated_checkout(self) -> None:
+ """Test case for admin_service_delegated_checkout
+
+ Checkout a feature or subscription # noqa: E501
+ """
+ pass
+
def test_frontier_service_create_checkout(self) -> None:
"""Test case for frontier_service_create_checkout
- Checkout a feature or subscription
+ Checkout a feature or subscription # noqa: E501
"""
pass
def test_frontier_service_list_checkouts(self) -> None:
"""Test case for frontier_service_list_checkouts
- List checkouts
+ List checkouts # noqa: E501
"""
pass
diff --git a/test/test_entitlement_api.py b/test/test_entitlement_api.py
index 8f05cf3..4e3035d 100644
--- a/test/test_entitlement_api.py
+++ b/test/test_entitlement_api.py
@@ -15,14 +15,14 @@
import unittest
-from frontier_api.api.entitlement_api import EntitlementApi
+from frontier_api.api.entitlement_api import EntitlementApi # noqa: E501
class TestEntitlementApi(unittest.TestCase):
"""EntitlementApi unit test stubs"""
def setUp(self) -> None:
- self.api = EntitlementApi()
+ self.api = EntitlementApi() # noqa: E501
def tearDown(self) -> None:
pass
@@ -30,7 +30,7 @@ def tearDown(self) -> None:
def test_frontier_service_check_feature_entitlement(self) -> None:
"""Test case for frontier_service_check_feature_entitlement
- Check entitlement
+ Check entitlement # noqa: E501
"""
pass
diff --git a/test/test_feature_api.py b/test/test_feature_api.py
index 86d81e5..bb40865 100644
--- a/test/test_feature_api.py
+++ b/test/test_feature_api.py
@@ -15,14 +15,14 @@
import unittest
-from frontier_api.api.feature_api import FeatureApi
+from frontier_api.api.feature_api import FeatureApi # noqa: E501
class TestFeatureApi(unittest.TestCase):
"""FeatureApi unit test stubs"""
def setUp(self) -> None:
- self.api = FeatureApi()
+ self.api = FeatureApi() # noqa: E501
def tearDown(self) -> None:
pass
@@ -30,28 +30,28 @@ def tearDown(self) -> None:
def test_frontier_service_create_feature(self) -> None:
"""Test case for frontier_service_create_feature
- Create feature
+ Create feature # noqa: E501
"""
pass
def test_frontier_service_get_feature(self) -> None:
"""Test case for frontier_service_get_feature
- Get feature
+ Get feature # noqa: E501
"""
pass
def test_frontier_service_list_features(self) -> None:
"""Test case for frontier_service_list_features
- List features
+ List features # noqa: E501
"""
pass
def test_frontier_service_update_feature(self) -> None:
"""Test case for frontier_service_update_feature
- Update feature
+ Update feature # noqa: E501
"""
pass
diff --git a/test/test_frontier_service_add_group_users_request.py b/test/test_frontier_service_add_group_users_request.py
index d6abbd4..69ee29d 100644
--- a/test/test_frontier_service_add_group_users_request.py
+++ b/test/test_frontier_service_add_group_users_request.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.frontier_service_add_group_users_request import FrontierServiceAddGroupUsersRequest
+from frontier_api.models.frontier_service_add_group_users_request import FrontierServiceAddGroupUsersRequest # noqa: E501
class TestFrontierServiceAddGroupUsersRequest(unittest.TestCase):
"""FrontierServiceAddGroupUsersRequest unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> FrontierServiceAddGroupUsersRequest
optional params are included """
# uncomment below to create an instance of `FrontierServiceAddGroupUsersRequest`
"""
- model = FrontierServiceAddGroupUsersRequest()
+ model = FrontierServiceAddGroupUsersRequest() # noqa: E501
if include_optional:
return FrontierServiceAddGroupUsersRequest(
user_ids = [
diff --git a/test/test_frontier_service_add_organization_users_request.py b/test/test_frontier_service_add_organization_users_request.py
index 410fae2..3dcc304 100644
--- a/test/test_frontier_service_add_organization_users_request.py
+++ b/test/test_frontier_service_add_organization_users_request.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.frontier_service_add_organization_users_request import FrontierServiceAddOrganizationUsersRequest
+from frontier_api.models.frontier_service_add_organization_users_request import FrontierServiceAddOrganizationUsersRequest # noqa: E501
class TestFrontierServiceAddOrganizationUsersRequest(unittest.TestCase):
"""FrontierServiceAddOrganizationUsersRequest unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> FrontierServiceAddOrganizationUsers
optional params are included """
# uncomment below to create an instance of `FrontierServiceAddOrganizationUsersRequest`
"""
- model = FrontierServiceAddOrganizationUsersRequest()
+ model = FrontierServiceAddOrganizationUsersRequest() # noqa: E501
if include_optional:
return FrontierServiceAddOrganizationUsersRequest(
user_ids = [
diff --git a/test/test_frontier_service_authenticate2_request.py b/test/test_frontier_service_authenticate2_request.py
index a87678b..96c137f 100644
--- a/test/test_frontier_service_authenticate2_request.py
+++ b/test/test_frontier_service_authenticate2_request.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.frontier_service_authenticate2_request import FrontierServiceAuthenticate2Request
+from frontier_api.models.frontier_service_authenticate2_request import FrontierServiceAuthenticate2Request # noqa: E501
class TestFrontierServiceAuthenticate2Request(unittest.TestCase):
"""FrontierServiceAuthenticate2Request unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> FrontierServiceAuthenticate2Request
optional params are included """
# uncomment below to create an instance of `FrontierServiceAuthenticate2Request`
"""
- model = FrontierServiceAuthenticate2Request()
+ model = FrontierServiceAuthenticate2Request() # noqa: E501
if include_optional:
return FrontierServiceAuthenticate2Request(
redirect_onstart = True,
diff --git a/test/test_frontier_service_check_feature_entitlement_request.py b/test/test_frontier_service_check_feature_entitlement_request.py
index f892508..0497321 100644
--- a/test/test_frontier_service_check_feature_entitlement_request.py
+++ b/test/test_frontier_service_check_feature_entitlement_request.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.frontier_service_check_feature_entitlement_request import FrontierServiceCheckFeatureEntitlementRequest
+from frontier_api.models.frontier_service_check_feature_entitlement_request import FrontierServiceCheckFeatureEntitlementRequest # noqa: E501
class TestFrontierServiceCheckFeatureEntitlementRequest(unittest.TestCase):
"""FrontierServiceCheckFeatureEntitlementRequest unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> FrontierServiceCheckFeatureEntitlem
optional params are included """
# uncomment below to create an instance of `FrontierServiceCheckFeatureEntitlementRequest`
"""
- model = FrontierServiceCheckFeatureEntitlementRequest()
+ model = FrontierServiceCheckFeatureEntitlementRequest() # noqa: E501
if include_optional:
return FrontierServiceCheckFeatureEntitlementRequest(
feature = ''
diff --git a/test/test_frontier_service_create_billing_account_request.py b/test/test_frontier_service_create_billing_account_request.py
index c96ca97..5ea853e 100644
--- a/test/test_frontier_service_create_billing_account_request.py
+++ b/test/test_frontier_service_create_billing_account_request.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.frontier_service_create_billing_account_request import FrontierServiceCreateBillingAccountRequest
+from frontier_api.models.frontier_service_create_billing_account_request import FrontierServiceCreateBillingAccountRequest # noqa: E501
class TestFrontierServiceCreateBillingAccountRequest(unittest.TestCase):
"""FrontierServiceCreateBillingAccountRequest unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> FrontierServiceCreateBillingAccount
optional params are included """
# uncomment below to create an instance of `FrontierServiceCreateBillingAccountRequest`
"""
- model = FrontierServiceCreateBillingAccountRequest()
+ model = FrontierServiceCreateBillingAccountRequest() # noqa: E501
if include_optional:
return FrontierServiceCreateBillingAccountRequest(
body = frontier_api.models.v1beta1_billing_account_request_body.v1beta1BillingAccountRequestBody(
diff --git a/test/test_frontier_service_create_billing_usage_request.py b/test/test_frontier_service_create_billing_usage_request.py
index 3ac5ade..3a14a27 100644
--- a/test/test_frontier_service_create_billing_usage_request.py
+++ b/test/test_frontier_service_create_billing_usage_request.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.frontier_service_create_billing_usage_request import FrontierServiceCreateBillingUsageRequest
+from frontier_api.models.frontier_service_create_billing_usage_request import FrontierServiceCreateBillingUsageRequest # noqa: E501
class TestFrontierServiceCreateBillingUsageRequest(unittest.TestCase):
"""FrontierServiceCreateBillingUsageRequest unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> FrontierServiceCreateBillingUsageRe
optional params are included """
# uncomment below to create an instance of `FrontierServiceCreateBillingUsageRequest`
"""
- model = FrontierServiceCreateBillingUsageRequest()
+ model = FrontierServiceCreateBillingUsageRequest() # noqa: E501
if include_optional:
return FrontierServiceCreateBillingUsageRequest(
usages = [
diff --git a/test/test_frontier_service_create_checkout_request.py b/test/test_frontier_service_create_checkout_request.py
index 6e8c163..190d805 100644
--- a/test/test_frontier_service_create_checkout_request.py
+++ b/test/test_frontier_service_create_checkout_request.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.frontier_service_create_checkout_request import FrontierServiceCreateCheckoutRequest
+from frontier_api.models.frontier_service_create_checkout_request import FrontierServiceCreateCheckoutRequest # noqa: E501
class TestFrontierServiceCreateCheckoutRequest(unittest.TestCase):
"""FrontierServiceCreateCheckoutRequest unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> FrontierServiceCreateCheckoutReques
optional params are included """
# uncomment below to create an instance of `FrontierServiceCreateCheckoutRequest`
"""
- model = FrontierServiceCreateCheckoutRequest()
+ model = FrontierServiceCreateCheckoutRequest() # noqa: E501
if include_optional:
return FrontierServiceCreateCheckoutRequest(
success_url = '',
diff --git a/test/test_frontier_service_create_group_preferences_request.py b/test/test_frontier_service_create_group_preferences_request.py
index cde5a25..e3fe438 100644
--- a/test/test_frontier_service_create_group_preferences_request.py
+++ b/test/test_frontier_service_create_group_preferences_request.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.frontier_service_create_group_preferences_request import FrontierServiceCreateGroupPreferencesRequest
+from frontier_api.models.frontier_service_create_group_preferences_request import FrontierServiceCreateGroupPreferencesRequest # noqa: E501
class TestFrontierServiceCreateGroupPreferencesRequest(unittest.TestCase):
"""FrontierServiceCreateGroupPreferencesRequest unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> FrontierServiceCreateGroupPreferenc
optional params are included """
# uncomment below to create an instance of `FrontierServiceCreateGroupPreferencesRequest`
"""
- model = FrontierServiceCreateGroupPreferencesRequest()
+ model = FrontierServiceCreateGroupPreferencesRequest() # noqa: E501
if include_optional:
return FrontierServiceCreateGroupPreferencesRequest(
bodies = [
diff --git a/test/test_frontier_service_create_organization_audit_logs_request.py b/test/test_frontier_service_create_organization_audit_logs_request.py
index 96e0995..cf0e6da 100644
--- a/test/test_frontier_service_create_organization_audit_logs_request.py
+++ b/test/test_frontier_service_create_organization_audit_logs_request.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.frontier_service_create_organization_audit_logs_request import FrontierServiceCreateOrganizationAuditLogsRequest
+from frontier_api.models.frontier_service_create_organization_audit_logs_request import FrontierServiceCreateOrganizationAuditLogsRequest # noqa: E501
class TestFrontierServiceCreateOrganizationAuditLogsRequest(unittest.TestCase):
"""FrontierServiceCreateOrganizationAuditLogsRequest unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> FrontierServiceCreateOrganizationAu
optional params are included """
# uncomment below to create an instance of `FrontierServiceCreateOrganizationAuditLogsRequest`
"""
- model = FrontierServiceCreateOrganizationAuditLogsRequest()
+ model = FrontierServiceCreateOrganizationAuditLogsRequest() # noqa: E501
if include_optional:
return FrontierServiceCreateOrganizationAuditLogsRequest(
logs = [
diff --git a/test/test_frontier_service_create_organization_domain_request.py b/test/test_frontier_service_create_organization_domain_request.py
index 14fa665..4110da4 100644
--- a/test/test_frontier_service_create_organization_domain_request.py
+++ b/test/test_frontier_service_create_organization_domain_request.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.frontier_service_create_organization_domain_request import FrontierServiceCreateOrganizationDomainRequest
+from frontier_api.models.frontier_service_create_organization_domain_request import FrontierServiceCreateOrganizationDomainRequest # noqa: E501
class TestFrontierServiceCreateOrganizationDomainRequest(unittest.TestCase):
"""FrontierServiceCreateOrganizationDomainRequest unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> FrontierServiceCreateOrganizationDo
optional params are included """
# uncomment below to create an instance of `FrontierServiceCreateOrganizationDomainRequest`
"""
- model = FrontierServiceCreateOrganizationDomainRequest()
+ model = FrontierServiceCreateOrganizationDomainRequest() # noqa: E501
if include_optional:
return FrontierServiceCreateOrganizationDomainRequest(
domain = ''
diff --git a/test/test_frontier_service_create_organization_invitation_request.py b/test/test_frontier_service_create_organization_invitation_request.py
index 0ea3559..c7f9931 100644
--- a/test/test_frontier_service_create_organization_invitation_request.py
+++ b/test/test_frontier_service_create_organization_invitation_request.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.frontier_service_create_organization_invitation_request import FrontierServiceCreateOrganizationInvitationRequest
+from frontier_api.models.frontier_service_create_organization_invitation_request import FrontierServiceCreateOrganizationInvitationRequest # noqa: E501
class TestFrontierServiceCreateOrganizationInvitationRequest(unittest.TestCase):
"""FrontierServiceCreateOrganizationInvitationRequest unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> FrontierServiceCreateOrganizationIn
optional params are included """
# uncomment below to create an instance of `FrontierServiceCreateOrganizationInvitationRequest`
"""
- model = FrontierServiceCreateOrganizationInvitationRequest()
+ model = FrontierServiceCreateOrganizationInvitationRequest() # noqa: E501
if include_optional:
return FrontierServiceCreateOrganizationInvitationRequest(
user_ids = [
diff --git a/test/test_frontier_service_create_service_user_key_request.py b/test/test_frontier_service_create_service_user_key_request.py
index ae12e42..6e61180 100644
--- a/test/test_frontier_service_create_service_user_key_request.py
+++ b/test/test_frontier_service_create_service_user_key_request.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.frontier_service_create_service_user_key_request import FrontierServiceCreateServiceUserKeyRequest
+from frontier_api.models.frontier_service_create_service_user_key_request import FrontierServiceCreateServiceUserKeyRequest # noqa: E501
class TestFrontierServiceCreateServiceUserKeyRequest(unittest.TestCase):
"""FrontierServiceCreateServiceUserKeyRequest unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> FrontierServiceCreateServiceUserKey
optional params are included """
# uncomment below to create an instance of `FrontierServiceCreateServiceUserKeyRequest`
"""
- model = FrontierServiceCreateServiceUserKeyRequest()
+ model = FrontierServiceCreateServiceUserKeyRequest() # noqa: E501
if include_optional:
return FrontierServiceCreateServiceUserKeyRequest(
title = ''
diff --git a/test/test_frontier_service_update_feature_request.py b/test/test_frontier_service_update_feature_request.py
index 349514c..0a32c43 100644
--- a/test/test_frontier_service_update_feature_request.py
+++ b/test/test_frontier_service_update_feature_request.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.frontier_service_update_feature_request import FrontierServiceUpdateFeatureRequest
+from frontier_api.models.frontier_service_update_feature_request import FrontierServiceUpdateFeatureRequest # noqa: E501
class TestFrontierServiceUpdateFeatureRequest(unittest.TestCase):
"""FrontierServiceUpdateFeatureRequest unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> FrontierServiceUpdateFeatureRequest
optional params are included """
# uncomment below to create an instance of `FrontierServiceUpdateFeatureRequest`
"""
- model = FrontierServiceUpdateFeatureRequest()
+ model = FrontierServiceUpdateFeatureRequest() # noqa: E501
if include_optional:
return FrontierServiceUpdateFeatureRequest(
body = frontier_api.models.v1beta1_feature_request_body.v1beta1FeatureRequestBody(
diff --git a/test/test_frontier_service_update_plan_request.py b/test/test_frontier_service_update_plan_request.py
index 3e8ca38..3cc5f12 100644
--- a/test/test_frontier_service_update_plan_request.py
+++ b/test/test_frontier_service_update_plan_request.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.frontier_service_update_plan_request import FrontierServiceUpdatePlanRequest
+from frontier_api.models.frontier_service_update_plan_request import FrontierServiceUpdatePlanRequest # noqa: E501
class TestFrontierServiceUpdatePlanRequest(unittest.TestCase):
"""FrontierServiceUpdatePlanRequest unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> FrontierServiceUpdatePlanRequest:
optional params are included """
# uncomment below to create an instance of `FrontierServiceUpdatePlanRequest`
"""
- model = FrontierServiceUpdatePlanRequest()
+ model = FrontierServiceUpdatePlanRequest() # noqa: E501
if include_optional:
return FrontierServiceUpdatePlanRequest(
body = frontier_api.models.v1beta1_plan_request_body.v1beta1PlanRequestBody(
diff --git a/test/test_frontier_service_update_subscription_request.py b/test/test_frontier_service_update_subscription_request.py
index 98831ca..f90428e 100644
--- a/test/test_frontier_service_update_subscription_request.py
+++ b/test/test_frontier_service_update_subscription_request.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.frontier_service_update_subscription_request import FrontierServiceUpdateSubscriptionRequest
+from frontier_api.models.frontier_service_update_subscription_request import FrontierServiceUpdateSubscriptionRequest # noqa: E501
class TestFrontierServiceUpdateSubscriptionRequest(unittest.TestCase):
"""FrontierServiceUpdateSubscriptionRequest unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> FrontierServiceUpdateSubscriptionRe
optional params are included """
# uncomment below to create an instance of `FrontierServiceUpdateSubscriptionRequest`
"""
- model = FrontierServiceUpdateSubscriptionRequest()
+ model = FrontierServiceUpdateSubscriptionRequest() # noqa: E501
if include_optional:
return FrontierServiceUpdateSubscriptionRequest(
metadata = None
diff --git a/test/test_group_api.py b/test/test_group_api.py
index e550f88..6ceb2d2 100644
--- a/test/test_group_api.py
+++ b/test/test_group_api.py
@@ -15,14 +15,14 @@
import unittest
-from frontier_api.api.group_api import GroupApi
+from frontier_api.api.group_api import GroupApi # noqa: E501
class TestGroupApi(unittest.TestCase):
"""GroupApi unit test stubs"""
def setUp(self) -> None:
- self.api = GroupApi()
+ self.api = GroupApi() # noqa: E501
def tearDown(self) -> None:
pass
@@ -30,77 +30,77 @@ def tearDown(self) -> None:
def test_admin_service_list_groups(self) -> None:
"""Test case for admin_service_list_groups
- List all groups
+ List all groups # noqa: E501
"""
pass
def test_frontier_service_add_group_users(self) -> None:
"""Test case for frontier_service_add_group_users
- Add group user
+ Add group user # noqa: E501
"""
pass
def test_frontier_service_create_group(self) -> None:
"""Test case for frontier_service_create_group
- Create group
+ Create group # noqa: E501
"""
pass
def test_frontier_service_delete_group(self) -> None:
"""Test case for frontier_service_delete_group
- Delete group
+ Delete group # noqa: E501
"""
pass
def test_frontier_service_disable_group(self) -> None:
"""Test case for frontier_service_disable_group
- Disable group
+ Disable group # noqa: E501
"""
pass
def test_frontier_service_enable_group(self) -> None:
"""Test case for frontier_service_enable_group
- Enable group
+ Enable group # noqa: E501
"""
pass
def test_frontier_service_get_group(self) -> None:
"""Test case for frontier_service_get_group
- Get group
+ Get group # noqa: E501
"""
pass
def test_frontier_service_list_group_users(self) -> None:
"""Test case for frontier_service_list_group_users
- List group users
+ List group users # noqa: E501
"""
pass
def test_frontier_service_list_organization_groups(self) -> None:
"""Test case for frontier_service_list_organization_groups
- List organization groups
+ List organization groups # noqa: E501
"""
pass
def test_frontier_service_remove_group_user(self) -> None:
"""Test case for frontier_service_remove_group_user
- Remove group user
+ Remove group user # noqa: E501
"""
pass
def test_frontier_service_update_group(self) -> None:
"""Test case for frontier_service_update_group
- Update group
+ Update group # noqa: E501
"""
pass
diff --git a/test/test_meta_schema_api.py b/test/test_meta_schema_api.py
index 56937c3..dfe9fe1 100644
--- a/test/test_meta_schema_api.py
+++ b/test/test_meta_schema_api.py
@@ -15,14 +15,14 @@
import unittest
-from frontier_api.api.meta_schema_api import MetaSchemaApi
+from frontier_api.api.meta_schema_api import MetaSchemaApi # noqa: E501
class TestMetaSchemaApi(unittest.TestCase):
"""MetaSchemaApi unit test stubs"""
def setUp(self) -> None:
- self.api = MetaSchemaApi()
+ self.api = MetaSchemaApi() # noqa: E501
def tearDown(self) -> None:
pass
@@ -30,35 +30,35 @@ def tearDown(self) -> None:
def test_frontier_service_create_meta_schema(self) -> None:
"""Test case for frontier_service_create_meta_schema
- Create metaschema
+ Create metaschema # noqa: E501
"""
pass
def test_frontier_service_delete_meta_schema(self) -> None:
"""Test case for frontier_service_delete_meta_schema
- Delete metaschema
+ Delete metaschema # noqa: E501
"""
pass
def test_frontier_service_get_meta_schema(self) -> None:
"""Test case for frontier_service_get_meta_schema
- Get metaschema
+ Get metaschema # noqa: E501
"""
pass
def test_frontier_service_list_meta_schemas(self) -> None:
"""Test case for frontier_service_list_meta_schemas
- List metaschemas
+ List metaschemas # noqa: E501
"""
pass
def test_frontier_service_update_meta_schema(self) -> None:
"""Test case for frontier_service_update_meta_schema
- Update metaschema
+ Update metaschema # noqa: E501
"""
pass
diff --git a/test/test_namespace_api.py b/test/test_namespace_api.py
index 9706500..d1e9acd 100644
--- a/test/test_namespace_api.py
+++ b/test/test_namespace_api.py
@@ -15,14 +15,14 @@
import unittest
-from frontier_api.api.namespace_api import NamespaceApi
+from frontier_api.api.namespace_api import NamespaceApi # noqa: E501
class TestNamespaceApi(unittest.TestCase):
"""NamespaceApi unit test stubs"""
def setUp(self) -> None:
- self.api = NamespaceApi()
+ self.api = NamespaceApi() # noqa: E501
def tearDown(self) -> None:
pass
@@ -30,14 +30,14 @@ def tearDown(self) -> None:
def test_frontier_service_get_namespace(self) -> None:
"""Test case for frontier_service_get_namespace
- Get namespace
+ Get namespace # noqa: E501
"""
pass
def test_frontier_service_list_namespaces(self) -> None:
"""Test case for frontier_service_list_namespaces
- Get all namespaces
+ Get all namespaces # noqa: E501
"""
pass
diff --git a/test/test_organization_api.py b/test/test_organization_api.py
index 4f7942c..a4a364b 100644
--- a/test/test_organization_api.py
+++ b/test/test_organization_api.py
@@ -15,14 +15,14 @@
import unittest
-from frontier_api.api.organization_api import OrganizationApi
+from frontier_api.api.organization_api import OrganizationApi # noqa: E501
class TestOrganizationApi(unittest.TestCase):
"""OrganizationApi unit test stubs"""
def setUp(self) -> None:
- self.api = OrganizationApi()
+ self.api = OrganizationApi() # noqa: E501
def tearDown(self) -> None:
pass
@@ -30,175 +30,175 @@ def tearDown(self) -> None:
def test_admin_service_list_all_organizations(self) -> None:
"""Test case for admin_service_list_all_organizations
- List all organizations
+ List all organizations # noqa: E501
"""
pass
def test_frontier_service_accept_organization_invitation(self) -> None:
"""Test case for frontier_service_accept_organization_invitation
- Accept pending invitation
+ Accept pending invitation # noqa: E501
"""
pass
def test_frontier_service_add_organization_users(self) -> None:
"""Test case for frontier_service_add_organization_users
- Add organization user
+ Add organization user # noqa: E501
"""
pass
def test_frontier_service_create_organization(self) -> None:
"""Test case for frontier_service_create_organization
- Create organization
+ Create organization # noqa: E501
"""
pass
def test_frontier_service_create_organization_domain(self) -> None:
"""Test case for frontier_service_create_organization_domain
- Create org domain
+ Create org domain # noqa: E501
"""
pass
def test_frontier_service_create_organization_invitation(self) -> None:
"""Test case for frontier_service_create_organization_invitation
- Invite user
+ Invite user # noqa: E501
"""
pass
def test_frontier_service_delete_organization(self) -> None:
"""Test case for frontier_service_delete_organization
- Delete organization
+ Delete organization # noqa: E501
"""
pass
def test_frontier_service_delete_organization_domain(self) -> None:
"""Test case for frontier_service_delete_organization_domain
- Delete org domain
+ Delete org domain # noqa: E501
"""
pass
def test_frontier_service_delete_organization_invitation(self) -> None:
"""Test case for frontier_service_delete_organization_invitation
- Delete pending invitation
+ Delete pending invitation # noqa: E501
"""
pass
def test_frontier_service_disable_organization(self) -> None:
"""Test case for frontier_service_disable_organization
- Disable organization
+ Disable organization # noqa: E501
"""
pass
def test_frontier_service_enable_organization(self) -> None:
"""Test case for frontier_service_enable_organization
- Enable organization
+ Enable organization # noqa: E501
"""
pass
def test_frontier_service_get_organization(self) -> None:
"""Test case for frontier_service_get_organization
- Get organization
+ Get organization # noqa: E501
"""
pass
def test_frontier_service_get_organization_domain(self) -> None:
"""Test case for frontier_service_get_organization_domain
- Get org domain
+ Get org domain # noqa: E501
"""
pass
def test_frontier_service_get_organization_invitation(self) -> None:
"""Test case for frontier_service_get_organization_invitation
- Get pending invitation
+ Get pending invitation # noqa: E501
"""
pass
def test_frontier_service_join_organization(self) -> None:
"""Test case for frontier_service_join_organization
- Join organization
+ Join organization # noqa: E501
"""
pass
def test_frontier_service_list_organization_admins(self) -> None:
"""Test case for frontier_service_list_organization_admins
- List organization admins
+ List organization admins # noqa: E501
"""
pass
def test_frontier_service_list_organization_domains(self) -> None:
"""Test case for frontier_service_list_organization_domains
- List org domains
+ List org domains # noqa: E501
"""
pass
def test_frontier_service_list_organization_invitations(self) -> None:
"""Test case for frontier_service_list_organization_invitations
- List pending invitations
+ List pending invitations # noqa: E501
"""
pass
def test_frontier_service_list_organization_projects(self) -> None:
"""Test case for frontier_service_list_organization_projects
- Get organization projects
+ Get organization projects # noqa: E501
"""
pass
def test_frontier_service_list_organization_service_users(self) -> None:
"""Test case for frontier_service_list_organization_service_users
- List organization service users
+ List organization service users # noqa: E501
"""
pass
def test_frontier_service_list_organization_users(self) -> None:
"""Test case for frontier_service_list_organization_users
- List organization users
+ List organization users # noqa: E501
"""
pass
def test_frontier_service_list_organizations(self) -> None:
"""Test case for frontier_service_list_organizations
- List organizations
+ List organizations # noqa: E501
"""
pass
def test_frontier_service_remove_organization_user(self) -> None:
"""Test case for frontier_service_remove_organization_user
- Remove organization user
+ Remove organization user # noqa: E501
"""
pass
def test_frontier_service_update_organization(self) -> None:
"""Test case for frontier_service_update_organization
- Update organization
+ Update organization # noqa: E501
"""
pass
def test_frontier_service_verify_organization_domain(self) -> None:
"""Test case for frontier_service_verify_organization_domain
- Verify org domain
+ Verify org domain # noqa: E501
"""
pass
diff --git a/test/test_permission_api.py b/test/test_permission_api.py
index 8d1a8af..5b41c49 100644
--- a/test/test_permission_api.py
+++ b/test/test_permission_api.py
@@ -15,14 +15,14 @@
import unittest
-from frontier_api.api.permission_api import PermissionApi
+from frontier_api.api.permission_api import PermissionApi # noqa: E501
class TestPermissionApi(unittest.TestCase):
"""PermissionApi unit test stubs"""
def setUp(self) -> None:
- self.api = PermissionApi()
+ self.api = PermissionApi() # noqa: E501
def tearDown(self) -> None:
pass
@@ -30,35 +30,35 @@ def tearDown(self) -> None:
def test_admin_service_create_permission(self) -> None:
"""Test case for admin_service_create_permission
- Create platform permission
+ Create platform permission # noqa: E501
"""
pass
def test_admin_service_delete_permission(self) -> None:
"""Test case for admin_service_delete_permission
- Delete platform permission
+ Delete platform permission # noqa: E501
"""
pass
def test_admin_service_update_permission(self) -> None:
"""Test case for admin_service_update_permission
- Update platform permission
+ Update platform permission # noqa: E501
"""
pass
def test_frontier_service_get_permission(self) -> None:
"""Test case for frontier_service_get_permission
- Get permission
+ Get permission # noqa: E501
"""
pass
def test_frontier_service_list_permissions(self) -> None:
"""Test case for frontier_service_list_permissions
- Get all permissions
+ Get all permissions # noqa: E501
"""
pass
diff --git a/test/test_plan_api.py b/test/test_plan_api.py
index 6bfb415..d1fc16a 100644
--- a/test/test_plan_api.py
+++ b/test/test_plan_api.py
@@ -15,14 +15,14 @@
import unittest
-from frontier_api.api.plan_api import PlanApi
+from frontier_api.api.plan_api import PlanApi # noqa: E501
class TestPlanApi(unittest.TestCase):
"""PlanApi unit test stubs"""
def setUp(self) -> None:
- self.api = PlanApi()
+ self.api = PlanApi() # noqa: E501
def tearDown(self) -> None:
pass
@@ -30,28 +30,28 @@ def tearDown(self) -> None:
def test_frontier_service_create_plan(self) -> None:
"""Test case for frontier_service_create_plan
- Create plan
+ Create plan # noqa: E501
"""
pass
def test_frontier_service_get_plan(self) -> None:
"""Test case for frontier_service_get_plan
- Get plan
+ Get plan # noqa: E501
"""
pass
def test_frontier_service_list_plans(self) -> None:
"""Test case for frontier_service_list_plans
- List plans
+ List plans # noqa: E501
"""
pass
def test_frontier_service_update_plan(self) -> None:
"""Test case for frontier_service_update_plan
- Update plan
+ Update plan # noqa: E501
"""
pass
diff --git a/test/test_platform_api.py b/test/test_platform_api.py
index 9db157b..b7bf59a 100644
--- a/test/test_platform_api.py
+++ b/test/test_platform_api.py
@@ -15,14 +15,14 @@
import unittest
-from frontier_api.api.platform_api import PlatformApi
+from frontier_api.api.platform_api import PlatformApi # noqa: E501
class TestPlatformApi(unittest.TestCase):
"""PlatformApi unit test stubs"""
def setUp(self) -> None:
- self.api = PlatformApi()
+ self.api = PlatformApi() # noqa: E501
def tearDown(self) -> None:
pass
@@ -30,7 +30,14 @@ def tearDown(self) -> None:
def test_admin_service_add_platform_user(self) -> None:
"""Test case for admin_service_add_platform_user
- Add platform user
+ Add platform user # noqa: E501
+ """
+ pass
+
+ def test_admin_service_list_platform_users(self) -> None:
+ """Test case for admin_service_list_platform_users
+
+ List platform users # noqa: E501
"""
pass
diff --git a/test/test_policy_api.py b/test/test_policy_api.py
index f0c3419..b4a8fc7 100644
--- a/test/test_policy_api.py
+++ b/test/test_policy_api.py
@@ -15,14 +15,14 @@
import unittest
-from frontier_api.api.policy_api import PolicyApi
+from frontier_api.api.policy_api import PolicyApi # noqa: E501
class TestPolicyApi(unittest.TestCase):
"""PolicyApi unit test stubs"""
def setUp(self) -> None:
- self.api = PolicyApi()
+ self.api = PolicyApi() # noqa: E501
def tearDown(self) -> None:
pass
@@ -30,35 +30,35 @@ def tearDown(self) -> None:
def test_frontier_service_create_policy(self) -> None:
"""Test case for frontier_service_create_policy
- Create policy
+ Create policy # noqa: E501
"""
pass
def test_frontier_service_delete_policy(self) -> None:
"""Test case for frontier_service_delete_policy
- Delete Policy
+ Delete Policy # noqa: E501
"""
pass
def test_frontier_service_get_policy(self) -> None:
"""Test case for frontier_service_get_policy
- Get policy
+ Get policy # noqa: E501
"""
pass
def test_frontier_service_list_policies(self) -> None:
"""Test case for frontier_service_list_policies
- List all policies
+ List all policies # noqa: E501
"""
pass
def test_frontier_service_update_policy(self) -> None:
"""Test case for frontier_service_update_policy
- Update policy
+ Update policy # noqa: E501
"""
pass
diff --git a/test/test_preference_api.py b/test/test_preference_api.py
index c6f7f7e..1970529 100644
--- a/test/test_preference_api.py
+++ b/test/test_preference_api.py
@@ -15,14 +15,14 @@
import unittest
-from frontier_api.api.preference_api import PreferenceApi
+from frontier_api.api.preference_api import PreferenceApi # noqa: E501
class TestPreferenceApi(unittest.TestCase):
"""PreferenceApi unit test stubs"""
def setUp(self) -> None:
- self.api = PreferenceApi()
+ self.api = PreferenceApi() # noqa: E501
def tearDown(self) -> None:
pass
@@ -30,91 +30,91 @@ def tearDown(self) -> None:
def test_admin_service_create_preferences(self) -> None:
"""Test case for admin_service_create_preferences
- Create platform preferences
+ Create platform preferences # noqa: E501
"""
pass
def test_admin_service_list_preferences(self) -> None:
"""Test case for admin_service_list_preferences
- List platform preferences
+ List platform preferences # noqa: E501
"""
pass
def test_frontier_service_create_current_user_preferences(self) -> None:
"""Test case for frontier_service_create_current_user_preferences
- Create current user preferences
+ Create current user preferences # noqa: E501
"""
pass
def test_frontier_service_create_group_preferences(self) -> None:
"""Test case for frontier_service_create_group_preferences
- Create group preferences
+ Create group preferences # noqa: E501
"""
pass
def test_frontier_service_create_organization_preferences(self) -> None:
"""Test case for frontier_service_create_organization_preferences
- Create organization preferences
+ Create organization preferences # noqa: E501
"""
pass
def test_frontier_service_create_project_preferences(self) -> None:
"""Test case for frontier_service_create_project_preferences
- Create project preferences
+ Create project preferences # noqa: E501
"""
pass
def test_frontier_service_create_user_preferences(self) -> None:
"""Test case for frontier_service_create_user_preferences
- Create user preferences
+ Create user preferences # noqa: E501
"""
pass
def test_frontier_service_describe_preferences(self) -> None:
"""Test case for frontier_service_describe_preferences
- Describe preferences
+ Describe preferences # noqa: E501
"""
pass
def test_frontier_service_list_current_user_preferences(self) -> None:
"""Test case for frontier_service_list_current_user_preferences
- List current user preferences
+ List current user preferences # noqa: E501
"""
pass
def test_frontier_service_list_group_preferences(self) -> None:
"""Test case for frontier_service_list_group_preferences
- List group preferences
+ List group preferences # noqa: E501
"""
pass
def test_frontier_service_list_organization_preferences(self) -> None:
"""Test case for frontier_service_list_organization_preferences
- List organization preferences
+ List organization preferences # noqa: E501
"""
pass
def test_frontier_service_list_project_preferences(self) -> None:
"""Test case for frontier_service_list_project_preferences
- List project preferences
+ List project preferences # noqa: E501
"""
pass
def test_frontier_service_list_user_preferences(self) -> None:
"""Test case for frontier_service_list_user_preferences
- List user preferences
+ List user preferences # noqa: E501
"""
pass
diff --git a/test/test_project_api.py b/test/test_project_api.py
index c4d408f..301dffc 100644
--- a/test/test_project_api.py
+++ b/test/test_project_api.py
@@ -15,14 +15,14 @@
import unittest
-from frontier_api.api.project_api import ProjectApi
+from frontier_api.api.project_api import ProjectApi # noqa: E501
class TestProjectApi(unittest.TestCase):
"""ProjectApi unit test stubs"""
def setUp(self) -> None:
- self.api = ProjectApi()
+ self.api = ProjectApi() # noqa: E501
def tearDown(self) -> None:
pass
@@ -30,77 +30,77 @@ def tearDown(self) -> None:
def test_admin_service_list_projects(self) -> None:
"""Test case for admin_service_list_projects
- List all projects
+ List all projects # noqa: E501
"""
pass
def test_frontier_service_create_project(self) -> None:
"""Test case for frontier_service_create_project
- Create project
+ Create project # noqa: E501
"""
pass
def test_frontier_service_delete_project(self) -> None:
"""Test case for frontier_service_delete_project
- Delete Project
+ Delete Project # noqa: E501
"""
pass
def test_frontier_service_disable_project(self) -> None:
"""Test case for frontier_service_disable_project
- Disable project
+ Disable project # noqa: E501
"""
pass
def test_frontier_service_enable_project(self) -> None:
"""Test case for frontier_service_enable_project
- Enable project
+ Enable project # noqa: E501
"""
pass
def test_frontier_service_get_project(self) -> None:
"""Test case for frontier_service_get_project
- Get project
+ Get project # noqa: E501
"""
pass
def test_frontier_service_list_project_admins(self) -> None:
"""Test case for frontier_service_list_project_admins
- List project admins
+ List project admins # noqa: E501
"""
pass
def test_frontier_service_list_project_groups(self) -> None:
"""Test case for frontier_service_list_project_groups
- List project groups
+ List project groups # noqa: E501
"""
pass
def test_frontier_service_list_project_service_users(self) -> None:
"""Test case for frontier_service_list_project_service_users
- List project serviceusers
+ List project serviceusers # noqa: E501
"""
pass
def test_frontier_service_list_project_users(self) -> None:
"""Test case for frontier_service_list_project_users
- List project users
+ List project users # noqa: E501
"""
pass
def test_frontier_service_update_project(self) -> None:
"""Test case for frontier_service_update_project
- Update project
+ Update project # noqa: E501
"""
pass
diff --git a/test/test_protobuf_any.py b/test/test_protobuf_any.py
index b9f644d..e30761d 100644
--- a/test/test_protobuf_any.py
+++ b/test/test_protobuf_any.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.protobuf_any import ProtobufAny
+from frontier_api.models.protobuf_any import ProtobufAny # noqa: E501
class TestProtobufAny(unittest.TestCase):
"""ProtobufAny unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> ProtobufAny:
optional params are included """
# uncomment below to create an instance of `ProtobufAny`
"""
- model = ProtobufAny()
+ model = ProtobufAny() # noqa: E501
if include_optional:
return ProtobufAny(
type = ''
diff --git a/test/test_protobuf_null_value.py b/test/test_protobuf_null_value.py
index 4f88899..559f137 100644
--- a/test/test_protobuf_null_value.py
+++ b/test/test_protobuf_null_value.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.protobuf_null_value import ProtobufNullValue
+from frontier_api.models.protobuf_null_value import ProtobufNullValue # noqa: E501
class TestProtobufNullValue(unittest.TestCase):
"""ProtobufNullValue unit test stubs"""
diff --git a/test/test_relation_api.py b/test/test_relation_api.py
index a03fafc..bacdd57 100644
--- a/test/test_relation_api.py
+++ b/test/test_relation_api.py
@@ -15,14 +15,14 @@
import unittest
-from frontier_api.api.relation_api import RelationApi
+from frontier_api.api.relation_api import RelationApi # noqa: E501
class TestRelationApi(unittest.TestCase):
"""RelationApi unit test stubs"""
def setUp(self) -> None:
- self.api = RelationApi()
+ self.api = RelationApi() # noqa: E501
def tearDown(self) -> None:
pass
@@ -30,28 +30,28 @@ def tearDown(self) -> None:
def test_admin_service_list_relations(self) -> None:
"""Test case for admin_service_list_relations
- List all relations
+ List all relations # noqa: E501
"""
pass
def test_frontier_service_create_relation(self) -> None:
"""Test case for frontier_service_create_relation
- Create relation
+ Create relation # noqa: E501
"""
pass
def test_frontier_service_delete_relation(self) -> None:
"""Test case for frontier_service_delete_relation
- Delete relation
+ Delete relation # noqa: E501
"""
pass
def test_frontier_service_get_relation(self) -> None:
"""Test case for frontier_service_get_relation
- Get relation
+ Get relation # noqa: E501
"""
pass
diff --git a/test/test_resource_api.py b/test/test_resource_api.py
index bae1105..6958fa8 100644
--- a/test/test_resource_api.py
+++ b/test/test_resource_api.py
@@ -15,14 +15,14 @@
import unittest
-from frontier_api.api.resource_api import ResourceApi
+from frontier_api.api.resource_api import ResourceApi # noqa: E501
class TestResourceApi(unittest.TestCase):
"""ResourceApi unit test stubs"""
def setUp(self) -> None:
- self.api = ResourceApi()
+ self.api = ResourceApi() # noqa: E501
def tearDown(self) -> None:
pass
@@ -30,42 +30,42 @@ def tearDown(self) -> None:
def test_admin_service_list_resources(self) -> None:
"""Test case for admin_service_list_resources
- List all resources
+ List all resources # noqa: E501
"""
pass
def test_frontier_service_create_project_resource(self) -> None:
"""Test case for frontier_service_create_project_resource
- Create resource
+ Create resource # noqa: E501
"""
pass
def test_frontier_service_delete_project_resource(self) -> None:
"""Test case for frontier_service_delete_project_resource
- Delete resource
+ Delete resource # noqa: E501
"""
pass
def test_frontier_service_get_project_resource(self) -> None:
"""Test case for frontier_service_get_project_resource
- Get resource
+ Get resource # noqa: E501
"""
pass
def test_frontier_service_list_project_resources(self) -> None:
"""Test case for frontier_service_list_project_resources
- Get all resources
+ Get all resources # noqa: E501
"""
pass
def test_frontier_service_update_project_resource(self) -> None:
"""Test case for frontier_service_update_project_resource
- Update resource
+ Update resource # noqa: E501
"""
pass
diff --git a/test/test_role_api.py b/test/test_role_api.py
index c242402..330e668 100644
--- a/test/test_role_api.py
+++ b/test/test_role_api.py
@@ -15,14 +15,14 @@
import unittest
-from frontier_api.api.role_api import RoleApi
+from frontier_api.api.role_api import RoleApi # noqa: E501
class TestRoleApi(unittest.TestCase):
"""RoleApi unit test stubs"""
def setUp(self) -> None:
- self.api = RoleApi()
+ self.api = RoleApi() # noqa: E501
def tearDown(self) -> None:
pass
@@ -30,63 +30,63 @@ def tearDown(self) -> None:
def test_admin_service_create_role(self) -> None:
"""Test case for admin_service_create_role
- Create platform role
+ Create platform role # noqa: E501
"""
pass
def test_admin_service_delete_role(self) -> None:
"""Test case for admin_service_delete_role
- Delete platform role
+ Delete platform role # noqa: E501
"""
pass
def test_admin_service_update_role(self) -> None:
"""Test case for admin_service_update_role
- Update role
+ Update role # noqa: E501
"""
pass
def test_frontier_service_create_organization_role(self) -> None:
"""Test case for frontier_service_create_organization_role
- Create organization role
+ Create organization role # noqa: E501
"""
pass
def test_frontier_service_delete_organization_role(self) -> None:
"""Test case for frontier_service_delete_organization_role
- Delete organization role
+ Delete organization role # noqa: E501
"""
pass
def test_frontier_service_get_organization_role(self) -> None:
"""Test case for frontier_service_get_organization_role
- Get organization role
+ Get organization role # noqa: E501
"""
pass
def test_frontier_service_list_organization_roles(self) -> None:
"""Test case for frontier_service_list_organization_roles
- List organization roles
+ List organization roles # noqa: E501
"""
pass
def test_frontier_service_list_roles(self) -> None:
"""Test case for frontier_service_list_roles
- List platform roles
+ List platform roles # noqa: E501
"""
pass
def test_frontier_service_update_organization_role(self) -> None:
"""Test case for frontier_service_update_organization_role
- Update organization role
+ Update organization role # noqa: E501
"""
pass
diff --git a/test/test_rpc_status.py b/test/test_rpc_status.py
index f9ae7fa..06abae5 100644
--- a/test/test_rpc_status.py
+++ b/test/test_rpc_status.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.rpc_status import RpcStatus
+from frontier_api.models.rpc_status import RpcStatus # noqa: E501
class TestRpcStatus(unittest.TestCase):
"""RpcStatus unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> RpcStatus:
optional params are included """
# uncomment below to create an instance of `RpcStatus`
"""
- model = RpcStatus()
+ model = RpcStatus() # noqa: E501
if include_optional:
return RpcStatus(
code = 56,
diff --git a/test/test_service_user_api.py b/test/test_service_user_api.py
index 79aeaf4..5d33ca3 100644
--- a/test/test_service_user_api.py
+++ b/test/test_service_user_api.py
@@ -15,14 +15,14 @@
import unittest
-from frontier_api.api.service_user_api import ServiceUserApi
+from frontier_api.api.service_user_api import ServiceUserApi # noqa: E501
class TestServiceUserApi(unittest.TestCase):
"""ServiceUserApi unit test stubs"""
def setUp(self) -> None:
- self.api = ServiceUserApi()
+ self.api = ServiceUserApi() # noqa: E501
def tearDown(self) -> None:
pass
@@ -30,77 +30,77 @@ def tearDown(self) -> None:
def test_frontier_service_create_service_user(self) -> None:
"""Test case for frontier_service_create_service_user
- Create service user
+ Create service user # noqa: E501
"""
pass
def test_frontier_service_create_service_user_key(self) -> None:
"""Test case for frontier_service_create_service_user_key
- Create service user key
+ Create service user key # noqa: E501
"""
pass
def test_frontier_service_create_service_user_secret(self) -> None:
"""Test case for frontier_service_create_service_user_secret
- Create service user secret
+ Create service user secret # noqa: E501
"""
pass
def test_frontier_service_delete_service_user(self) -> None:
"""Test case for frontier_service_delete_service_user
- Delete service user
+ Delete service user # noqa: E501
"""
pass
def test_frontier_service_delete_service_user_key(self) -> None:
"""Test case for frontier_service_delete_service_user_key
- Delete service user key
+ Delete service user key # noqa: E501
"""
pass
def test_frontier_service_delete_service_user_secret(self) -> None:
"""Test case for frontier_service_delete_service_user_secret
- Delete service user secret
+ Delete service user secret # noqa: E501
"""
pass
def test_frontier_service_get_service_user(self) -> None:
"""Test case for frontier_service_get_service_user
- Get service user
+ Get service user # noqa: E501
"""
pass
def test_frontier_service_get_service_user_key(self) -> None:
"""Test case for frontier_service_get_service_user_key
- Get service user key
+ Get service user key # noqa: E501
"""
pass
def test_frontier_service_list_service_user_keys(self) -> None:
"""Test case for frontier_service_list_service_user_keys
- List service user keys
+ List service user keys # noqa: E501
"""
pass
def test_frontier_service_list_service_user_secrets(self) -> None:
"""Test case for frontier_service_list_service_user_secrets
- List service user secrets
+ List service user secrets # noqa: E501
"""
pass
def test_frontier_service_list_service_users(self) -> None:
"""Test case for frontier_service_list_service_users
- List org service users
+ List org service users # noqa: E501
"""
pass
diff --git a/test/test_subscription_api.py b/test/test_subscription_api.py
index 554075b..3244199 100644
--- a/test/test_subscription_api.py
+++ b/test/test_subscription_api.py
@@ -15,14 +15,14 @@
import unittest
-from frontier_api.api.subscription_api import SubscriptionApi
+from frontier_api.api.subscription_api import SubscriptionApi # noqa: E501
class TestSubscriptionApi(unittest.TestCase):
"""SubscriptionApi unit test stubs"""
def setUp(self) -> None:
- self.api = SubscriptionApi()
+ self.api = SubscriptionApi() # noqa: E501
def tearDown(self) -> None:
pass
@@ -30,28 +30,28 @@ def tearDown(self) -> None:
def test_frontier_service_cancel_subscription(self) -> None:
"""Test case for frontier_service_cancel_subscription
- Cancel subscription
+ Cancel subscription # noqa: E501
"""
pass
def test_frontier_service_get_subscription(self) -> None:
"""Test case for frontier_service_get_subscription
- Get subscription
+ Get subscription # noqa: E501
"""
pass
def test_frontier_service_list_subscriptions(self) -> None:
"""Test case for frontier_service_list_subscriptions
- List subscriptions
+ List subscriptions # noqa: E501
"""
pass
def test_frontier_service_update_subscription(self) -> None:
"""Test case for frontier_service_update_subscription
- Update subscription
+ Update subscription # noqa: E501
"""
pass
diff --git a/test/test_transaction_api.py b/test/test_transaction_api.py
index 11cfb12..6df072f 100644
--- a/test/test_transaction_api.py
+++ b/test/test_transaction_api.py
@@ -15,14 +15,14 @@
import unittest
-from frontier_api.api.transaction_api import TransactionApi
+from frontier_api.api.transaction_api import TransactionApi # noqa: E501
class TestTransactionApi(unittest.TestCase):
"""TransactionApi unit test stubs"""
def setUp(self) -> None:
- self.api = TransactionApi()
+ self.api = TransactionApi() # noqa: E501
def tearDown(self) -> None:
pass
@@ -30,7 +30,7 @@ def tearDown(self) -> None:
def test_frontier_service_list_billing_transactions(self) -> None:
"""Test case for frontier_service_list_billing_transactions
- List billing transactions
+ List billing transactions # noqa: E501
"""
pass
diff --git a/test/test_usage_api.py b/test/test_usage_api.py
index 2ac600e..09e1ec5 100644
--- a/test/test_usage_api.py
+++ b/test/test_usage_api.py
@@ -15,14 +15,14 @@
import unittest
-from frontier_api.api.usage_api import UsageApi
+from frontier_api.api.usage_api import UsageApi # noqa: E501
class TestUsageApi(unittest.TestCase):
"""UsageApi unit test stubs"""
def setUp(self) -> None:
- self.api = UsageApi()
+ self.api = UsageApi() # noqa: E501
def tearDown(self) -> None:
pass
@@ -30,7 +30,7 @@ def tearDown(self) -> None:
def test_frontier_service_create_billing_usage(self) -> None:
"""Test case for frontier_service_create_billing_usage
- Create billing usage
+ Create billing usage # noqa: E501
"""
pass
diff --git a/test/test_user_api.py b/test/test_user_api.py
index b67ae70..9cf9cba 100644
--- a/test/test_user_api.py
+++ b/test/test_user_api.py
@@ -15,14 +15,14 @@
import unittest
-from frontier_api.api.user_api import UserApi
+from frontier_api.api.user_api import UserApi # noqa: E501
class TestUserApi(unittest.TestCase):
"""UserApi unit test stubs"""
def setUp(self) -> None:
- self.api = UserApi()
+ self.api = UserApi() # noqa: E501
def tearDown(self) -> None:
pass
@@ -30,126 +30,126 @@ def tearDown(self) -> None:
def test_admin_service_list_all_users(self) -> None:
"""Test case for admin_service_list_all_users
- List all users
+ List all users # noqa: E501
"""
pass
def test_frontier_service_create_user(self) -> None:
"""Test case for frontier_service_create_user
- Create user
+ Create user # noqa: E501
"""
pass
def test_frontier_service_delete_user(self) -> None:
"""Test case for frontier_service_delete_user
- Delete user
+ Delete user # noqa: E501
"""
pass
def test_frontier_service_disable_user(self) -> None:
"""Test case for frontier_service_disable_user
- Disable user
+ Disable user # noqa: E501
"""
pass
def test_frontier_service_enable_user(self) -> None:
"""Test case for frontier_service_enable_user
- Enable user
+ Enable user # noqa: E501
"""
pass
def test_frontier_service_get_current_user(self) -> None:
"""Test case for frontier_service_get_current_user
- Get current user
+ Get current user # noqa: E501
"""
pass
def test_frontier_service_get_user(self) -> None:
"""Test case for frontier_service_get_user
- Get user
+ Get user # noqa: E501
"""
pass
def test_frontier_service_list_current_user_groups(self) -> None:
"""Test case for frontier_service_list_current_user_groups
- List my groups
+ List my groups # noqa: E501
"""
pass
def test_frontier_service_list_current_user_invitations(self) -> None:
"""Test case for frontier_service_list_current_user_invitations
- List user invitations
+ List user invitations # noqa: E501
"""
pass
def test_frontier_service_list_organizations_by_current_user(self) -> None:
"""Test case for frontier_service_list_organizations_by_current_user
- Get my organizations
+ Get my organizations # noqa: E501
"""
pass
def test_frontier_service_list_organizations_by_user(self) -> None:
"""Test case for frontier_service_list_organizations_by_user
- Get user organizations
+ Get user organizations # noqa: E501
"""
pass
def test_frontier_service_list_projects_by_current_user(self) -> None:
"""Test case for frontier_service_list_projects_by_current_user
- Get my projects
+ Get my projects # noqa: E501
"""
pass
def test_frontier_service_list_projects_by_user(self) -> None:
"""Test case for frontier_service_list_projects_by_user
- Get user projects
+ Get user projects # noqa: E501
"""
pass
def test_frontier_service_list_user_groups(self) -> None:
"""Test case for frontier_service_list_user_groups
- List user groups
+ List user groups # noqa: E501
"""
pass
def test_frontier_service_list_user_invitations(self) -> None:
"""Test case for frontier_service_list_user_invitations
- List user invitations
+ List user invitations # noqa: E501
"""
pass
def test_frontier_service_list_users(self) -> None:
"""Test case for frontier_service_list_users
- List public users
+ List public users # noqa: E501
"""
pass
def test_frontier_service_update_current_user(self) -> None:
"""Test case for frontier_service_update_current_user
- Update current user
+ Update current user # noqa: E501
"""
pass
def test_frontier_service_update_user(self) -> None:
"""Test case for frontier_service_update_user
- Update user
+ Update user # noqa: E501
"""
pass
diff --git a/test/test_v1beta1_add_platform_user_request.py b/test/test_v1beta1_add_platform_user_request.py
index 432bdd2..0083753 100644
--- a/test/test_v1beta1_add_platform_user_request.py
+++ b/test/test_v1beta1_add_platform_user_request.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_add_platform_user_request import V1beta1AddPlatformUserRequest
+from frontier_api.models.v1beta1_add_platform_user_request import V1beta1AddPlatformUserRequest # noqa: E501
class TestV1beta1AddPlatformUserRequest(unittest.TestCase):
"""V1beta1AddPlatformUserRequest unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1AddPlatformUserRequest:
optional params are included """
# uncomment below to create an instance of `V1beta1AddPlatformUserRequest`
"""
- model = V1beta1AddPlatformUserRequest()
+ model = V1beta1AddPlatformUserRequest() # noqa: E501
if include_optional:
return V1beta1AddPlatformUserRequest(
user_id = '',
diff --git a/test/test_v1beta1_audit_log.py b/test/test_v1beta1_audit_log.py
index 4cabda2..1029369 100644
--- a/test/test_v1beta1_audit_log.py
+++ b/test/test_v1beta1_audit_log.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_audit_log import V1beta1AuditLog
+from frontier_api.models.v1beta1_audit_log import V1beta1AuditLog # noqa: E501
class TestV1beta1AuditLog(unittest.TestCase):
"""V1beta1AuditLog unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1AuditLog:
optional params are included """
# uncomment below to create an instance of `V1beta1AuditLog`
"""
- model = V1beta1AuditLog()
+ model = V1beta1AuditLog() # noqa: E501
if include_optional:
return V1beta1AuditLog(
id = '',
diff --git a/test/test_v1beta1_audit_log_actor.py b/test/test_v1beta1_audit_log_actor.py
index 2d21602..79f344c 100644
--- a/test/test_v1beta1_audit_log_actor.py
+++ b/test/test_v1beta1_audit_log_actor.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_audit_log_actor import V1beta1AuditLogActor
+from frontier_api.models.v1beta1_audit_log_actor import V1beta1AuditLogActor # noqa: E501
class TestV1beta1AuditLogActor(unittest.TestCase):
"""V1beta1AuditLogActor unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1AuditLogActor:
optional params are included """
# uncomment below to create an instance of `V1beta1AuditLogActor`
"""
- model = V1beta1AuditLogActor()
+ model = V1beta1AuditLogActor() # noqa: E501
if include_optional:
return V1beta1AuditLogActor(
id = '',
diff --git a/test/test_v1beta1_audit_log_target.py b/test/test_v1beta1_audit_log_target.py
index 68873d6..5ec2591 100644
--- a/test/test_v1beta1_audit_log_target.py
+++ b/test/test_v1beta1_audit_log_target.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_audit_log_target import V1beta1AuditLogTarget
+from frontier_api.models.v1beta1_audit_log_target import V1beta1AuditLogTarget # noqa: E501
class TestV1beta1AuditLogTarget(unittest.TestCase):
"""V1beta1AuditLogTarget unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1AuditLogTarget:
optional params are included """
# uncomment below to create an instance of `V1beta1AuditLogTarget`
"""
- model = V1beta1AuditLogTarget()
+ model = V1beta1AuditLogTarget() # noqa: E501
if include_optional:
return V1beta1AuditLogTarget(
id = '',
diff --git a/test/test_v1beta1_auth_callback_request.py b/test/test_v1beta1_auth_callback_request.py
index cf14121..01b4b4d 100644
--- a/test/test_v1beta1_auth_callback_request.py
+++ b/test/test_v1beta1_auth_callback_request.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_auth_callback_request import V1beta1AuthCallbackRequest
+from frontier_api.models.v1beta1_auth_callback_request import V1beta1AuthCallbackRequest # noqa: E501
class TestV1beta1AuthCallbackRequest(unittest.TestCase):
"""V1beta1AuthCallbackRequest unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1AuthCallbackRequest:
optional params are included """
# uncomment below to create an instance of `V1beta1AuthCallbackRequest`
"""
- model = V1beta1AuthCallbackRequest()
+ model = V1beta1AuthCallbackRequest() # noqa: E501
if include_optional:
return V1beta1AuthCallbackRequest(
strategy_name = '',
diff --git a/test/test_v1beta1_auth_strategy.py b/test/test_v1beta1_auth_strategy.py
index 65ff082..4f352fa 100644
--- a/test/test_v1beta1_auth_strategy.py
+++ b/test/test_v1beta1_auth_strategy.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_auth_strategy import V1beta1AuthStrategy
+from frontier_api.models.v1beta1_auth_strategy import V1beta1AuthStrategy # noqa: E501
class TestV1beta1AuthStrategy(unittest.TestCase):
"""V1beta1AuthStrategy unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1AuthStrategy:
optional params are included """
# uncomment below to create an instance of `V1beta1AuthStrategy`
"""
- model = V1beta1AuthStrategy()
+ model = V1beta1AuthStrategy() # noqa: E501
if include_optional:
return V1beta1AuthStrategy(
name = '',
diff --git a/test/test_v1beta1_auth_token_request.py b/test/test_v1beta1_auth_token_request.py
index 9c14ad4..b09298f 100644
--- a/test/test_v1beta1_auth_token_request.py
+++ b/test/test_v1beta1_auth_token_request.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_auth_token_request import V1beta1AuthTokenRequest
+from frontier_api.models.v1beta1_auth_token_request import V1beta1AuthTokenRequest # noqa: E501
class TestV1beta1AuthTokenRequest(unittest.TestCase):
"""V1beta1AuthTokenRequest unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1AuthTokenRequest:
optional params are included """
# uncomment below to create an instance of `V1beta1AuthTokenRequest`
"""
- model = V1beta1AuthTokenRequest()
+ model = V1beta1AuthTokenRequest() # noqa: E501
if include_optional:
return V1beta1AuthTokenRequest(
grant_type = '',
diff --git a/test/test_v1beta1_auth_token_response.py b/test/test_v1beta1_auth_token_response.py
index cd3b493..fb2b119 100644
--- a/test/test_v1beta1_auth_token_response.py
+++ b/test/test_v1beta1_auth_token_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_auth_token_response import V1beta1AuthTokenResponse
+from frontier_api.models.v1beta1_auth_token_response import V1beta1AuthTokenResponse # noqa: E501
class TestV1beta1AuthTokenResponse(unittest.TestCase):
"""V1beta1AuthTokenResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1AuthTokenResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1AuthTokenResponse`
"""
- model = V1beta1AuthTokenResponse()
+ model = V1beta1AuthTokenResponse() # noqa: E501
if include_optional:
return V1beta1AuthTokenResponse(
access_token = '',
diff --git a/test/test_v1beta1_authenticate_response.py b/test/test_v1beta1_authenticate_response.py
index 2a3e1b9..f13f259 100644
--- a/test/test_v1beta1_authenticate_response.py
+++ b/test/test_v1beta1_authenticate_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_authenticate_response import V1beta1AuthenticateResponse
+from frontier_api.models.v1beta1_authenticate_response import V1beta1AuthenticateResponse # noqa: E501
class TestV1beta1AuthenticateResponse(unittest.TestCase):
"""V1beta1AuthenticateResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1AuthenticateResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1AuthenticateResponse`
"""
- model = V1beta1AuthenticateResponse()
+ model = V1beta1AuthenticateResponse() # noqa: E501
if include_optional:
return V1beta1AuthenticateResponse(
endpoint = '',
diff --git a/test/test_v1beta1_batch_check_permission_body.py b/test/test_v1beta1_batch_check_permission_body.py
index 78c362d..6fcb104 100644
--- a/test/test_v1beta1_batch_check_permission_body.py
+++ b/test/test_v1beta1_batch_check_permission_body.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_batch_check_permission_body import V1beta1BatchCheckPermissionBody
+from frontier_api.models.v1beta1_batch_check_permission_body import V1beta1BatchCheckPermissionBody # noqa: E501
class TestV1beta1BatchCheckPermissionBody(unittest.TestCase):
"""V1beta1BatchCheckPermissionBody unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1BatchCheckPermissionBody:
optional params are included """
# uncomment below to create an instance of `V1beta1BatchCheckPermissionBody`
"""
- model = V1beta1BatchCheckPermissionBody()
+ model = V1beta1BatchCheckPermissionBody() # noqa: E501
if include_optional:
return V1beta1BatchCheckPermissionBody(
permission = '',
diff --git a/test/test_v1beta1_batch_check_permission_request.py b/test/test_v1beta1_batch_check_permission_request.py
index 8bf948d..a32f1d1 100644
--- a/test/test_v1beta1_batch_check_permission_request.py
+++ b/test/test_v1beta1_batch_check_permission_request.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_batch_check_permission_request import V1beta1BatchCheckPermissionRequest
+from frontier_api.models.v1beta1_batch_check_permission_request import V1beta1BatchCheckPermissionRequest # noqa: E501
class TestV1beta1BatchCheckPermissionRequest(unittest.TestCase):
"""V1beta1BatchCheckPermissionRequest unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1BatchCheckPermissionRequest:
optional params are included """
# uncomment below to create an instance of `V1beta1BatchCheckPermissionRequest`
"""
- model = V1beta1BatchCheckPermissionRequest()
+ model = V1beta1BatchCheckPermissionRequest() # noqa: E501
if include_optional:
return V1beta1BatchCheckPermissionRequest(
bodies = [
diff --git a/test/test_v1beta1_batch_check_permission_response.py b/test/test_v1beta1_batch_check_permission_response.py
index 8d7754e..25d2ac9 100644
--- a/test/test_v1beta1_batch_check_permission_response.py
+++ b/test/test_v1beta1_batch_check_permission_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_batch_check_permission_response import V1beta1BatchCheckPermissionResponse
+from frontier_api.models.v1beta1_batch_check_permission_response import V1beta1BatchCheckPermissionResponse # noqa: E501
class TestV1beta1BatchCheckPermissionResponse(unittest.TestCase):
"""V1beta1BatchCheckPermissionResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1BatchCheckPermissionResponse
optional params are included """
# uncomment below to create an instance of `V1beta1BatchCheckPermissionResponse`
"""
- model = V1beta1BatchCheckPermissionResponse()
+ model = V1beta1BatchCheckPermissionResponse() # noqa: E501
if include_optional:
return V1beta1BatchCheckPermissionResponse(
pairs = [
diff --git a/test/test_v1beta1_batch_check_permission_response_pair.py b/test/test_v1beta1_batch_check_permission_response_pair.py
index a7cdcd9..3a93de7 100644
--- a/test/test_v1beta1_batch_check_permission_response_pair.py
+++ b/test/test_v1beta1_batch_check_permission_response_pair.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_batch_check_permission_response_pair import V1beta1BatchCheckPermissionResponsePair
+from frontier_api.models.v1beta1_batch_check_permission_response_pair import V1beta1BatchCheckPermissionResponsePair # noqa: E501
class TestV1beta1BatchCheckPermissionResponsePair(unittest.TestCase):
"""V1beta1BatchCheckPermissionResponsePair unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1BatchCheckPermissionResponse
optional params are included """
# uncomment below to create an instance of `V1beta1BatchCheckPermissionResponsePair`
"""
- model = V1beta1BatchCheckPermissionResponsePair()
+ model = V1beta1BatchCheckPermissionResponsePair() # noqa: E501
if include_optional:
return V1beta1BatchCheckPermissionResponsePair(
body = frontier_api.models.v1beta1_batch_check_permission_body.v1beta1BatchCheckPermissionBody(
diff --git a/test/test_v1beta1_billing_account.py b/test/test_v1beta1_billing_account.py
index b9926e9..f478781 100644
--- a/test/test_v1beta1_billing_account.py
+++ b/test/test_v1beta1_billing_account.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_billing_account import V1beta1BillingAccount
+from frontier_api.models.v1beta1_billing_account import V1beta1BillingAccount # noqa: E501
class TestV1beta1BillingAccount(unittest.TestCase):
"""V1beta1BillingAccount unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1BillingAccount:
optional params are included """
# uncomment below to create an instance of `V1beta1BillingAccount`
"""
- model = V1beta1BillingAccount()
+ model = V1beta1BillingAccount() # noqa: E501
if include_optional:
return V1beta1BillingAccount(
id = '',
diff --git a/test/test_v1beta1_billing_account_request_body.py b/test/test_v1beta1_billing_account_request_body.py
index 773951b..10180ac 100644
--- a/test/test_v1beta1_billing_account_request_body.py
+++ b/test/test_v1beta1_billing_account_request_body.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_billing_account_request_body import V1beta1BillingAccountRequestBody
+from frontier_api.models.v1beta1_billing_account_request_body import V1beta1BillingAccountRequestBody # noqa: E501
class TestV1beta1BillingAccountRequestBody(unittest.TestCase):
"""V1beta1BillingAccountRequestBody unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1BillingAccountRequestBody:
optional params are included """
# uncomment below to create an instance of `V1beta1BillingAccountRequestBody`
"""
- model = V1beta1BillingAccountRequestBody()
+ model = V1beta1BillingAccountRequestBody() # noqa: E501
if include_optional:
return V1beta1BillingAccountRequestBody(
name = '',
diff --git a/test/test_v1beta1_billing_transaction.py b/test/test_v1beta1_billing_transaction.py
index 4fc8e3d..6017554 100644
--- a/test/test_v1beta1_billing_transaction.py
+++ b/test/test_v1beta1_billing_transaction.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_billing_transaction import V1beta1BillingTransaction
+from frontier_api.models.v1beta1_billing_transaction import V1beta1BillingTransaction # noqa: E501
class TestV1beta1BillingTransaction(unittest.TestCase):
"""V1beta1BillingTransaction unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1BillingTransaction:
optional params are included """
# uncomment below to create an instance of `V1beta1BillingTransaction`
"""
- model = V1beta1BillingTransaction()
+ model = V1beta1BillingTransaction() # noqa: E501
if include_optional:
return V1beta1BillingTransaction(
id = '',
diff --git a/test/test_v1beta1_check_feature_entitlement_response.py b/test/test_v1beta1_check_feature_entitlement_response.py
index 6f17931..253189e 100644
--- a/test/test_v1beta1_check_feature_entitlement_response.py
+++ b/test/test_v1beta1_check_feature_entitlement_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_check_feature_entitlement_response import V1beta1CheckFeatureEntitlementResponse
+from frontier_api.models.v1beta1_check_feature_entitlement_response import V1beta1CheckFeatureEntitlementResponse # noqa: E501
class TestV1beta1CheckFeatureEntitlementResponse(unittest.TestCase):
"""V1beta1CheckFeatureEntitlementResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CheckFeatureEntitlementRespo
optional params are included """
# uncomment below to create an instance of `V1beta1CheckFeatureEntitlementResponse`
"""
- model = V1beta1CheckFeatureEntitlementResponse()
+ model = V1beta1CheckFeatureEntitlementResponse() # noqa: E501
if include_optional:
return V1beta1CheckFeatureEntitlementResponse(
status = True
diff --git a/test/test_v1beta1_check_federated_resource_permission_request.py b/test/test_v1beta1_check_federated_resource_permission_request.py
index 01c1314..13edf69 100644
--- a/test/test_v1beta1_check_federated_resource_permission_request.py
+++ b/test/test_v1beta1_check_federated_resource_permission_request.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_check_federated_resource_permission_request import V1beta1CheckFederatedResourcePermissionRequest
+from frontier_api.models.v1beta1_check_federated_resource_permission_request import V1beta1CheckFederatedResourcePermissionRequest # noqa: E501
class TestV1beta1CheckFederatedResourcePermissionRequest(unittest.TestCase):
"""V1beta1CheckFederatedResourcePermissionRequest unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CheckFederatedResourcePermis
optional params are included """
# uncomment below to create an instance of `V1beta1CheckFederatedResourcePermissionRequest`
"""
- model = V1beta1CheckFederatedResourcePermissionRequest()
+ model = V1beta1CheckFederatedResourcePermissionRequest() # noqa: E501
if include_optional:
return V1beta1CheckFederatedResourcePermissionRequest(
subject = '',
diff --git a/test/test_v1beta1_check_federated_resource_permission_response.py b/test/test_v1beta1_check_federated_resource_permission_response.py
index f1012b3..f2014b1 100644
--- a/test/test_v1beta1_check_federated_resource_permission_response.py
+++ b/test/test_v1beta1_check_federated_resource_permission_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_check_federated_resource_permission_response import V1beta1CheckFederatedResourcePermissionResponse
+from frontier_api.models.v1beta1_check_federated_resource_permission_response import V1beta1CheckFederatedResourcePermissionResponse # noqa: E501
class TestV1beta1CheckFederatedResourcePermissionResponse(unittest.TestCase):
"""V1beta1CheckFederatedResourcePermissionResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CheckFederatedResourcePermis
optional params are included """
# uncomment below to create an instance of `V1beta1CheckFederatedResourcePermissionResponse`
"""
- model = V1beta1CheckFederatedResourcePermissionResponse()
+ model = V1beta1CheckFederatedResourcePermissionResponse() # noqa: E501
if include_optional:
return V1beta1CheckFederatedResourcePermissionResponse(
status = True
diff --git a/test/test_v1beta1_check_resource_permission_request.py b/test/test_v1beta1_check_resource_permission_request.py
index 235e6a5..fad3f2d 100644
--- a/test/test_v1beta1_check_resource_permission_request.py
+++ b/test/test_v1beta1_check_resource_permission_request.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_check_resource_permission_request import V1beta1CheckResourcePermissionRequest
+from frontier_api.models.v1beta1_check_resource_permission_request import V1beta1CheckResourcePermissionRequest # noqa: E501
class TestV1beta1CheckResourcePermissionRequest(unittest.TestCase):
"""V1beta1CheckResourcePermissionRequest unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CheckResourcePermissionReque
optional params are included """
# uncomment below to create an instance of `V1beta1CheckResourcePermissionRequest`
"""
- model = V1beta1CheckResourcePermissionRequest()
+ model = V1beta1CheckResourcePermissionRequest() # noqa: E501
if include_optional:
return V1beta1CheckResourcePermissionRequest(
object_id = '',
diff --git a/test/test_v1beta1_check_resource_permission_response.py b/test/test_v1beta1_check_resource_permission_response.py
index e8aafd9..132fd6a 100644
--- a/test/test_v1beta1_check_resource_permission_response.py
+++ b/test/test_v1beta1_check_resource_permission_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_check_resource_permission_response import V1beta1CheckResourcePermissionResponse
+from frontier_api.models.v1beta1_check_resource_permission_response import V1beta1CheckResourcePermissionResponse # noqa: E501
class TestV1beta1CheckResourcePermissionResponse(unittest.TestCase):
"""V1beta1CheckResourcePermissionResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CheckResourcePermissionRespo
optional params are included """
# uncomment below to create an instance of `V1beta1CheckResourcePermissionResponse`
"""
- model = V1beta1CheckResourcePermissionResponse()
+ model = V1beta1CheckResourcePermissionResponse() # noqa: E501
if include_optional:
return V1beta1CheckResourcePermissionResponse(
status = True
diff --git a/test/test_v1beta1_checkout_feature_body.py b/test/test_v1beta1_checkout_feature_body.py
index c7d3b63..c4dc715 100644
--- a/test/test_v1beta1_checkout_feature_body.py
+++ b/test/test_v1beta1_checkout_feature_body.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_checkout_feature_body import V1beta1CheckoutFeatureBody
+from frontier_api.models.v1beta1_checkout_feature_body import V1beta1CheckoutFeatureBody # noqa: E501
class TestV1beta1CheckoutFeatureBody(unittest.TestCase):
"""V1beta1CheckoutFeatureBody unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CheckoutFeatureBody:
optional params are included """
# uncomment below to create an instance of `V1beta1CheckoutFeatureBody`
"""
- model = V1beta1CheckoutFeatureBody()
+ model = V1beta1CheckoutFeatureBody() # noqa: E501
if include_optional:
return V1beta1CheckoutFeatureBody(
feature = ''
diff --git a/test/test_v1beta1_checkout_session.py b/test/test_v1beta1_checkout_session.py
index 1cd67da..b3bea3e 100644
--- a/test/test_v1beta1_checkout_session.py
+++ b/test/test_v1beta1_checkout_session.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_checkout_session import V1beta1CheckoutSession
+from frontier_api.models.v1beta1_checkout_session import V1beta1CheckoutSession # noqa: E501
class TestV1beta1CheckoutSession(unittest.TestCase):
"""V1beta1CheckoutSession unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CheckoutSession:
optional params are included """
# uncomment below to create an instance of `V1beta1CheckoutSession`
"""
- model = V1beta1CheckoutSession()
+ model = V1beta1CheckoutSession() # noqa: E501
if include_optional:
return V1beta1CheckoutSession(
id = '',
diff --git a/test/test_v1beta1_checkout_subscription_body.py b/test/test_v1beta1_checkout_subscription_body.py
index 80119d5..b77b812 100644
--- a/test/test_v1beta1_checkout_subscription_body.py
+++ b/test/test_v1beta1_checkout_subscription_body.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_checkout_subscription_body import V1beta1CheckoutSubscriptionBody
+from frontier_api.models.v1beta1_checkout_subscription_body import V1beta1CheckoutSubscriptionBody # noqa: E501
class TestV1beta1CheckoutSubscriptionBody(unittest.TestCase):
"""V1beta1CheckoutSubscriptionBody unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CheckoutSubscriptionBody:
optional params are included """
# uncomment below to create an instance of `V1beta1CheckoutSubscriptionBody`
"""
- model = V1beta1CheckoutSubscriptionBody()
+ model = V1beta1CheckoutSubscriptionBody() # noqa: E501
if include_optional:
return V1beta1CheckoutSubscriptionBody(
plan = '',
diff --git a/test/test_v1beta1_create_billing_account_response.py b/test/test_v1beta1_create_billing_account_response.py
index 269e7c5..191cf4a 100644
--- a/test/test_v1beta1_create_billing_account_response.py
+++ b/test/test_v1beta1_create_billing_account_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_billing_account_response import V1beta1CreateBillingAccountResponse
+from frontier_api.models.v1beta1_create_billing_account_response import V1beta1CreateBillingAccountResponse # noqa: E501
class TestV1beta1CreateBillingAccountResponse(unittest.TestCase):
"""V1beta1CreateBillingAccountResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreateBillingAccountResponse
optional params are included """
# uncomment below to create an instance of `V1beta1CreateBillingAccountResponse`
"""
- model = V1beta1CreateBillingAccountResponse()
+ model = V1beta1CreateBillingAccountResponse() # noqa: E501
if include_optional:
return V1beta1CreateBillingAccountResponse(
billing_account = frontier_api.models.v1beta1_billing_account.v1beta1BillingAccount(
diff --git a/test/test_v1beta1_create_checkout_response.py b/test/test_v1beta1_create_checkout_response.py
index e72e2fa..9d8e3c8 100644
--- a/test/test_v1beta1_create_checkout_response.py
+++ b/test/test_v1beta1_create_checkout_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_checkout_response import V1beta1CreateCheckoutResponse
+from frontier_api.models.v1beta1_create_checkout_response import V1beta1CreateCheckoutResponse # noqa: E501
class TestV1beta1CreateCheckoutResponse(unittest.TestCase):
"""V1beta1CreateCheckoutResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreateCheckoutResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1CreateCheckoutResponse`
"""
- model = V1beta1CreateCheckoutResponse()
+ model = V1beta1CreateCheckoutResponse() # noqa: E501
if include_optional:
return V1beta1CreateCheckoutResponse(
checkout_session = frontier_api.models.v1beta1_checkout_session.v1beta1CheckoutSession(
diff --git a/test/test_v1beta1_create_current_user_preferences_request.py b/test/test_v1beta1_create_current_user_preferences_request.py
index 9994a96..aaaae8f 100644
--- a/test/test_v1beta1_create_current_user_preferences_request.py
+++ b/test/test_v1beta1_create_current_user_preferences_request.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_current_user_preferences_request import V1beta1CreateCurrentUserPreferencesRequest
+from frontier_api.models.v1beta1_create_current_user_preferences_request import V1beta1CreateCurrentUserPreferencesRequest # noqa: E501
class TestV1beta1CreateCurrentUserPreferencesRequest(unittest.TestCase):
"""V1beta1CreateCurrentUserPreferencesRequest unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreateCurrentUserPreferences
optional params are included """
# uncomment below to create an instance of `V1beta1CreateCurrentUserPreferencesRequest`
"""
- model = V1beta1CreateCurrentUserPreferencesRequest()
+ model = V1beta1CreateCurrentUserPreferencesRequest() # noqa: E501
if include_optional:
return V1beta1CreateCurrentUserPreferencesRequest(
bodies = [
diff --git a/test/test_v1beta1_create_current_user_preferences_response.py b/test/test_v1beta1_create_current_user_preferences_response.py
index 7375e37..0917a5b 100644
--- a/test/test_v1beta1_create_current_user_preferences_response.py
+++ b/test/test_v1beta1_create_current_user_preferences_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_current_user_preferences_response import V1beta1CreateCurrentUserPreferencesResponse
+from frontier_api.models.v1beta1_create_current_user_preferences_response import V1beta1CreateCurrentUserPreferencesResponse # noqa: E501
class TestV1beta1CreateCurrentUserPreferencesResponse(unittest.TestCase):
"""V1beta1CreateCurrentUserPreferencesResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreateCurrentUserPreferences
optional params are included """
# uncomment below to create an instance of `V1beta1CreateCurrentUserPreferencesResponse`
"""
- model = V1beta1CreateCurrentUserPreferencesResponse()
+ model = V1beta1CreateCurrentUserPreferencesResponse() # noqa: E501
if include_optional:
return V1beta1CreateCurrentUserPreferencesResponse(
preferences = [
diff --git a/test/test_v1beta1_create_feature_request.py b/test/test_v1beta1_create_feature_request.py
index cfc2b3d..22fee2e 100644
--- a/test/test_v1beta1_create_feature_request.py
+++ b/test/test_v1beta1_create_feature_request.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_feature_request import V1beta1CreateFeatureRequest
+from frontier_api.models.v1beta1_create_feature_request import V1beta1CreateFeatureRequest # noqa: E501
class TestV1beta1CreateFeatureRequest(unittest.TestCase):
"""V1beta1CreateFeatureRequest unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreateFeatureRequest:
optional params are included """
# uncomment below to create an instance of `V1beta1CreateFeatureRequest`
"""
- model = V1beta1CreateFeatureRequest()
+ model = V1beta1CreateFeatureRequest() # noqa: E501
if include_optional:
return V1beta1CreateFeatureRequest(
body = frontier_api.models.v1beta1_feature_request_body.v1beta1FeatureRequestBody(
diff --git a/test/test_v1beta1_create_feature_response.py b/test/test_v1beta1_create_feature_response.py
index f647625..6e0e89e 100644
--- a/test/test_v1beta1_create_feature_response.py
+++ b/test/test_v1beta1_create_feature_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_feature_response import V1beta1CreateFeatureResponse
+from frontier_api.models.v1beta1_create_feature_response import V1beta1CreateFeatureResponse # noqa: E501
class TestV1beta1CreateFeatureResponse(unittest.TestCase):
"""V1beta1CreateFeatureResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreateFeatureResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1CreateFeatureResponse`
"""
- model = V1beta1CreateFeatureResponse()
+ model = V1beta1CreateFeatureResponse() # noqa: E501
if include_optional:
return V1beta1CreateFeatureResponse(
feature = frontier_api.models.v1beta1_feature.v1beta1Feature(
diff --git a/test/test_v1beta1_create_group_preferences_response.py b/test/test_v1beta1_create_group_preferences_response.py
index 3c8142c..d86cb4b 100644
--- a/test/test_v1beta1_create_group_preferences_response.py
+++ b/test/test_v1beta1_create_group_preferences_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_group_preferences_response import V1beta1CreateGroupPreferencesResponse
+from frontier_api.models.v1beta1_create_group_preferences_response import V1beta1CreateGroupPreferencesResponse # noqa: E501
class TestV1beta1CreateGroupPreferencesResponse(unittest.TestCase):
"""V1beta1CreateGroupPreferencesResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreateGroupPreferencesRespon
optional params are included """
# uncomment below to create an instance of `V1beta1CreateGroupPreferencesResponse`
"""
- model = V1beta1CreateGroupPreferencesResponse()
+ model = V1beta1CreateGroupPreferencesResponse() # noqa: E501
if include_optional:
return V1beta1CreateGroupPreferencesResponse(
preferences = [
diff --git a/test/test_v1beta1_create_group_response.py b/test/test_v1beta1_create_group_response.py
index 336a782..f95bd3b 100644
--- a/test/test_v1beta1_create_group_response.py
+++ b/test/test_v1beta1_create_group_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_group_response import V1beta1CreateGroupResponse
+from frontier_api.models.v1beta1_create_group_response import V1beta1CreateGroupResponse # noqa: E501
class TestV1beta1CreateGroupResponse(unittest.TestCase):
"""V1beta1CreateGroupResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreateGroupResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1CreateGroupResponse`
"""
- model = V1beta1CreateGroupResponse()
+ model = V1beta1CreateGroupResponse() # noqa: E501
if include_optional:
return V1beta1CreateGroupResponse(
group = frontier_api.models.v1beta1_group.v1beta1Group(
@@ -56,7 +56,8 @@ def make_instance(self, include_optional) -> V1beta1CreateGroupResponse:
updated_at = '2023-06-07T05:39:56.961Z',
state = 'enabled',
avatar = '', )
- ], )
+ ],
+ members_count = 2, )
)
else:
return V1beta1CreateGroupResponse(
diff --git a/test/test_v1beta1_create_meta_schema_response.py b/test/test_v1beta1_create_meta_schema_response.py
index daaa369..d046f5d 100644
--- a/test/test_v1beta1_create_meta_schema_response.py
+++ b/test/test_v1beta1_create_meta_schema_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_meta_schema_response import V1beta1CreateMetaSchemaResponse
+from frontier_api.models.v1beta1_create_meta_schema_response import V1beta1CreateMetaSchemaResponse # noqa: E501
class TestV1beta1CreateMetaSchemaResponse(unittest.TestCase):
"""V1beta1CreateMetaSchemaResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreateMetaSchemaResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1CreateMetaSchemaResponse`
"""
- model = V1beta1CreateMetaSchemaResponse()
+ model = V1beta1CreateMetaSchemaResponse() # noqa: E501
if include_optional:
return V1beta1CreateMetaSchemaResponse(
metaschema = frontier_api.models.v1beta1_meta_schema.v1beta1MetaSchema(
diff --git a/test/test_v1beta1_create_organization_domain_response.py b/test/test_v1beta1_create_organization_domain_response.py
index b2cb388..7ed721b 100644
--- a/test/test_v1beta1_create_organization_domain_response.py
+++ b/test/test_v1beta1_create_organization_domain_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_organization_domain_response import V1beta1CreateOrganizationDomainResponse
+from frontier_api.models.v1beta1_create_organization_domain_response import V1beta1CreateOrganizationDomainResponse # noqa: E501
class TestV1beta1CreateOrganizationDomainResponse(unittest.TestCase):
"""V1beta1CreateOrganizationDomainResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreateOrganizationDomainResp
optional params are included """
# uncomment below to create an instance of `V1beta1CreateOrganizationDomainResponse`
"""
- model = V1beta1CreateOrganizationDomainResponse()
+ model = V1beta1CreateOrganizationDomainResponse() # noqa: E501
if include_optional:
return V1beta1CreateOrganizationDomainResponse(
domain = frontier_api.models.v1beta1_domain.v1beta1Domain(
diff --git a/test/test_v1beta1_create_organization_invitation_response.py b/test/test_v1beta1_create_organization_invitation_response.py
index 6e3978a..2d1b0a5 100644
--- a/test/test_v1beta1_create_organization_invitation_response.py
+++ b/test/test_v1beta1_create_organization_invitation_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_organization_invitation_response import V1beta1CreateOrganizationInvitationResponse
+from frontier_api.models.v1beta1_create_organization_invitation_response import V1beta1CreateOrganizationInvitationResponse # noqa: E501
class TestV1beta1CreateOrganizationInvitationResponse(unittest.TestCase):
"""V1beta1CreateOrganizationInvitationResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreateOrganizationInvitation
optional params are included """
# uncomment below to create an instance of `V1beta1CreateOrganizationInvitationResponse`
"""
- model = V1beta1CreateOrganizationInvitationResponse()
+ model = V1beta1CreateOrganizationInvitationResponse() # noqa: E501
if include_optional:
return V1beta1CreateOrganizationInvitationResponse(
invitations = [
diff --git a/test/test_v1beta1_create_organization_preferences_response.py b/test/test_v1beta1_create_organization_preferences_response.py
index 2ed9182..aaa6dc7 100644
--- a/test/test_v1beta1_create_organization_preferences_response.py
+++ b/test/test_v1beta1_create_organization_preferences_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_organization_preferences_response import V1beta1CreateOrganizationPreferencesResponse
+from frontier_api.models.v1beta1_create_organization_preferences_response import V1beta1CreateOrganizationPreferencesResponse # noqa: E501
class TestV1beta1CreateOrganizationPreferencesResponse(unittest.TestCase):
"""V1beta1CreateOrganizationPreferencesResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreateOrganizationPreference
optional params are included """
# uncomment below to create an instance of `V1beta1CreateOrganizationPreferencesResponse`
"""
- model = V1beta1CreateOrganizationPreferencesResponse()
+ model = V1beta1CreateOrganizationPreferencesResponse() # noqa: E501
if include_optional:
return V1beta1CreateOrganizationPreferencesResponse(
preferences = [
diff --git a/test/test_v1beta1_create_organization_response.py b/test/test_v1beta1_create_organization_response.py
index 352c120..3c39c72 100644
--- a/test/test_v1beta1_create_organization_response.py
+++ b/test/test_v1beta1_create_organization_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_organization_response import V1beta1CreateOrganizationResponse
+from frontier_api.models.v1beta1_create_organization_response import V1beta1CreateOrganizationResponse # noqa: E501
class TestV1beta1CreateOrganizationResponse(unittest.TestCase):
"""V1beta1CreateOrganizationResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreateOrganizationResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1CreateOrganizationResponse`
"""
- model = V1beta1CreateOrganizationResponse()
+ model = V1beta1CreateOrganizationResponse() # noqa: E501
if include_optional:
return V1beta1CreateOrganizationResponse(
organization = frontier_api.models.v1beta1_organization.v1beta1Organization(
diff --git a/test/test_v1beta1_create_organization_role_response.py b/test/test_v1beta1_create_organization_role_response.py
index 1ff2839..e4999c3 100644
--- a/test/test_v1beta1_create_organization_role_response.py
+++ b/test/test_v1beta1_create_organization_role_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_organization_role_response import V1beta1CreateOrganizationRoleResponse
+from frontier_api.models.v1beta1_create_organization_role_response import V1beta1CreateOrganizationRoleResponse # noqa: E501
class TestV1beta1CreateOrganizationRoleResponse(unittest.TestCase):
"""V1beta1CreateOrganizationRoleResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreateOrganizationRoleRespon
optional params are included """
# uncomment below to create an instance of `V1beta1CreateOrganizationRoleResponse`
"""
- model = V1beta1CreateOrganizationRoleResponse()
+ model = V1beta1CreateOrganizationRoleResponse() # noqa: E501
if include_optional:
return V1beta1CreateOrganizationRoleResponse(
role = frontier_api.models.v1beta1_role.v1beta1Role(
diff --git a/test/test_v1beta1_create_permission_request.py b/test/test_v1beta1_create_permission_request.py
index e41fb53..ff9a2c3 100644
--- a/test/test_v1beta1_create_permission_request.py
+++ b/test/test_v1beta1_create_permission_request.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_permission_request import V1beta1CreatePermissionRequest
+from frontier_api.models.v1beta1_create_permission_request import V1beta1CreatePermissionRequest # noqa: E501
class TestV1beta1CreatePermissionRequest(unittest.TestCase):
"""V1beta1CreatePermissionRequest unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreatePermissionRequest:
optional params are included """
# uncomment below to create an instance of `V1beta1CreatePermissionRequest`
"""
- model = V1beta1CreatePermissionRequest()
+ model = V1beta1CreatePermissionRequest() # noqa: E501
if include_optional:
return V1beta1CreatePermissionRequest(
bodies = [
diff --git a/test/test_v1beta1_create_permission_response.py b/test/test_v1beta1_create_permission_response.py
index 276a509..02f3974 100644
--- a/test/test_v1beta1_create_permission_response.py
+++ b/test/test_v1beta1_create_permission_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_permission_response import V1beta1CreatePermissionResponse
+from frontier_api.models.v1beta1_create_permission_response import V1beta1CreatePermissionResponse # noqa: E501
class TestV1beta1CreatePermissionResponse(unittest.TestCase):
"""V1beta1CreatePermissionResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreatePermissionResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1CreatePermissionResponse`
"""
- model = V1beta1CreatePermissionResponse()
+ model = V1beta1CreatePermissionResponse() # noqa: E501
if include_optional:
return V1beta1CreatePermissionResponse(
permissions = [
diff --git a/test/test_v1beta1_create_plan_request.py b/test/test_v1beta1_create_plan_request.py
index 1af9294..91e8171 100644
--- a/test/test_v1beta1_create_plan_request.py
+++ b/test/test_v1beta1_create_plan_request.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_plan_request import V1beta1CreatePlanRequest
+from frontier_api.models.v1beta1_create_plan_request import V1beta1CreatePlanRequest # noqa: E501
class TestV1beta1CreatePlanRequest(unittest.TestCase):
"""V1beta1CreatePlanRequest unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreatePlanRequest:
optional params are included """
# uncomment below to create an instance of `V1beta1CreatePlanRequest`
"""
- model = V1beta1CreatePlanRequest()
+ model = V1beta1CreatePlanRequest() # noqa: E501
if include_optional:
return V1beta1CreatePlanRequest(
body = frontier_api.models.v1beta1_plan_request_body.v1beta1PlanRequestBody(
diff --git a/test/test_v1beta1_create_plan_response.py b/test/test_v1beta1_create_plan_response.py
index 7754a8a..aac1aa1 100644
--- a/test/test_v1beta1_create_plan_response.py
+++ b/test/test_v1beta1_create_plan_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_plan_response import V1beta1CreatePlanResponse
+from frontier_api.models.v1beta1_create_plan_response import V1beta1CreatePlanResponse # noqa: E501
class TestV1beta1CreatePlanResponse(unittest.TestCase):
"""V1beta1CreatePlanResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreatePlanResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1CreatePlanResponse`
"""
- model = V1beta1CreatePlanResponse()
+ model = V1beta1CreatePlanResponse() # noqa: E501
if include_optional:
return V1beta1CreatePlanResponse(
plan = frontier_api.models.v1beta1_plan.v1beta1Plan(
diff --git a/test/test_v1beta1_create_policy_response.py b/test/test_v1beta1_create_policy_response.py
index 2fc0873..1524f24 100644
--- a/test/test_v1beta1_create_policy_response.py
+++ b/test/test_v1beta1_create_policy_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_policy_response import V1beta1CreatePolicyResponse
+from frontier_api.models.v1beta1_create_policy_response import V1beta1CreatePolicyResponse # noqa: E501
class TestV1beta1CreatePolicyResponse(unittest.TestCase):
"""V1beta1CreatePolicyResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreatePolicyResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1CreatePolicyResponse`
"""
- model = V1beta1CreatePolicyResponse()
+ model = V1beta1CreatePolicyResponse() # noqa: E501
if include_optional:
return V1beta1CreatePolicyResponse(
policy = frontier_api.models.v1beta1_policy.v1beta1Policy(
diff --git a/test/test_v1beta1_create_preferences_request.py b/test/test_v1beta1_create_preferences_request.py
index 53a4004..3725a07 100644
--- a/test/test_v1beta1_create_preferences_request.py
+++ b/test/test_v1beta1_create_preferences_request.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_preferences_request import V1beta1CreatePreferencesRequest
+from frontier_api.models.v1beta1_create_preferences_request import V1beta1CreatePreferencesRequest # noqa: E501
class TestV1beta1CreatePreferencesRequest(unittest.TestCase):
"""V1beta1CreatePreferencesRequest unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreatePreferencesRequest:
optional params are included """
# uncomment below to create an instance of `V1beta1CreatePreferencesRequest`
"""
- model = V1beta1CreatePreferencesRequest()
+ model = V1beta1CreatePreferencesRequest() # noqa: E501
if include_optional:
return V1beta1CreatePreferencesRequest(
preferences = [
diff --git a/test/test_v1beta1_create_preferences_response.py b/test/test_v1beta1_create_preferences_response.py
index ae5e1f1..5f8045a 100644
--- a/test/test_v1beta1_create_preferences_response.py
+++ b/test/test_v1beta1_create_preferences_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_preferences_response import V1beta1CreatePreferencesResponse
+from frontier_api.models.v1beta1_create_preferences_response import V1beta1CreatePreferencesResponse # noqa: E501
class TestV1beta1CreatePreferencesResponse(unittest.TestCase):
"""V1beta1CreatePreferencesResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreatePreferencesResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1CreatePreferencesResponse`
"""
- model = V1beta1CreatePreferencesResponse()
+ model = V1beta1CreatePreferencesResponse() # noqa: E501
if include_optional:
return V1beta1CreatePreferencesResponse(
preference = [
diff --git a/test/test_v1beta1_create_project_preferences_response.py b/test/test_v1beta1_create_project_preferences_response.py
index 6bc0806..0cb1ac0 100644
--- a/test/test_v1beta1_create_project_preferences_response.py
+++ b/test/test_v1beta1_create_project_preferences_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_project_preferences_response import V1beta1CreateProjectPreferencesResponse
+from frontier_api.models.v1beta1_create_project_preferences_response import V1beta1CreateProjectPreferencesResponse # noqa: E501
class TestV1beta1CreateProjectPreferencesResponse(unittest.TestCase):
"""V1beta1CreateProjectPreferencesResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreateProjectPreferencesResp
optional params are included """
# uncomment below to create an instance of `V1beta1CreateProjectPreferencesResponse`
"""
- model = V1beta1CreateProjectPreferencesResponse()
+ model = V1beta1CreateProjectPreferencesResponse() # noqa: E501
if include_optional:
return V1beta1CreateProjectPreferencesResponse(
preferences = [
diff --git a/test/test_v1beta1_create_project_resource_response.py b/test/test_v1beta1_create_project_resource_response.py
index 812f42e..72b67b5 100644
--- a/test/test_v1beta1_create_project_resource_response.py
+++ b/test/test_v1beta1_create_project_resource_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_project_resource_response import V1beta1CreateProjectResourceResponse
+from frontier_api.models.v1beta1_create_project_resource_response import V1beta1CreateProjectResourceResponse # noqa: E501
class TestV1beta1CreateProjectResourceResponse(unittest.TestCase):
"""V1beta1CreateProjectResourceResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreateProjectResourceRespons
optional params are included """
# uncomment below to create an instance of `V1beta1CreateProjectResourceResponse`
"""
- model = V1beta1CreateProjectResourceResponse()
+ model = V1beta1CreateProjectResourceResponse() # noqa: E501
if include_optional:
return V1beta1CreateProjectResourceResponse(
resource = frontier_api.models.v1beta1_resource.v1beta1Resource(
diff --git a/test/test_v1beta1_create_project_response.py b/test/test_v1beta1_create_project_response.py
index c38087e..2932bd6 100644
--- a/test/test_v1beta1_create_project_response.py
+++ b/test/test_v1beta1_create_project_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_project_response import V1beta1CreateProjectResponse
+from frontier_api.models.v1beta1_create_project_response import V1beta1CreateProjectResponse # noqa: E501
class TestV1beta1CreateProjectResponse(unittest.TestCase):
"""V1beta1CreateProjectResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreateProjectResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1CreateProjectResponse`
"""
- model = V1beta1CreateProjectResponse()
+ model = V1beta1CreateProjectResponse() # noqa: E501
if include_optional:
return V1beta1CreateProjectResponse(
project = frontier_api.models.v1beta1_project.v1beta1Project(
@@ -44,7 +44,8 @@ def make_instance(self, include_optional) -> V1beta1CreateProjectResponse:
org_id = '',
metadata = frontier_api.models.metadata.metadata(),
created_at = '2023-06-07T05:39:56.961Z',
- updated_at = '2023-06-07T05:39:56.961Z', )
+ updated_at = '2023-06-07T05:39:56.961Z',
+ members_count = 2, )
)
else:
return V1beta1CreateProjectResponse(
diff --git a/test/test_v1beta1_create_relation_response.py b/test/test_v1beta1_create_relation_response.py
index 9c6a9ed..9ed086b 100644
--- a/test/test_v1beta1_create_relation_response.py
+++ b/test/test_v1beta1_create_relation_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_relation_response import V1beta1CreateRelationResponse
+from frontier_api.models.v1beta1_create_relation_response import V1beta1CreateRelationResponse # noqa: E501
class TestV1beta1CreateRelationResponse(unittest.TestCase):
"""V1beta1CreateRelationResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreateRelationResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1CreateRelationResponse`
"""
- model = V1beta1CreateRelationResponse()
+ model = V1beta1CreateRelationResponse() # noqa: E501
if include_optional:
return V1beta1CreateRelationResponse(
relation = frontier_api.models.v1beta1_relation.v1beta1Relation(
diff --git a/test/test_v1beta1_create_role_response.py b/test/test_v1beta1_create_role_response.py
index 3337d0a..0221f13 100644
--- a/test/test_v1beta1_create_role_response.py
+++ b/test/test_v1beta1_create_role_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_role_response import V1beta1CreateRoleResponse
+from frontier_api.models.v1beta1_create_role_response import V1beta1CreateRoleResponse # noqa: E501
class TestV1beta1CreateRoleResponse(unittest.TestCase):
"""V1beta1CreateRoleResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreateRoleResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1CreateRoleResponse`
"""
- model = V1beta1CreateRoleResponse()
+ model = V1beta1CreateRoleResponse() # noqa: E501
if include_optional:
return V1beta1CreateRoleResponse(
role = frontier_api.models.v1beta1_role.v1beta1Role(
diff --git a/test/test_v1beta1_create_service_user_key_response.py b/test/test_v1beta1_create_service_user_key_response.py
index 276247e..f4aeace 100644
--- a/test/test_v1beta1_create_service_user_key_response.py
+++ b/test/test_v1beta1_create_service_user_key_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_service_user_key_response import V1beta1CreateServiceUserKeyResponse
+from frontier_api.models.v1beta1_create_service_user_key_response import V1beta1CreateServiceUserKeyResponse # noqa: E501
class TestV1beta1CreateServiceUserKeyResponse(unittest.TestCase):
"""V1beta1CreateServiceUserKeyResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreateServiceUserKeyResponse
optional params are included """
# uncomment below to create an instance of `V1beta1CreateServiceUserKeyResponse`
"""
- model = V1beta1CreateServiceUserKeyResponse()
+ model = V1beta1CreateServiceUserKeyResponse() # noqa: E501
if include_optional:
return V1beta1CreateServiceUserKeyResponse(
key = frontier_api.models.v1beta1_key_credential.v1beta1KeyCredential(
diff --git a/test/test_v1beta1_create_service_user_request.py b/test/test_v1beta1_create_service_user_request.py
index 2380283..b578903 100644
--- a/test/test_v1beta1_create_service_user_request.py
+++ b/test/test_v1beta1_create_service_user_request.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_service_user_request import V1beta1CreateServiceUserRequest
+from frontier_api.models.v1beta1_create_service_user_request import V1beta1CreateServiceUserRequest # noqa: E501
class TestV1beta1CreateServiceUserRequest(unittest.TestCase):
"""V1beta1CreateServiceUserRequest unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreateServiceUserRequest:
optional params are included """
# uncomment below to create an instance of `V1beta1CreateServiceUserRequest`
"""
- model = V1beta1CreateServiceUserRequest()
+ model = V1beta1CreateServiceUserRequest() # noqa: E501
if include_optional:
return V1beta1CreateServiceUserRequest(
body = frontier_api.models.v1beta1_service_user_request_body.v1beta1ServiceUserRequestBody(
diff --git a/test/test_v1beta1_create_service_user_response.py b/test/test_v1beta1_create_service_user_response.py
index 893ac47..ee5cba6 100644
--- a/test/test_v1beta1_create_service_user_response.py
+++ b/test/test_v1beta1_create_service_user_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_service_user_response import V1beta1CreateServiceUserResponse
+from frontier_api.models.v1beta1_create_service_user_response import V1beta1CreateServiceUserResponse # noqa: E501
class TestV1beta1CreateServiceUserResponse(unittest.TestCase):
"""V1beta1CreateServiceUserResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreateServiceUserResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1CreateServiceUserResponse`
"""
- model = V1beta1CreateServiceUserResponse()
+ model = V1beta1CreateServiceUserResponse() # noqa: E501
if include_optional:
return V1beta1CreateServiceUserResponse(
serviceuser = frontier_api.models.v1beta1_service_user.v1beta1ServiceUser(
diff --git a/test/test_v1beta1_create_service_user_secret_response.py b/test/test_v1beta1_create_service_user_secret_response.py
index c555235..a0d873f 100644
--- a/test/test_v1beta1_create_service_user_secret_response.py
+++ b/test/test_v1beta1_create_service_user_secret_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_service_user_secret_response import V1beta1CreateServiceUserSecretResponse
+from frontier_api.models.v1beta1_create_service_user_secret_response import V1beta1CreateServiceUserSecretResponse # noqa: E501
class TestV1beta1CreateServiceUserSecretResponse(unittest.TestCase):
"""V1beta1CreateServiceUserSecretResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreateServiceUserSecretRespo
optional params are included """
# uncomment below to create an instance of `V1beta1CreateServiceUserSecretResponse`
"""
- model = V1beta1CreateServiceUserSecretResponse()
+ model = V1beta1CreateServiceUserSecretResponse() # noqa: E501
if include_optional:
return V1beta1CreateServiceUserSecretResponse(
secret = frontier_api.models.v1beta1_secret_credential.v1beta1SecretCredential(
diff --git a/test/test_v1beta1_create_user_preferences_response.py b/test/test_v1beta1_create_user_preferences_response.py
index 478636a..ef88649 100644
--- a/test/test_v1beta1_create_user_preferences_response.py
+++ b/test/test_v1beta1_create_user_preferences_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_user_preferences_response import V1beta1CreateUserPreferencesResponse
+from frontier_api.models.v1beta1_create_user_preferences_response import V1beta1CreateUserPreferencesResponse # noqa: E501
class TestV1beta1CreateUserPreferencesResponse(unittest.TestCase):
"""V1beta1CreateUserPreferencesResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreateUserPreferencesRespons
optional params are included """
# uncomment below to create an instance of `V1beta1CreateUserPreferencesResponse`
"""
- model = V1beta1CreateUserPreferencesResponse()
+ model = V1beta1CreateUserPreferencesResponse() # noqa: E501
if include_optional:
return V1beta1CreateUserPreferencesResponse(
preferences = [
diff --git a/test/test_v1beta1_create_user_response.py b/test/test_v1beta1_create_user_response.py
index 088ec00..5a8559e 100644
--- a/test/test_v1beta1_create_user_response.py
+++ b/test/test_v1beta1_create_user_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_create_user_response import V1beta1CreateUserResponse
+from frontier_api.models.v1beta1_create_user_response import V1beta1CreateUserResponse # noqa: E501
class TestV1beta1CreateUserResponse(unittest.TestCase):
"""V1beta1CreateUserResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1CreateUserResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1CreateUserResponse`
"""
- model = V1beta1CreateUserResponse()
+ model = V1beta1CreateUserResponse() # noqa: E501
if include_optional:
return V1beta1CreateUserResponse(
user = frontier_api.models.v1beta1_user.v1beta1User(
diff --git a/test/test_v1beta1_delegated_checkout_response.py b/test/test_v1beta1_delegated_checkout_response.py
new file mode 100644
index 0000000..ca5fbad
--- /dev/null
+++ b/test/test_v1beta1_delegated_checkout_response.py
@@ -0,0 +1,62 @@
+# coding: utf-8
+
+"""
+ Frontier Administration API
+
+ The Frontier APIs adhere to the OpenAPI specification, also known as Swagger, which provides a standardized approach for designing, documenting, and consuming RESTful APIs. With OpenAPI, you gain a clear understanding of the API endpoints, request/response structures, and authentication mechanisms supported by the Frontier APIs. By leveraging the OpenAPI specification, developers can easily explore and interact with the Frontier APIs using a variety of tools and libraries. The OpenAPI specification enables automatic code generation, interactive API documentation, and seamless integration with API testing frameworks, making it easier than ever to integrate Frontier into your existing applications and workflows.
+
+ The version of the OpenAPI document: 0.2.0
+ Contact: hello@raystack.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+import datetime
+
+from frontier_api.models.v1beta1_delegated_checkout_response import V1beta1DelegatedCheckoutResponse # noqa: E501
+
+class TestV1beta1DelegatedCheckoutResponse(unittest.TestCase):
+ """V1beta1DelegatedCheckoutResponse unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> V1beta1DelegatedCheckoutResponse:
+ """Test V1beta1DelegatedCheckoutResponse
+ 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 `V1beta1DelegatedCheckoutResponse`
+ """
+ model = V1beta1DelegatedCheckoutResponse() # noqa: E501
+ if include_optional:
+ return V1beta1DelegatedCheckoutResponse(
+ checkout_session = frontier_api.models.v1beta1_checkout_session.v1beta1CheckoutSession(
+ id = '',
+ checkout_url = '',
+ success_url = '',
+ cancel_url = '',
+ state = '',
+ metadata = frontier_api.models.metadata.metadata(),
+ created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ expire_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), )
+ )
+ else:
+ return V1beta1DelegatedCheckoutResponse(
+ )
+ """
+
+ def testV1beta1DelegatedCheckoutResponse(self):
+ """Test V1beta1DelegatedCheckoutResponse"""
+ # 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_v1beta1_describe_preferences_response.py b/test/test_v1beta1_describe_preferences_response.py
index 5f1358a..c6f9460 100644
--- a/test/test_v1beta1_describe_preferences_response.py
+++ b/test/test_v1beta1_describe_preferences_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_describe_preferences_response import V1beta1DescribePreferencesResponse
+from frontier_api.models.v1beta1_describe_preferences_response import V1beta1DescribePreferencesResponse # noqa: E501
class TestV1beta1DescribePreferencesResponse(unittest.TestCase):
"""V1beta1DescribePreferencesResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1DescribePreferencesResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1DescribePreferencesResponse`
"""
- model = V1beta1DescribePreferencesResponse()
+ model = V1beta1DescribePreferencesResponse() # noqa: E501
if include_optional:
return V1beta1DescribePreferencesResponse(
traits = [
diff --git a/test/test_v1beta1_domain.py b/test/test_v1beta1_domain.py
index 4b4e540..9b3c8a0 100644
--- a/test/test_v1beta1_domain.py
+++ b/test/test_v1beta1_domain.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_domain import V1beta1Domain
+from frontier_api.models.v1beta1_domain import V1beta1Domain # noqa: E501
class TestV1beta1Domain(unittest.TestCase):
"""V1beta1Domain unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1Domain:
optional params are included """
# uncomment below to create an instance of `V1beta1Domain`
"""
- model = V1beta1Domain()
+ model = V1beta1Domain() # noqa: E501
if include_optional:
return V1beta1Domain(
id = '943e4567-e89b-12d3-a456-426655440000',
diff --git a/test/test_v1beta1_feature.py b/test/test_v1beta1_feature.py
index aa1750b..8f4eff5 100644
--- a/test/test_v1beta1_feature.py
+++ b/test/test_v1beta1_feature.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_feature import V1beta1Feature
+from frontier_api.models.v1beta1_feature import V1beta1Feature # noqa: E501
class TestV1beta1Feature(unittest.TestCase):
"""V1beta1Feature unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1Feature:
optional params are included """
# uncomment below to create an instance of `V1beta1Feature`
"""
- model = V1beta1Feature()
+ model = V1beta1Feature() # noqa: E501
if include_optional:
return V1beta1Feature(
id = '',
diff --git a/test/test_v1beta1_feature_request_body.py b/test/test_v1beta1_feature_request_body.py
index 3cb0074..ca14e2e 100644
--- a/test/test_v1beta1_feature_request_body.py
+++ b/test/test_v1beta1_feature_request_body.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_feature_request_body import V1beta1FeatureRequestBody
+from frontier_api.models.v1beta1_feature_request_body import V1beta1FeatureRequestBody # noqa: E501
class TestV1beta1FeatureRequestBody(unittest.TestCase):
"""V1beta1FeatureRequestBody unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1FeatureRequestBody:
optional params are included """
# uncomment below to create an instance of `V1beta1FeatureRequestBody`
"""
- model = V1beta1FeatureRequestBody()
+ model = V1beta1FeatureRequestBody() # noqa: E501
if include_optional:
return V1beta1FeatureRequestBody(
name = '',
diff --git a/test/test_v1beta1_get_billing_account_response.py b/test/test_v1beta1_get_billing_account_response.py
index b898f28..b203275 100644
--- a/test/test_v1beta1_get_billing_account_response.py
+++ b/test/test_v1beta1_get_billing_account_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_get_billing_account_response import V1beta1GetBillingAccountResponse
+from frontier_api.models.v1beta1_get_billing_account_response import V1beta1GetBillingAccountResponse # noqa: E501
class TestV1beta1GetBillingAccountResponse(unittest.TestCase):
"""V1beta1GetBillingAccountResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1GetBillingAccountResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1GetBillingAccountResponse`
"""
- model = V1beta1GetBillingAccountResponse()
+ model = V1beta1GetBillingAccountResponse() # noqa: E501
if include_optional:
return V1beta1GetBillingAccountResponse(
billing_account = frontier_api.models.v1beta1_billing_account.v1beta1BillingAccount(
diff --git a/test/test_v1beta1_get_billing_balance_response.py b/test/test_v1beta1_get_billing_balance_response.py
index 3da6b34..472e5e0 100644
--- a/test/test_v1beta1_get_billing_balance_response.py
+++ b/test/test_v1beta1_get_billing_balance_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_get_billing_balance_response import V1beta1GetBillingBalanceResponse
+from frontier_api.models.v1beta1_get_billing_balance_response import V1beta1GetBillingBalanceResponse # noqa: E501
class TestV1beta1GetBillingBalanceResponse(unittest.TestCase):
"""V1beta1GetBillingBalanceResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1GetBillingBalanceResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1GetBillingBalanceResponse`
"""
- model = V1beta1GetBillingBalanceResponse()
+ model = V1beta1GetBillingBalanceResponse() # noqa: E501
if include_optional:
return V1beta1GetBillingBalanceResponse(
balance = frontier_api.models.billing_account_balance.BillingAccountBalance(
diff --git a/test/test_v1beta1_get_current_user_response.py b/test/test_v1beta1_get_current_user_response.py
index 1327ab1..d860e6d 100644
--- a/test/test_v1beta1_get_current_user_response.py
+++ b/test/test_v1beta1_get_current_user_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_get_current_user_response import V1beta1GetCurrentUserResponse
+from frontier_api.models.v1beta1_get_current_user_response import V1beta1GetCurrentUserResponse # noqa: E501
class TestV1beta1GetCurrentUserResponse(unittest.TestCase):
"""V1beta1GetCurrentUserResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1GetCurrentUserResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1GetCurrentUserResponse`
"""
- model = V1beta1GetCurrentUserResponse()
+ model = V1beta1GetCurrentUserResponse() # noqa: E501
if include_optional:
return V1beta1GetCurrentUserResponse(
user = frontier_api.models.v1beta1_user.v1beta1User(
diff --git a/test/test_v1beta1_get_feature_response.py b/test/test_v1beta1_get_feature_response.py
index b0a4b77..c8c0af5 100644
--- a/test/test_v1beta1_get_feature_response.py
+++ b/test/test_v1beta1_get_feature_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_get_feature_response import V1beta1GetFeatureResponse
+from frontier_api.models.v1beta1_get_feature_response import V1beta1GetFeatureResponse # noqa: E501
class TestV1beta1GetFeatureResponse(unittest.TestCase):
"""V1beta1GetFeatureResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1GetFeatureResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1GetFeatureResponse`
"""
- model = V1beta1GetFeatureResponse()
+ model = V1beta1GetFeatureResponse() # noqa: E501
if include_optional:
return V1beta1GetFeatureResponse(
feature = frontier_api.models.v1beta1_feature.v1beta1Feature(
diff --git a/test/test_v1beta1_get_group_response.py b/test/test_v1beta1_get_group_response.py
index 94d5310..ae345db 100644
--- a/test/test_v1beta1_get_group_response.py
+++ b/test/test_v1beta1_get_group_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_get_group_response import V1beta1GetGroupResponse
+from frontier_api.models.v1beta1_get_group_response import V1beta1GetGroupResponse # noqa: E501
class TestV1beta1GetGroupResponse(unittest.TestCase):
"""V1beta1GetGroupResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1GetGroupResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1GetGroupResponse`
"""
- model = V1beta1GetGroupResponse()
+ model = V1beta1GetGroupResponse() # noqa: E501
if include_optional:
return V1beta1GetGroupResponse(
group = frontier_api.models.v1beta1_group.v1beta1Group(
@@ -56,7 +56,8 @@ def make_instance(self, include_optional) -> V1beta1GetGroupResponse:
updated_at = '2023-06-07T05:39:56.961Z',
state = 'enabled',
avatar = '', )
- ], )
+ ],
+ members_count = 2, )
)
else:
return V1beta1GetGroupResponse(
diff --git a/test/test_v1beta1_get_jwks_response.py b/test/test_v1beta1_get_jwks_response.py
index 398c814..6cc9f43 100644
--- a/test/test_v1beta1_get_jwks_response.py
+++ b/test/test_v1beta1_get_jwks_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_get_jwks_response import V1beta1GetJWKsResponse
+from frontier_api.models.v1beta1_get_jwks_response import V1beta1GetJWKsResponse # noqa: E501
class TestV1beta1GetJWKsResponse(unittest.TestCase):
"""V1beta1GetJWKsResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1GetJWKsResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1GetJWKsResponse`
"""
- model = V1beta1GetJWKsResponse()
+ model = V1beta1GetJWKsResponse() # noqa: E501
if include_optional:
return V1beta1GetJWKsResponse(
keys = [
diff --git a/test/test_v1beta1_get_meta_schema_response.py b/test/test_v1beta1_get_meta_schema_response.py
index 28546c4..bbc2f11 100644
--- a/test/test_v1beta1_get_meta_schema_response.py
+++ b/test/test_v1beta1_get_meta_schema_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_get_meta_schema_response import V1beta1GetMetaSchemaResponse
+from frontier_api.models.v1beta1_get_meta_schema_response import V1beta1GetMetaSchemaResponse # noqa: E501
class TestV1beta1GetMetaSchemaResponse(unittest.TestCase):
"""V1beta1GetMetaSchemaResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1GetMetaSchemaResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1GetMetaSchemaResponse`
"""
- model = V1beta1GetMetaSchemaResponse()
+ model = V1beta1GetMetaSchemaResponse() # noqa: E501
if include_optional:
return V1beta1GetMetaSchemaResponse(
metaschema = frontier_api.models.v1beta1_meta_schema.v1beta1MetaSchema(
diff --git a/test/test_v1beta1_get_namespace_response.py b/test/test_v1beta1_get_namespace_response.py
index f3ef64f..7a38dea 100644
--- a/test/test_v1beta1_get_namespace_response.py
+++ b/test/test_v1beta1_get_namespace_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_get_namespace_response import V1beta1GetNamespaceResponse
+from frontier_api.models.v1beta1_get_namespace_response import V1beta1GetNamespaceResponse # noqa: E501
class TestV1beta1GetNamespaceResponse(unittest.TestCase):
"""V1beta1GetNamespaceResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1GetNamespaceResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1GetNamespaceResponse`
"""
- model = V1beta1GetNamespaceResponse()
+ model = V1beta1GetNamespaceResponse() # noqa: E501
if include_optional:
return V1beta1GetNamespaceResponse(
namespace = frontier_api.models.v1beta1_namespace.v1beta1Namespace(
diff --git a/test/test_v1beta1_get_organization_audit_log_response.py b/test/test_v1beta1_get_organization_audit_log_response.py
index 9961c81..2d81480 100644
--- a/test/test_v1beta1_get_organization_audit_log_response.py
+++ b/test/test_v1beta1_get_organization_audit_log_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_get_organization_audit_log_response import V1beta1GetOrganizationAuditLogResponse
+from frontier_api.models.v1beta1_get_organization_audit_log_response import V1beta1GetOrganizationAuditLogResponse # noqa: E501
class TestV1beta1GetOrganizationAuditLogResponse(unittest.TestCase):
"""V1beta1GetOrganizationAuditLogResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1GetOrganizationAuditLogRespo
optional params are included """
# uncomment below to create an instance of `V1beta1GetOrganizationAuditLogResponse`
"""
- model = V1beta1GetOrganizationAuditLogResponse()
+ model = V1beta1GetOrganizationAuditLogResponse() # noqa: E501
if include_optional:
return V1beta1GetOrganizationAuditLogResponse(
log = frontier_api.models.v1beta1_audit_log.v1beta1AuditLog(
diff --git a/test/test_v1beta1_get_organization_domain_response.py b/test/test_v1beta1_get_organization_domain_response.py
index 5188a10..a393b40 100644
--- a/test/test_v1beta1_get_organization_domain_response.py
+++ b/test/test_v1beta1_get_organization_domain_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_get_organization_domain_response import V1beta1GetOrganizationDomainResponse
+from frontier_api.models.v1beta1_get_organization_domain_response import V1beta1GetOrganizationDomainResponse # noqa: E501
class TestV1beta1GetOrganizationDomainResponse(unittest.TestCase):
"""V1beta1GetOrganizationDomainResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1GetOrganizationDomainRespons
optional params are included """
# uncomment below to create an instance of `V1beta1GetOrganizationDomainResponse`
"""
- model = V1beta1GetOrganizationDomainResponse()
+ model = V1beta1GetOrganizationDomainResponse() # noqa: E501
if include_optional:
return V1beta1GetOrganizationDomainResponse(
domain = frontier_api.models.v1beta1_domain.v1beta1Domain(
diff --git a/test/test_v1beta1_get_organization_invitation_response.py b/test/test_v1beta1_get_organization_invitation_response.py
index 8c9f5b0..525cfc6 100644
--- a/test/test_v1beta1_get_organization_invitation_response.py
+++ b/test/test_v1beta1_get_organization_invitation_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_get_organization_invitation_response import V1beta1GetOrganizationInvitationResponse
+from frontier_api.models.v1beta1_get_organization_invitation_response import V1beta1GetOrganizationInvitationResponse # noqa: E501
class TestV1beta1GetOrganizationInvitationResponse(unittest.TestCase):
"""V1beta1GetOrganizationInvitationResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1GetOrganizationInvitationRes
optional params are included """
# uncomment below to create an instance of `V1beta1GetOrganizationInvitationResponse`
"""
- model = V1beta1GetOrganizationInvitationResponse()
+ model = V1beta1GetOrganizationInvitationResponse() # noqa: E501
if include_optional:
return V1beta1GetOrganizationInvitationResponse(
invitation = frontier_api.models.v1beta1_invitation.v1beta1Invitation(
diff --git a/test/test_v1beta1_get_organization_response.py b/test/test_v1beta1_get_organization_response.py
index 500da79..2c0245a 100644
--- a/test/test_v1beta1_get_organization_response.py
+++ b/test/test_v1beta1_get_organization_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_get_organization_response import V1beta1GetOrganizationResponse
+from frontier_api.models.v1beta1_get_organization_response import V1beta1GetOrganizationResponse # noqa: E501
class TestV1beta1GetOrganizationResponse(unittest.TestCase):
"""V1beta1GetOrganizationResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1GetOrganizationResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1GetOrganizationResponse`
"""
- model = V1beta1GetOrganizationResponse()
+ model = V1beta1GetOrganizationResponse() # noqa: E501
if include_optional:
return V1beta1GetOrganizationResponse(
organization = frontier_api.models.v1beta1_organization.v1beta1Organization(
diff --git a/test/test_v1beta1_get_organization_role_response.py b/test/test_v1beta1_get_organization_role_response.py
index 474dc40..8fd489a 100644
--- a/test/test_v1beta1_get_organization_role_response.py
+++ b/test/test_v1beta1_get_organization_role_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_get_organization_role_response import V1beta1GetOrganizationRoleResponse
+from frontier_api.models.v1beta1_get_organization_role_response import V1beta1GetOrganizationRoleResponse # noqa: E501
class TestV1beta1GetOrganizationRoleResponse(unittest.TestCase):
"""V1beta1GetOrganizationRoleResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1GetOrganizationRoleResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1GetOrganizationRoleResponse`
"""
- model = V1beta1GetOrganizationRoleResponse()
+ model = V1beta1GetOrganizationRoleResponse() # noqa: E501
if include_optional:
return V1beta1GetOrganizationRoleResponse(
role = frontier_api.models.v1beta1_role.v1beta1Role(
diff --git a/test/test_v1beta1_get_permission_response.py b/test/test_v1beta1_get_permission_response.py
index eea0e62..c3e4570 100644
--- a/test/test_v1beta1_get_permission_response.py
+++ b/test/test_v1beta1_get_permission_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_get_permission_response import V1beta1GetPermissionResponse
+from frontier_api.models.v1beta1_get_permission_response import V1beta1GetPermissionResponse # noqa: E501
class TestV1beta1GetPermissionResponse(unittest.TestCase):
"""V1beta1GetPermissionResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1GetPermissionResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1GetPermissionResponse`
"""
- model = V1beta1GetPermissionResponse()
+ model = V1beta1GetPermissionResponse() # noqa: E501
if include_optional:
return V1beta1GetPermissionResponse(
permission = frontier_api.models.v1beta1_permission.v1beta1Permission(
diff --git a/test/test_v1beta1_get_plan_response.py b/test/test_v1beta1_get_plan_response.py
index dfc012e..2d5bac0 100644
--- a/test/test_v1beta1_get_plan_response.py
+++ b/test/test_v1beta1_get_plan_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_get_plan_response import V1beta1GetPlanResponse
+from frontier_api.models.v1beta1_get_plan_response import V1beta1GetPlanResponse # noqa: E501
class TestV1beta1GetPlanResponse(unittest.TestCase):
"""V1beta1GetPlanResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1GetPlanResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1GetPlanResponse`
"""
- model = V1beta1GetPlanResponse()
+ model = V1beta1GetPlanResponse() # noqa: E501
if include_optional:
return V1beta1GetPlanResponse(
plan = frontier_api.models.v1beta1_plan.v1beta1Plan(
diff --git a/test/test_v1beta1_get_policy_response.py b/test/test_v1beta1_get_policy_response.py
index 40676ac..c1d10ba 100644
--- a/test/test_v1beta1_get_policy_response.py
+++ b/test/test_v1beta1_get_policy_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_get_policy_response import V1beta1GetPolicyResponse
+from frontier_api.models.v1beta1_get_policy_response import V1beta1GetPolicyResponse # noqa: E501
class TestV1beta1GetPolicyResponse(unittest.TestCase):
"""V1beta1GetPolicyResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1GetPolicyResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1GetPolicyResponse`
"""
- model = V1beta1GetPolicyResponse()
+ model = V1beta1GetPolicyResponse() # noqa: E501
if include_optional:
return V1beta1GetPolicyResponse(
policy = frontier_api.models.v1beta1_policy.v1beta1Policy(
diff --git a/test/test_v1beta1_get_project_resource_response.py b/test/test_v1beta1_get_project_resource_response.py
index 9f3d9d1..45806c3 100644
--- a/test/test_v1beta1_get_project_resource_response.py
+++ b/test/test_v1beta1_get_project_resource_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_get_project_resource_response import V1beta1GetProjectResourceResponse
+from frontier_api.models.v1beta1_get_project_resource_response import V1beta1GetProjectResourceResponse # noqa: E501
class TestV1beta1GetProjectResourceResponse(unittest.TestCase):
"""V1beta1GetProjectResourceResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1GetProjectResourceResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1GetProjectResourceResponse`
"""
- model = V1beta1GetProjectResourceResponse()
+ model = V1beta1GetProjectResourceResponse() # noqa: E501
if include_optional:
return V1beta1GetProjectResourceResponse(
resource = frontier_api.models.v1beta1_resource.v1beta1Resource(
diff --git a/test/test_v1beta1_get_project_response.py b/test/test_v1beta1_get_project_response.py
index ccfc923..bcf8e6c 100644
--- a/test/test_v1beta1_get_project_response.py
+++ b/test/test_v1beta1_get_project_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_get_project_response import V1beta1GetProjectResponse
+from frontier_api.models.v1beta1_get_project_response import V1beta1GetProjectResponse # noqa: E501
class TestV1beta1GetProjectResponse(unittest.TestCase):
"""V1beta1GetProjectResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1GetProjectResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1GetProjectResponse`
"""
- model = V1beta1GetProjectResponse()
+ model = V1beta1GetProjectResponse() # noqa: E501
if include_optional:
return V1beta1GetProjectResponse(
project = frontier_api.models.v1beta1_project.v1beta1Project(
@@ -44,7 +44,8 @@ def make_instance(self, include_optional) -> V1beta1GetProjectResponse:
org_id = '',
metadata = frontier_api.models.metadata.metadata(),
created_at = '2023-06-07T05:39:56.961Z',
- updated_at = '2023-06-07T05:39:56.961Z', )
+ updated_at = '2023-06-07T05:39:56.961Z',
+ members_count = 2, )
)
else:
return V1beta1GetProjectResponse(
diff --git a/test/test_v1beta1_get_relation_response.py b/test/test_v1beta1_get_relation_response.py
index 83671e0..fc8ae60 100644
--- a/test/test_v1beta1_get_relation_response.py
+++ b/test/test_v1beta1_get_relation_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_get_relation_response import V1beta1GetRelationResponse
+from frontier_api.models.v1beta1_get_relation_response import V1beta1GetRelationResponse # noqa: E501
class TestV1beta1GetRelationResponse(unittest.TestCase):
"""V1beta1GetRelationResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1GetRelationResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1GetRelationResponse`
"""
- model = V1beta1GetRelationResponse()
+ model = V1beta1GetRelationResponse() # noqa: E501
if include_optional:
return V1beta1GetRelationResponse(
relation = frontier_api.models.v1beta1_relation.v1beta1Relation(
diff --git a/test/test_v1beta1_get_service_user_key_response.py b/test/test_v1beta1_get_service_user_key_response.py
index 0581c4f..61b2252 100644
--- a/test/test_v1beta1_get_service_user_key_response.py
+++ b/test/test_v1beta1_get_service_user_key_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_get_service_user_key_response import V1beta1GetServiceUserKeyResponse
+from frontier_api.models.v1beta1_get_service_user_key_response import V1beta1GetServiceUserKeyResponse # noqa: E501
class TestV1beta1GetServiceUserKeyResponse(unittest.TestCase):
"""V1beta1GetServiceUserKeyResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1GetServiceUserKeyResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1GetServiceUserKeyResponse`
"""
- model = V1beta1GetServiceUserKeyResponse()
+ model = V1beta1GetServiceUserKeyResponse() # noqa: E501
if include_optional:
return V1beta1GetServiceUserKeyResponse(
keys = [
diff --git a/test/test_v1beta1_get_service_user_response.py b/test/test_v1beta1_get_service_user_response.py
index bdd08d5..6050b5c 100644
--- a/test/test_v1beta1_get_service_user_response.py
+++ b/test/test_v1beta1_get_service_user_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_get_service_user_response import V1beta1GetServiceUserResponse
+from frontier_api.models.v1beta1_get_service_user_response import V1beta1GetServiceUserResponse # noqa: E501
class TestV1beta1GetServiceUserResponse(unittest.TestCase):
"""V1beta1GetServiceUserResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1GetServiceUserResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1GetServiceUserResponse`
"""
- model = V1beta1GetServiceUserResponse()
+ model = V1beta1GetServiceUserResponse() # noqa: E501
if include_optional:
return V1beta1GetServiceUserResponse(
serviceuser = frontier_api.models.v1beta1_service_user.v1beta1ServiceUser(
diff --git a/test/test_v1beta1_get_subscription_response.py b/test/test_v1beta1_get_subscription_response.py
index b19c7b8..9661f79 100644
--- a/test/test_v1beta1_get_subscription_response.py
+++ b/test/test_v1beta1_get_subscription_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_get_subscription_response import V1beta1GetSubscriptionResponse
+from frontier_api.models.v1beta1_get_subscription_response import V1beta1GetSubscriptionResponse # noqa: E501
class TestV1beta1GetSubscriptionResponse(unittest.TestCase):
"""V1beta1GetSubscriptionResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1GetSubscriptionResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1GetSubscriptionResponse`
"""
- model = V1beta1GetSubscriptionResponse()
+ model = V1beta1GetSubscriptionResponse() # noqa: E501
if include_optional:
return V1beta1GetSubscriptionResponse(
subscription = frontier_api.models.v1beta1_subscription.v1beta1Subscription(
diff --git a/test/test_v1beta1_get_user_response.py b/test/test_v1beta1_get_user_response.py
index 478aa0c..9089f84 100644
--- a/test/test_v1beta1_get_user_response.py
+++ b/test/test_v1beta1_get_user_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_get_user_response import V1beta1GetUserResponse
+from frontier_api.models.v1beta1_get_user_response import V1beta1GetUserResponse # noqa: E501
class TestV1beta1GetUserResponse(unittest.TestCase):
"""V1beta1GetUserResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1GetUserResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1GetUserResponse`
"""
- model = V1beta1GetUserResponse()
+ model = V1beta1GetUserResponse() # noqa: E501
if include_optional:
return V1beta1GetUserResponse(
user = frontier_api.models.v1beta1_user.v1beta1User(
diff --git a/test/test_v1beta1_group.py b/test/test_v1beta1_group.py
index 151fd67..c55aba1 100644
--- a/test/test_v1beta1_group.py
+++ b/test/test_v1beta1_group.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_group import V1beta1Group
+from frontier_api.models.v1beta1_group import V1beta1Group # noqa: E501
class TestV1beta1Group(unittest.TestCase):
"""V1beta1Group unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1Group:
optional params are included """
# uncomment below to create an instance of `V1beta1Group`
"""
- model = V1beta1Group()
+ model = V1beta1Group() # noqa: E501
if include_optional:
return V1beta1Group(
id = '',
@@ -55,7 +55,8 @@ def make_instance(self, include_optional) -> V1beta1Group:
updated_at = '2023-06-07T05:39:56.961Z',
state = 'enabled',
avatar = '', )
- ]
+ ],
+ members_count = 2
)
else:
return V1beta1Group(
diff --git a/test/test_v1beta1_group_request_body.py b/test/test_v1beta1_group_request_body.py
index 3684d3b..9dc0106 100644
--- a/test/test_v1beta1_group_request_body.py
+++ b/test/test_v1beta1_group_request_body.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_group_request_body import V1beta1GroupRequestBody
+from frontier_api.models.v1beta1_group_request_body import V1beta1GroupRequestBody # noqa: E501
class TestV1beta1GroupRequestBody(unittest.TestCase):
"""V1beta1GroupRequestBody unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1GroupRequestBody:
optional params are included """
# uncomment below to create an instance of `V1beta1GroupRequestBody`
"""
- model = V1beta1GroupRequestBody()
+ model = V1beta1GroupRequestBody() # noqa: E501
if include_optional:
return V1beta1GroupRequestBody(
name = '',
diff --git a/test/test_v1beta1_invitation.py b/test/test_v1beta1_invitation.py
index 3885e3b..be0bb22 100644
--- a/test/test_v1beta1_invitation.py
+++ b/test/test_v1beta1_invitation.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_invitation import V1beta1Invitation
+from frontier_api.models.v1beta1_invitation import V1beta1Invitation # noqa: E501
class TestV1beta1Invitation(unittest.TestCase):
"""V1beta1Invitation unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1Invitation:
optional params are included """
# uncomment below to create an instance of `V1beta1Invitation`
"""
- model = V1beta1Invitation()
+ model = V1beta1Invitation() # noqa: E501
if include_optional:
return V1beta1Invitation(
id = 'k9c4f4e2-9b9a-4c1a-8f1a-2b9b9b9b9b9b',
diff --git a/test/test_v1beta1_json_web_key.py b/test/test_v1beta1_json_web_key.py
index a223634..25a24be 100644
--- a/test/test_v1beta1_json_web_key.py
+++ b/test/test_v1beta1_json_web_key.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_json_web_key import V1beta1JSONWebKey
+from frontier_api.models.v1beta1_json_web_key import V1beta1JSONWebKey # noqa: E501
class TestV1beta1JSONWebKey(unittest.TestCase):
"""V1beta1JSONWebKey unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1JSONWebKey:
optional params are included """
# uncomment below to create an instance of `V1beta1JSONWebKey`
"""
- model = V1beta1JSONWebKey()
+ model = V1beta1JSONWebKey() # noqa: E501
if include_optional:
return V1beta1JSONWebKey(
kty = '',
diff --git a/test/test_v1beta1_key_credential.py b/test/test_v1beta1_key_credential.py
index 143c74b..0bdb91d 100644
--- a/test/test_v1beta1_key_credential.py
+++ b/test/test_v1beta1_key_credential.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_key_credential import V1beta1KeyCredential
+from frontier_api.models.v1beta1_key_credential import V1beta1KeyCredential # noqa: E501
class TestV1beta1KeyCredential(unittest.TestCase):
"""V1beta1KeyCredential unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1KeyCredential:
optional params are included """
# uncomment below to create an instance of `V1beta1KeyCredential`
"""
- model = V1beta1KeyCredential()
+ model = V1beta1KeyCredential() # noqa: E501
if include_optional:
return V1beta1KeyCredential(
type = '',
diff --git a/test/test_v1beta1_list_all_organizations_response.py b/test/test_v1beta1_list_all_organizations_response.py
index 12029fa..0e06f78 100644
--- a/test/test_v1beta1_list_all_organizations_response.py
+++ b/test/test_v1beta1_list_all_organizations_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_all_organizations_response import V1beta1ListAllOrganizationsResponse
+from frontier_api.models.v1beta1_list_all_organizations_response import V1beta1ListAllOrganizationsResponse # noqa: E501
class TestV1beta1ListAllOrganizationsResponse(unittest.TestCase):
"""V1beta1ListAllOrganizationsResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListAllOrganizationsResponse
optional params are included """
# uncomment below to create an instance of `V1beta1ListAllOrganizationsResponse`
"""
- model = V1beta1ListAllOrganizationsResponse()
+ model = V1beta1ListAllOrganizationsResponse() # noqa: E501
if include_optional:
return V1beta1ListAllOrganizationsResponse(
organizations = [
diff --git a/test/test_v1beta1_list_all_users_response.py b/test/test_v1beta1_list_all_users_response.py
index 28e9709..ed4d50c 100644
--- a/test/test_v1beta1_list_all_users_response.py
+++ b/test/test_v1beta1_list_all_users_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_all_users_response import V1beta1ListAllUsersResponse
+from frontier_api.models.v1beta1_list_all_users_response import V1beta1ListAllUsersResponse # noqa: E501
class TestV1beta1ListAllUsersResponse(unittest.TestCase):
"""V1beta1ListAllUsersResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListAllUsersResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListAllUsersResponse`
"""
- model = V1beta1ListAllUsersResponse()
+ model = V1beta1ListAllUsersResponse() # noqa: E501
if include_optional:
return V1beta1ListAllUsersResponse(
count = 56,
diff --git a/test/test_v1beta1_list_auth_strategies_response.py b/test/test_v1beta1_list_auth_strategies_response.py
index 75eae03..f86b8b4 100644
--- a/test/test_v1beta1_list_auth_strategies_response.py
+++ b/test/test_v1beta1_list_auth_strategies_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_auth_strategies_response import V1beta1ListAuthStrategiesResponse
+from frontier_api.models.v1beta1_list_auth_strategies_response import V1beta1ListAuthStrategiesResponse # noqa: E501
class TestV1beta1ListAuthStrategiesResponse(unittest.TestCase):
"""V1beta1ListAuthStrategiesResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListAuthStrategiesResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListAuthStrategiesResponse`
"""
- model = V1beta1ListAuthStrategiesResponse()
+ model = V1beta1ListAuthStrategiesResponse() # noqa: E501
if include_optional:
return V1beta1ListAuthStrategiesResponse(
strategies = [
diff --git a/test/test_v1beta1_list_billing_accounts_response.py b/test/test_v1beta1_list_billing_accounts_response.py
index 12ac795..26f6637 100644
--- a/test/test_v1beta1_list_billing_accounts_response.py
+++ b/test/test_v1beta1_list_billing_accounts_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_billing_accounts_response import V1beta1ListBillingAccountsResponse
+from frontier_api.models.v1beta1_list_billing_accounts_response import V1beta1ListBillingAccountsResponse # noqa: E501
class TestV1beta1ListBillingAccountsResponse(unittest.TestCase):
"""V1beta1ListBillingAccountsResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListBillingAccountsResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListBillingAccountsResponse`
"""
- model = V1beta1ListBillingAccountsResponse()
+ model = V1beta1ListBillingAccountsResponse() # noqa: E501
if include_optional:
return V1beta1ListBillingAccountsResponse(
billing_accounts = [
diff --git a/test/test_v1beta1_list_billing_transactions_response.py b/test/test_v1beta1_list_billing_transactions_response.py
index 4581c7e..b72a87c 100644
--- a/test/test_v1beta1_list_billing_transactions_response.py
+++ b/test/test_v1beta1_list_billing_transactions_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_billing_transactions_response import V1beta1ListBillingTransactionsResponse
+from frontier_api.models.v1beta1_list_billing_transactions_response import V1beta1ListBillingTransactionsResponse # noqa: E501
class TestV1beta1ListBillingTransactionsResponse(unittest.TestCase):
"""V1beta1ListBillingTransactionsResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListBillingTransactionsRespo
optional params are included """
# uncomment below to create an instance of `V1beta1ListBillingTransactionsResponse`
"""
- model = V1beta1ListBillingTransactionsResponse()
+ model = V1beta1ListBillingTransactionsResponse() # noqa: E501
if include_optional:
return V1beta1ListBillingTransactionsResponse(
transactions = [
diff --git a/test/test_v1beta1_list_checkouts_response.py b/test/test_v1beta1_list_checkouts_response.py
index d8b3b4a..5b74db8 100644
--- a/test/test_v1beta1_list_checkouts_response.py
+++ b/test/test_v1beta1_list_checkouts_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_checkouts_response import V1beta1ListCheckoutsResponse
+from frontier_api.models.v1beta1_list_checkouts_response import V1beta1ListCheckoutsResponse # noqa: E501
class TestV1beta1ListCheckoutsResponse(unittest.TestCase):
"""V1beta1ListCheckoutsResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListCheckoutsResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListCheckoutsResponse`
"""
- model = V1beta1ListCheckoutsResponse()
+ model = V1beta1ListCheckoutsResponse() # noqa: E501
if include_optional:
return V1beta1ListCheckoutsResponse(
checkout_sessions = [
diff --git a/test/test_v1beta1_list_current_user_groups_response.py b/test/test_v1beta1_list_current_user_groups_response.py
index 9f18aea..298583d 100644
--- a/test/test_v1beta1_list_current_user_groups_response.py
+++ b/test/test_v1beta1_list_current_user_groups_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_current_user_groups_response import V1beta1ListCurrentUserGroupsResponse
+from frontier_api.models.v1beta1_list_current_user_groups_response import V1beta1ListCurrentUserGroupsResponse # noqa: E501
class TestV1beta1ListCurrentUserGroupsResponse(unittest.TestCase):
"""V1beta1ListCurrentUserGroupsResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListCurrentUserGroupsRespons
optional params are included """
# uncomment below to create an instance of `V1beta1ListCurrentUserGroupsResponse`
"""
- model = V1beta1ListCurrentUserGroupsResponse()
+ model = V1beta1ListCurrentUserGroupsResponse() # noqa: E501
if include_optional:
return V1beta1ListCurrentUserGroupsResponse(
groups = [
@@ -57,7 +57,8 @@ def make_instance(self, include_optional) -> V1beta1ListCurrentUserGroupsRespons
updated_at = '2023-06-07T05:39:56.961Z',
state = 'enabled',
avatar = '', )
- ], )
+ ],
+ members_count = 2, )
],
access_pairs = [
frontier_api.models.v1beta1_list_current_user_groups_response_access_pair.v1beta1ListCurrentUserGroupsResponseAccessPair(
diff --git a/test/test_v1beta1_list_current_user_groups_response_access_pair.py b/test/test_v1beta1_list_current_user_groups_response_access_pair.py
index 2d64de9..1466337 100644
--- a/test/test_v1beta1_list_current_user_groups_response_access_pair.py
+++ b/test/test_v1beta1_list_current_user_groups_response_access_pair.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_current_user_groups_response_access_pair import V1beta1ListCurrentUserGroupsResponseAccessPair
+from frontier_api.models.v1beta1_list_current_user_groups_response_access_pair import V1beta1ListCurrentUserGroupsResponseAccessPair # noqa: E501
class TestV1beta1ListCurrentUserGroupsResponseAccessPair(unittest.TestCase):
"""V1beta1ListCurrentUserGroupsResponseAccessPair unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListCurrentUserGroupsRespons
optional params are included """
# uncomment below to create an instance of `V1beta1ListCurrentUserGroupsResponseAccessPair`
"""
- model = V1beta1ListCurrentUserGroupsResponseAccessPair()
+ model = V1beta1ListCurrentUserGroupsResponseAccessPair() # noqa: E501
if include_optional:
return V1beta1ListCurrentUserGroupsResponseAccessPair(
group_id = '',
diff --git a/test/test_v1beta1_list_current_user_invitations_response.py b/test/test_v1beta1_list_current_user_invitations_response.py
index 327177d..fe7bf71 100644
--- a/test/test_v1beta1_list_current_user_invitations_response.py
+++ b/test/test_v1beta1_list_current_user_invitations_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_current_user_invitations_response import V1beta1ListCurrentUserInvitationsResponse
+from frontier_api.models.v1beta1_list_current_user_invitations_response import V1beta1ListCurrentUserInvitationsResponse # noqa: E501
class TestV1beta1ListCurrentUserInvitationsResponse(unittest.TestCase):
"""V1beta1ListCurrentUserInvitationsResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListCurrentUserInvitationsRe
optional params are included """
# uncomment below to create an instance of `V1beta1ListCurrentUserInvitationsResponse`
"""
- model = V1beta1ListCurrentUserInvitationsResponse()
+ model = V1beta1ListCurrentUserInvitationsResponse() # noqa: E501
if include_optional:
return V1beta1ListCurrentUserInvitationsResponse(
invitations = [
diff --git a/test/test_v1beta1_list_current_user_preferences_response.py b/test/test_v1beta1_list_current_user_preferences_response.py
index e6d7bf7..898b68d 100644
--- a/test/test_v1beta1_list_current_user_preferences_response.py
+++ b/test/test_v1beta1_list_current_user_preferences_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_current_user_preferences_response import V1beta1ListCurrentUserPreferencesResponse
+from frontier_api.models.v1beta1_list_current_user_preferences_response import V1beta1ListCurrentUserPreferencesResponse # noqa: E501
class TestV1beta1ListCurrentUserPreferencesResponse(unittest.TestCase):
"""V1beta1ListCurrentUserPreferencesResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListCurrentUserPreferencesRe
optional params are included """
# uncomment below to create an instance of `V1beta1ListCurrentUserPreferencesResponse`
"""
- model = V1beta1ListCurrentUserPreferencesResponse()
+ model = V1beta1ListCurrentUserPreferencesResponse() # noqa: E501
if include_optional:
return V1beta1ListCurrentUserPreferencesResponse(
preferences = [
diff --git a/test/test_v1beta1_list_features_response.py b/test/test_v1beta1_list_features_response.py
index e5725f7..f117086 100644
--- a/test/test_v1beta1_list_features_response.py
+++ b/test/test_v1beta1_list_features_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_features_response import V1beta1ListFeaturesResponse
+from frontier_api.models.v1beta1_list_features_response import V1beta1ListFeaturesResponse # noqa: E501
class TestV1beta1ListFeaturesResponse(unittest.TestCase):
"""V1beta1ListFeaturesResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListFeaturesResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListFeaturesResponse`
"""
- model = V1beta1ListFeaturesResponse()
+ model = V1beta1ListFeaturesResponse() # noqa: E501
if include_optional:
return V1beta1ListFeaturesResponse(
features = [
diff --git a/test/test_v1beta1_list_group_preferences_response.py b/test/test_v1beta1_list_group_preferences_response.py
index fb9c3bd..9ba9bac 100644
--- a/test/test_v1beta1_list_group_preferences_response.py
+++ b/test/test_v1beta1_list_group_preferences_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_group_preferences_response import V1beta1ListGroupPreferencesResponse
+from frontier_api.models.v1beta1_list_group_preferences_response import V1beta1ListGroupPreferencesResponse # noqa: E501
class TestV1beta1ListGroupPreferencesResponse(unittest.TestCase):
"""V1beta1ListGroupPreferencesResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListGroupPreferencesResponse
optional params are included """
# uncomment below to create an instance of `V1beta1ListGroupPreferencesResponse`
"""
- model = V1beta1ListGroupPreferencesResponse()
+ model = V1beta1ListGroupPreferencesResponse() # noqa: E501
if include_optional:
return V1beta1ListGroupPreferencesResponse(
preferences = [
diff --git a/test/test_v1beta1_list_group_users_response.py b/test/test_v1beta1_list_group_users_response.py
index 8d29cc3..479111a 100644
--- a/test/test_v1beta1_list_group_users_response.py
+++ b/test/test_v1beta1_list_group_users_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_group_users_response import V1beta1ListGroupUsersResponse
+from frontier_api.models.v1beta1_list_group_users_response import V1beta1ListGroupUsersResponse # noqa: E501
class TestV1beta1ListGroupUsersResponse(unittest.TestCase):
"""V1beta1ListGroupUsersResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListGroupUsersResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListGroupUsersResponse`
"""
- model = V1beta1ListGroupUsersResponse()
+ model = V1beta1ListGroupUsersResponse() # noqa: E501
if include_optional:
return V1beta1ListGroupUsersResponse(
users = [
diff --git a/test/test_v1beta1_list_group_users_response_role_pair.py b/test/test_v1beta1_list_group_users_response_role_pair.py
index 4d6d874..2d40ee1 100644
--- a/test/test_v1beta1_list_group_users_response_role_pair.py
+++ b/test/test_v1beta1_list_group_users_response_role_pair.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_group_users_response_role_pair import V1beta1ListGroupUsersResponseRolePair
+from frontier_api.models.v1beta1_list_group_users_response_role_pair import V1beta1ListGroupUsersResponseRolePair # noqa: E501
class TestV1beta1ListGroupUsersResponseRolePair(unittest.TestCase):
"""V1beta1ListGroupUsersResponseRolePair unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListGroupUsersResponseRolePa
optional params are included """
# uncomment below to create an instance of `V1beta1ListGroupUsersResponseRolePair`
"""
- model = V1beta1ListGroupUsersResponseRolePair()
+ model = V1beta1ListGroupUsersResponseRolePair() # noqa: E501
if include_optional:
return V1beta1ListGroupUsersResponseRolePair(
user_id = '',
diff --git a/test/test_v1beta1_list_groups_response.py b/test/test_v1beta1_list_groups_response.py
index 0f3012a..76fcd29 100644
--- a/test/test_v1beta1_list_groups_response.py
+++ b/test/test_v1beta1_list_groups_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_groups_response import V1beta1ListGroupsResponse
+from frontier_api.models.v1beta1_list_groups_response import V1beta1ListGroupsResponse # noqa: E501
class TestV1beta1ListGroupsResponse(unittest.TestCase):
"""V1beta1ListGroupsResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListGroupsResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListGroupsResponse`
"""
- model = V1beta1ListGroupsResponse()
+ model = V1beta1ListGroupsResponse() # noqa: E501
if include_optional:
return V1beta1ListGroupsResponse(
groups = [
@@ -57,7 +57,8 @@ def make_instance(self, include_optional) -> V1beta1ListGroupsResponse:
updated_at = '2023-06-07T05:39:56.961Z',
state = 'enabled',
avatar = '', )
- ], )
+ ],
+ members_count = 2, )
]
)
else:
diff --git a/test/test_v1beta1_list_meta_schemas_response.py b/test/test_v1beta1_list_meta_schemas_response.py
index 6b999c5..dd38cac 100644
--- a/test/test_v1beta1_list_meta_schemas_response.py
+++ b/test/test_v1beta1_list_meta_schemas_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_meta_schemas_response import V1beta1ListMetaSchemasResponse
+from frontier_api.models.v1beta1_list_meta_schemas_response import V1beta1ListMetaSchemasResponse # noqa: E501
class TestV1beta1ListMetaSchemasResponse(unittest.TestCase):
"""V1beta1ListMetaSchemasResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListMetaSchemasResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListMetaSchemasResponse`
"""
- model = V1beta1ListMetaSchemasResponse()
+ model = V1beta1ListMetaSchemasResponse() # noqa: E501
if include_optional:
return V1beta1ListMetaSchemasResponse(
metaschemas = [
diff --git a/test/test_v1beta1_list_namespaces_response.py b/test/test_v1beta1_list_namespaces_response.py
index 87ed85c..1933670 100644
--- a/test/test_v1beta1_list_namespaces_response.py
+++ b/test/test_v1beta1_list_namespaces_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_namespaces_response import V1beta1ListNamespacesResponse
+from frontier_api.models.v1beta1_list_namespaces_response import V1beta1ListNamespacesResponse # noqa: E501
class TestV1beta1ListNamespacesResponse(unittest.TestCase):
"""V1beta1ListNamespacesResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListNamespacesResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListNamespacesResponse`
"""
- model = V1beta1ListNamespacesResponse()
+ model = V1beta1ListNamespacesResponse() # noqa: E501
if include_optional:
return V1beta1ListNamespacesResponse(
namespaces = [
diff --git a/test/test_v1beta1_list_organization_admins_response.py b/test/test_v1beta1_list_organization_admins_response.py
index 5ec8a47..39e512c 100644
--- a/test/test_v1beta1_list_organization_admins_response.py
+++ b/test/test_v1beta1_list_organization_admins_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_organization_admins_response import V1beta1ListOrganizationAdminsResponse
+from frontier_api.models.v1beta1_list_organization_admins_response import V1beta1ListOrganizationAdminsResponse # noqa: E501
class TestV1beta1ListOrganizationAdminsResponse(unittest.TestCase):
"""V1beta1ListOrganizationAdminsResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListOrganizationAdminsRespon
optional params are included """
# uncomment below to create an instance of `V1beta1ListOrganizationAdminsResponse`
"""
- model = V1beta1ListOrganizationAdminsResponse()
+ model = V1beta1ListOrganizationAdminsResponse() # noqa: E501
if include_optional:
return V1beta1ListOrganizationAdminsResponse(
users = [
diff --git a/test/test_v1beta1_list_organization_audit_logs_response.py b/test/test_v1beta1_list_organization_audit_logs_response.py
index a9b642d..51a2a6f 100644
--- a/test/test_v1beta1_list_organization_audit_logs_response.py
+++ b/test/test_v1beta1_list_organization_audit_logs_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_organization_audit_logs_response import V1beta1ListOrganizationAuditLogsResponse
+from frontier_api.models.v1beta1_list_organization_audit_logs_response import V1beta1ListOrganizationAuditLogsResponse # noqa: E501
class TestV1beta1ListOrganizationAuditLogsResponse(unittest.TestCase):
"""V1beta1ListOrganizationAuditLogsResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListOrganizationAuditLogsRes
optional params are included """
# uncomment below to create an instance of `V1beta1ListOrganizationAuditLogsResponse`
"""
- model = V1beta1ListOrganizationAuditLogsResponse()
+ model = V1beta1ListOrganizationAuditLogsResponse() # noqa: E501
if include_optional:
return V1beta1ListOrganizationAuditLogsResponse(
logs = [
diff --git a/test/test_v1beta1_list_organization_domains_response.py b/test/test_v1beta1_list_organization_domains_response.py
index e27178c..3e85d2c 100644
--- a/test/test_v1beta1_list_organization_domains_response.py
+++ b/test/test_v1beta1_list_organization_domains_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_organization_domains_response import V1beta1ListOrganizationDomainsResponse
+from frontier_api.models.v1beta1_list_organization_domains_response import V1beta1ListOrganizationDomainsResponse # noqa: E501
class TestV1beta1ListOrganizationDomainsResponse(unittest.TestCase):
"""V1beta1ListOrganizationDomainsResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListOrganizationDomainsRespo
optional params are included """
# uncomment below to create an instance of `V1beta1ListOrganizationDomainsResponse`
"""
- model = V1beta1ListOrganizationDomainsResponse()
+ model = V1beta1ListOrganizationDomainsResponse() # noqa: E501
if include_optional:
return V1beta1ListOrganizationDomainsResponse(
domains = [
diff --git a/test/test_v1beta1_list_organization_groups_response.py b/test/test_v1beta1_list_organization_groups_response.py
index c81cc58..6d25a05 100644
--- a/test/test_v1beta1_list_organization_groups_response.py
+++ b/test/test_v1beta1_list_organization_groups_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_organization_groups_response import V1beta1ListOrganizationGroupsResponse
+from frontier_api.models.v1beta1_list_organization_groups_response import V1beta1ListOrganizationGroupsResponse # noqa: E501
class TestV1beta1ListOrganizationGroupsResponse(unittest.TestCase):
"""V1beta1ListOrganizationGroupsResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListOrganizationGroupsRespon
optional params are included """
# uncomment below to create an instance of `V1beta1ListOrganizationGroupsResponse`
"""
- model = V1beta1ListOrganizationGroupsResponse()
+ model = V1beta1ListOrganizationGroupsResponse() # noqa: E501
if include_optional:
return V1beta1ListOrganizationGroupsResponse(
groups = [
@@ -57,7 +57,8 @@ def make_instance(self, include_optional) -> V1beta1ListOrganizationGroupsRespon
updated_at = '2023-06-07T05:39:56.961Z',
state = 'enabled',
avatar = '', )
- ], )
+ ],
+ members_count = 2, )
]
)
else:
diff --git a/test/test_v1beta1_list_organization_invitations_response.py b/test/test_v1beta1_list_organization_invitations_response.py
index 7a3c50b..85ff802 100644
--- a/test/test_v1beta1_list_organization_invitations_response.py
+++ b/test/test_v1beta1_list_organization_invitations_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_organization_invitations_response import V1beta1ListOrganizationInvitationsResponse
+from frontier_api.models.v1beta1_list_organization_invitations_response import V1beta1ListOrganizationInvitationsResponse # noqa: E501
class TestV1beta1ListOrganizationInvitationsResponse(unittest.TestCase):
"""V1beta1ListOrganizationInvitationsResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListOrganizationInvitationsR
optional params are included """
# uncomment below to create an instance of `V1beta1ListOrganizationInvitationsResponse`
"""
- model = V1beta1ListOrganizationInvitationsResponse()
+ model = V1beta1ListOrganizationInvitationsResponse() # noqa: E501
if include_optional:
return V1beta1ListOrganizationInvitationsResponse(
invitations = [
diff --git a/test/test_v1beta1_list_organization_preferences_response.py b/test/test_v1beta1_list_organization_preferences_response.py
index b82d137..543a04e 100644
--- a/test/test_v1beta1_list_organization_preferences_response.py
+++ b/test/test_v1beta1_list_organization_preferences_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_organization_preferences_response import V1beta1ListOrganizationPreferencesResponse
+from frontier_api.models.v1beta1_list_organization_preferences_response import V1beta1ListOrganizationPreferencesResponse # noqa: E501
class TestV1beta1ListOrganizationPreferencesResponse(unittest.TestCase):
"""V1beta1ListOrganizationPreferencesResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListOrganizationPreferencesR
optional params are included """
# uncomment below to create an instance of `V1beta1ListOrganizationPreferencesResponse`
"""
- model = V1beta1ListOrganizationPreferencesResponse()
+ model = V1beta1ListOrganizationPreferencesResponse() # noqa: E501
if include_optional:
return V1beta1ListOrganizationPreferencesResponse(
preferences = [
diff --git a/test/test_v1beta1_list_organization_projects_response.py b/test/test_v1beta1_list_organization_projects_response.py
index 4c60cb8..00d3229 100644
--- a/test/test_v1beta1_list_organization_projects_response.py
+++ b/test/test_v1beta1_list_organization_projects_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_organization_projects_response import V1beta1ListOrganizationProjectsResponse
+from frontier_api.models.v1beta1_list_organization_projects_response import V1beta1ListOrganizationProjectsResponse # noqa: E501
class TestV1beta1ListOrganizationProjectsResponse(unittest.TestCase):
"""V1beta1ListOrganizationProjectsResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListOrganizationProjectsResp
optional params are included """
# uncomment below to create an instance of `V1beta1ListOrganizationProjectsResponse`
"""
- model = V1beta1ListOrganizationProjectsResponse()
+ model = V1beta1ListOrganizationProjectsResponse() # noqa: E501
if include_optional:
return V1beta1ListOrganizationProjectsResponse(
projects = [
@@ -45,7 +45,8 @@ def make_instance(self, include_optional) -> V1beta1ListOrganizationProjectsResp
org_id = '',
metadata = frontier_api.models.metadata.metadata(),
created_at = '2023-06-07T05:39:56.961Z',
- updated_at = '2023-06-07T05:39:56.961Z', )
+ updated_at = '2023-06-07T05:39:56.961Z',
+ members_count = 2, )
]
)
else:
diff --git a/test/test_v1beta1_list_organization_roles_response.py b/test/test_v1beta1_list_organization_roles_response.py
index 1ac9971..74f9833 100644
--- a/test/test_v1beta1_list_organization_roles_response.py
+++ b/test/test_v1beta1_list_organization_roles_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_organization_roles_response import V1beta1ListOrganizationRolesResponse
+from frontier_api.models.v1beta1_list_organization_roles_response import V1beta1ListOrganizationRolesResponse # noqa: E501
class TestV1beta1ListOrganizationRolesResponse(unittest.TestCase):
"""V1beta1ListOrganizationRolesResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListOrganizationRolesRespons
optional params are included """
# uncomment below to create an instance of `V1beta1ListOrganizationRolesResponse`
"""
- model = V1beta1ListOrganizationRolesResponse()
+ model = V1beta1ListOrganizationRolesResponse() # noqa: E501
if include_optional:
return V1beta1ListOrganizationRolesResponse(
roles = [
diff --git a/test/test_v1beta1_list_organization_service_users_response.py b/test/test_v1beta1_list_organization_service_users_response.py
index e8afe69..106da39 100644
--- a/test/test_v1beta1_list_organization_service_users_response.py
+++ b/test/test_v1beta1_list_organization_service_users_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_organization_service_users_response import V1beta1ListOrganizationServiceUsersResponse
+from frontier_api.models.v1beta1_list_organization_service_users_response import V1beta1ListOrganizationServiceUsersResponse # noqa: E501
class TestV1beta1ListOrganizationServiceUsersResponse(unittest.TestCase):
"""V1beta1ListOrganizationServiceUsersResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListOrganizationServiceUsers
optional params are included """
# uncomment below to create an instance of `V1beta1ListOrganizationServiceUsersResponse`
"""
- model = V1beta1ListOrganizationServiceUsersResponse()
+ model = V1beta1ListOrganizationServiceUsersResponse() # noqa: E501
if include_optional:
return V1beta1ListOrganizationServiceUsersResponse(
serviceusers = [
diff --git a/test/test_v1beta1_list_organization_users_response.py b/test/test_v1beta1_list_organization_users_response.py
index baf5749..c6389b2 100644
--- a/test/test_v1beta1_list_organization_users_response.py
+++ b/test/test_v1beta1_list_organization_users_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_organization_users_response import V1beta1ListOrganizationUsersResponse
+from frontier_api.models.v1beta1_list_organization_users_response import V1beta1ListOrganizationUsersResponse # noqa: E501
class TestV1beta1ListOrganizationUsersResponse(unittest.TestCase):
"""V1beta1ListOrganizationUsersResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListOrganizationUsersRespons
optional params are included """
# uncomment below to create an instance of `V1beta1ListOrganizationUsersResponse`
"""
- model = V1beta1ListOrganizationUsersResponse()
+ model = V1beta1ListOrganizationUsersResponse() # noqa: E501
if include_optional:
return V1beta1ListOrganizationUsersResponse(
users = [
diff --git a/test/test_v1beta1_list_organization_users_response_role_pair.py b/test/test_v1beta1_list_organization_users_response_role_pair.py
index 1879052..ad7430e 100644
--- a/test/test_v1beta1_list_organization_users_response_role_pair.py
+++ b/test/test_v1beta1_list_organization_users_response_role_pair.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_organization_users_response_role_pair import V1beta1ListOrganizationUsersResponseRolePair
+from frontier_api.models.v1beta1_list_organization_users_response_role_pair import V1beta1ListOrganizationUsersResponseRolePair # noqa: E501
class TestV1beta1ListOrganizationUsersResponseRolePair(unittest.TestCase):
"""V1beta1ListOrganizationUsersResponseRolePair unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListOrganizationUsersRespons
optional params are included """
# uncomment below to create an instance of `V1beta1ListOrganizationUsersResponseRolePair`
"""
- model = V1beta1ListOrganizationUsersResponseRolePair()
+ model = V1beta1ListOrganizationUsersResponseRolePair() # noqa: E501
if include_optional:
return V1beta1ListOrganizationUsersResponseRolePair(
user_id = '',
diff --git a/test/test_v1beta1_list_organizations_by_current_user_response.py b/test/test_v1beta1_list_organizations_by_current_user_response.py
index 445be60..9159171 100644
--- a/test/test_v1beta1_list_organizations_by_current_user_response.py
+++ b/test/test_v1beta1_list_organizations_by_current_user_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_organizations_by_current_user_response import V1beta1ListOrganizationsByCurrentUserResponse
+from frontier_api.models.v1beta1_list_organizations_by_current_user_response import V1beta1ListOrganizationsByCurrentUserResponse # noqa: E501
class TestV1beta1ListOrganizationsByCurrentUserResponse(unittest.TestCase):
"""V1beta1ListOrganizationsByCurrentUserResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListOrganizationsByCurrentUs
optional params are included """
# uncomment below to create an instance of `V1beta1ListOrganizationsByCurrentUserResponse`
"""
- model = V1beta1ListOrganizationsByCurrentUserResponse()
+ model = V1beta1ListOrganizationsByCurrentUserResponse() # noqa: E501
if include_optional:
return V1beta1ListOrganizationsByCurrentUserResponse(
organizations = [
diff --git a/test/test_v1beta1_list_organizations_by_user_response.py b/test/test_v1beta1_list_organizations_by_user_response.py
index c6a55b1..6c74f13 100644
--- a/test/test_v1beta1_list_organizations_by_user_response.py
+++ b/test/test_v1beta1_list_organizations_by_user_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_organizations_by_user_response import V1beta1ListOrganizationsByUserResponse
+from frontier_api.models.v1beta1_list_organizations_by_user_response import V1beta1ListOrganizationsByUserResponse # noqa: E501
class TestV1beta1ListOrganizationsByUserResponse(unittest.TestCase):
"""V1beta1ListOrganizationsByUserResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListOrganizationsByUserRespo
optional params are included """
# uncomment below to create an instance of `V1beta1ListOrganizationsByUserResponse`
"""
- model = V1beta1ListOrganizationsByUserResponse()
+ model = V1beta1ListOrganizationsByUserResponse() # noqa: E501
if include_optional:
return V1beta1ListOrganizationsByUserResponse(
organizations = [
diff --git a/test/test_v1beta1_list_organizations_response.py b/test/test_v1beta1_list_organizations_response.py
index 771d682..7e376e8 100644
--- a/test/test_v1beta1_list_organizations_response.py
+++ b/test/test_v1beta1_list_organizations_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_organizations_response import V1beta1ListOrganizationsResponse
+from frontier_api.models.v1beta1_list_organizations_response import V1beta1ListOrganizationsResponse # noqa: E501
class TestV1beta1ListOrganizationsResponse(unittest.TestCase):
"""V1beta1ListOrganizationsResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListOrganizationsResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListOrganizationsResponse`
"""
- model = V1beta1ListOrganizationsResponse()
+ model = V1beta1ListOrganizationsResponse() # noqa: E501
if include_optional:
return V1beta1ListOrganizationsResponse(
organizations = [
diff --git a/test/test_v1beta1_list_permissions_response.py b/test/test_v1beta1_list_permissions_response.py
index 65e510d..58df79a 100644
--- a/test/test_v1beta1_list_permissions_response.py
+++ b/test/test_v1beta1_list_permissions_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_permissions_response import V1beta1ListPermissionsResponse
+from frontier_api.models.v1beta1_list_permissions_response import V1beta1ListPermissionsResponse # noqa: E501
class TestV1beta1ListPermissionsResponse(unittest.TestCase):
"""V1beta1ListPermissionsResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListPermissionsResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListPermissionsResponse`
"""
- model = V1beta1ListPermissionsResponse()
+ model = V1beta1ListPermissionsResponse() # noqa: E501
if include_optional:
return V1beta1ListPermissionsResponse(
permissions = [
diff --git a/test/test_v1beta1_list_plans_response.py b/test/test_v1beta1_list_plans_response.py
index 6c070d1..b58e250 100644
--- a/test/test_v1beta1_list_plans_response.py
+++ b/test/test_v1beta1_list_plans_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_plans_response import V1beta1ListPlansResponse
+from frontier_api.models.v1beta1_list_plans_response import V1beta1ListPlansResponse # noqa: E501
class TestV1beta1ListPlansResponse(unittest.TestCase):
"""V1beta1ListPlansResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListPlansResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListPlansResponse`
"""
- model = V1beta1ListPlansResponse()
+ model = V1beta1ListPlansResponse() # noqa: E501
if include_optional:
return V1beta1ListPlansResponse(
plans = [
diff --git a/test/test_v1beta1_list_platform_users_response.py b/test/test_v1beta1_list_platform_users_response.py
new file mode 100644
index 0000000..eba79fd
--- /dev/null
+++ b/test/test_v1beta1_list_platform_users_response.py
@@ -0,0 +1,74 @@
+# coding: utf-8
+
+"""
+ Frontier Administration API
+
+ The Frontier APIs adhere to the OpenAPI specification, also known as Swagger, which provides a standardized approach for designing, documenting, and consuming RESTful APIs. With OpenAPI, you gain a clear understanding of the API endpoints, request/response structures, and authentication mechanisms supported by the Frontier APIs. By leveraging the OpenAPI specification, developers can easily explore and interact with the Frontier APIs using a variety of tools and libraries. The OpenAPI specification enables automatic code generation, interactive API documentation, and seamless integration with API testing frameworks, making it easier than ever to integrate Frontier into your existing applications and workflows.
+
+ The version of the OpenAPI document: 0.2.0
+ Contact: hello@raystack.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+import datetime
+
+from frontier_api.models.v1beta1_list_platform_users_response import V1beta1ListPlatformUsersResponse # noqa: E501
+
+class TestV1beta1ListPlatformUsersResponse(unittest.TestCase):
+ """V1beta1ListPlatformUsersResponse unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> V1beta1ListPlatformUsersResponse:
+ """Test V1beta1ListPlatformUsersResponse
+ 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 `V1beta1ListPlatformUsersResponse`
+ """
+ model = V1beta1ListPlatformUsersResponse() # noqa: E501
+ if include_optional:
+ return V1beta1ListPlatformUsersResponse(
+ users = [
+ frontier_api.models.v1beta1_user.v1beta1User(
+ id = '',
+ name = 'johndoe',
+ title = 'John Doe',
+ email = '',
+ metadata = frontier_api.models.metadata.metadata(),
+ created_at = '2023-06-07T05:39:56.961Z',
+ updated_at = '2023-06-07T05:39:56.961Z',
+ state = 'enabled',
+ avatar = '', )
+ ],
+ serviceusers = [
+ frontier_api.models.v1beta1_service_user.v1beta1ServiceUser(
+ id = '',
+ title = 'Order Service',
+ metadata = frontier_api.models.metadata.metadata(),
+ created_at = '2023-06-07T05:39:56.961Z',
+ updated_at = '2023-06-07T05:39:56.961Z',
+ state = '',
+ org_id = '', )
+ ]
+ )
+ else:
+ return V1beta1ListPlatformUsersResponse(
+ )
+ """
+
+ def testV1beta1ListPlatformUsersResponse(self):
+ """Test V1beta1ListPlatformUsersResponse"""
+ # 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_v1beta1_list_policies_response.py b/test/test_v1beta1_list_policies_response.py
index 3c38824..c71665f 100644
--- a/test/test_v1beta1_list_policies_response.py
+++ b/test/test_v1beta1_list_policies_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_policies_response import V1beta1ListPoliciesResponse
+from frontier_api.models.v1beta1_list_policies_response import V1beta1ListPoliciesResponse # noqa: E501
class TestV1beta1ListPoliciesResponse(unittest.TestCase):
"""V1beta1ListPoliciesResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListPoliciesResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListPoliciesResponse`
"""
- model = V1beta1ListPoliciesResponse()
+ model = V1beta1ListPoliciesResponse() # noqa: E501
if include_optional:
return V1beta1ListPoliciesResponse(
policies = [
diff --git a/test/test_v1beta1_list_preferences_response.py b/test/test_v1beta1_list_preferences_response.py
index ea5976d..5be33bf 100644
--- a/test/test_v1beta1_list_preferences_response.py
+++ b/test/test_v1beta1_list_preferences_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_preferences_response import V1beta1ListPreferencesResponse
+from frontier_api.models.v1beta1_list_preferences_response import V1beta1ListPreferencesResponse # noqa: E501
class TestV1beta1ListPreferencesResponse(unittest.TestCase):
"""V1beta1ListPreferencesResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListPreferencesResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListPreferencesResponse`
"""
- model = V1beta1ListPreferencesResponse()
+ model = V1beta1ListPreferencesResponse() # noqa: E501
if include_optional:
return V1beta1ListPreferencesResponse(
preferences = [
diff --git a/test/test_v1beta1_list_project_admins_response.py b/test/test_v1beta1_list_project_admins_response.py
index 3dc9b24..5690c34 100644
--- a/test/test_v1beta1_list_project_admins_response.py
+++ b/test/test_v1beta1_list_project_admins_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_project_admins_response import V1beta1ListProjectAdminsResponse
+from frontier_api.models.v1beta1_list_project_admins_response import V1beta1ListProjectAdminsResponse # noqa: E501
class TestV1beta1ListProjectAdminsResponse(unittest.TestCase):
"""V1beta1ListProjectAdminsResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListProjectAdminsResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListProjectAdminsResponse`
"""
- model = V1beta1ListProjectAdminsResponse()
+ model = V1beta1ListProjectAdminsResponse() # noqa: E501
if include_optional:
return V1beta1ListProjectAdminsResponse(
users = [
diff --git a/test/test_v1beta1_list_project_groups_response.py b/test/test_v1beta1_list_project_groups_response.py
index 09cded1..378e936 100644
--- a/test/test_v1beta1_list_project_groups_response.py
+++ b/test/test_v1beta1_list_project_groups_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_project_groups_response import V1beta1ListProjectGroupsResponse
+from frontier_api.models.v1beta1_list_project_groups_response import V1beta1ListProjectGroupsResponse # noqa: E501
class TestV1beta1ListProjectGroupsResponse(unittest.TestCase):
"""V1beta1ListProjectGroupsResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListProjectGroupsResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListProjectGroupsResponse`
"""
- model = V1beta1ListProjectGroupsResponse()
+ model = V1beta1ListProjectGroupsResponse() # noqa: E501
if include_optional:
return V1beta1ListProjectGroupsResponse(
groups = [
@@ -57,7 +57,8 @@ def make_instance(self, include_optional) -> V1beta1ListProjectGroupsResponse:
updated_at = '2023-06-07T05:39:56.961Z',
state = 'enabled',
avatar = '', )
- ], )
+ ],
+ members_count = 2, )
],
role_pairs = [
frontier_api.models.v1beta1_list_project_groups_response_role_pair.v1beta1ListProjectGroupsResponseRolePair(
diff --git a/test/test_v1beta1_list_project_groups_response_role_pair.py b/test/test_v1beta1_list_project_groups_response_role_pair.py
index b0bb7c8..8f8bef6 100644
--- a/test/test_v1beta1_list_project_groups_response_role_pair.py
+++ b/test/test_v1beta1_list_project_groups_response_role_pair.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_project_groups_response_role_pair import V1beta1ListProjectGroupsResponseRolePair
+from frontier_api.models.v1beta1_list_project_groups_response_role_pair import V1beta1ListProjectGroupsResponseRolePair # noqa: E501
class TestV1beta1ListProjectGroupsResponseRolePair(unittest.TestCase):
"""V1beta1ListProjectGroupsResponseRolePair unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListProjectGroupsResponseRol
optional params are included """
# uncomment below to create an instance of `V1beta1ListProjectGroupsResponseRolePair`
"""
- model = V1beta1ListProjectGroupsResponseRolePair()
+ model = V1beta1ListProjectGroupsResponseRolePair() # noqa: E501
if include_optional:
return V1beta1ListProjectGroupsResponseRolePair(
group_id = '',
diff --git a/test/test_v1beta1_list_project_preferences_response.py b/test/test_v1beta1_list_project_preferences_response.py
index 437809b..a7c3924 100644
--- a/test/test_v1beta1_list_project_preferences_response.py
+++ b/test/test_v1beta1_list_project_preferences_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_project_preferences_response import V1beta1ListProjectPreferencesResponse
+from frontier_api.models.v1beta1_list_project_preferences_response import V1beta1ListProjectPreferencesResponse # noqa: E501
class TestV1beta1ListProjectPreferencesResponse(unittest.TestCase):
"""V1beta1ListProjectPreferencesResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListProjectPreferencesRespon
optional params are included """
# uncomment below to create an instance of `V1beta1ListProjectPreferencesResponse`
"""
- model = V1beta1ListProjectPreferencesResponse()
+ model = V1beta1ListProjectPreferencesResponse() # noqa: E501
if include_optional:
return V1beta1ListProjectPreferencesResponse(
preferences = [
diff --git a/test/test_v1beta1_list_project_resources_response.py b/test/test_v1beta1_list_project_resources_response.py
index a42a9c7..0e677fb 100644
--- a/test/test_v1beta1_list_project_resources_response.py
+++ b/test/test_v1beta1_list_project_resources_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_project_resources_response import V1beta1ListProjectResourcesResponse
+from frontier_api.models.v1beta1_list_project_resources_response import V1beta1ListProjectResourcesResponse # noqa: E501
class TestV1beta1ListProjectResourcesResponse(unittest.TestCase):
"""V1beta1ListProjectResourcesResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListProjectResourcesResponse
optional params are included """
# uncomment below to create an instance of `V1beta1ListProjectResourcesResponse`
"""
- model = V1beta1ListProjectResourcesResponse()
+ model = V1beta1ListProjectResourcesResponse() # noqa: E501
if include_optional:
return V1beta1ListProjectResourcesResponse(
resources = [
diff --git a/test/test_v1beta1_list_project_service_users_response.py b/test/test_v1beta1_list_project_service_users_response.py
index ca13756..a5a0e2c 100644
--- a/test/test_v1beta1_list_project_service_users_response.py
+++ b/test/test_v1beta1_list_project_service_users_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_project_service_users_response import V1beta1ListProjectServiceUsersResponse
+from frontier_api.models.v1beta1_list_project_service_users_response import V1beta1ListProjectServiceUsersResponse # noqa: E501
class TestV1beta1ListProjectServiceUsersResponse(unittest.TestCase):
"""V1beta1ListProjectServiceUsersResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListProjectServiceUsersRespo
optional params are included """
# uncomment below to create an instance of `V1beta1ListProjectServiceUsersResponse`
"""
- model = V1beta1ListProjectServiceUsersResponse()
+ model = V1beta1ListProjectServiceUsersResponse() # noqa: E501
if include_optional:
return V1beta1ListProjectServiceUsersResponse(
serviceusers = [
diff --git a/test/test_v1beta1_list_project_service_users_response_role_pair.py b/test/test_v1beta1_list_project_service_users_response_role_pair.py
index bf4f6e6..71edaf4 100644
--- a/test/test_v1beta1_list_project_service_users_response_role_pair.py
+++ b/test/test_v1beta1_list_project_service_users_response_role_pair.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_project_service_users_response_role_pair import V1beta1ListProjectServiceUsersResponseRolePair
+from frontier_api.models.v1beta1_list_project_service_users_response_role_pair import V1beta1ListProjectServiceUsersResponseRolePair # noqa: E501
class TestV1beta1ListProjectServiceUsersResponseRolePair(unittest.TestCase):
"""V1beta1ListProjectServiceUsersResponseRolePair unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListProjectServiceUsersRespo
optional params are included """
# uncomment below to create an instance of `V1beta1ListProjectServiceUsersResponseRolePair`
"""
- model = V1beta1ListProjectServiceUsersResponseRolePair()
+ model = V1beta1ListProjectServiceUsersResponseRolePair() # noqa: E501
if include_optional:
return V1beta1ListProjectServiceUsersResponseRolePair(
serviceuser_id = '',
diff --git a/test/test_v1beta1_list_project_users_response.py b/test/test_v1beta1_list_project_users_response.py
index 4b5f975..49682ff 100644
--- a/test/test_v1beta1_list_project_users_response.py
+++ b/test/test_v1beta1_list_project_users_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_project_users_response import V1beta1ListProjectUsersResponse
+from frontier_api.models.v1beta1_list_project_users_response import V1beta1ListProjectUsersResponse # noqa: E501
class TestV1beta1ListProjectUsersResponse(unittest.TestCase):
"""V1beta1ListProjectUsersResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListProjectUsersResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListProjectUsersResponse`
"""
- model = V1beta1ListProjectUsersResponse()
+ model = V1beta1ListProjectUsersResponse() # noqa: E501
if include_optional:
return V1beta1ListProjectUsersResponse(
users = [
diff --git a/test/test_v1beta1_list_project_users_response_role_pair.py b/test/test_v1beta1_list_project_users_response_role_pair.py
index 3a31212..b3f0d04 100644
--- a/test/test_v1beta1_list_project_users_response_role_pair.py
+++ b/test/test_v1beta1_list_project_users_response_role_pair.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_project_users_response_role_pair import V1beta1ListProjectUsersResponseRolePair
+from frontier_api.models.v1beta1_list_project_users_response_role_pair import V1beta1ListProjectUsersResponseRolePair # noqa: E501
class TestV1beta1ListProjectUsersResponseRolePair(unittest.TestCase):
"""V1beta1ListProjectUsersResponseRolePair unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListProjectUsersResponseRole
optional params are included """
# uncomment below to create an instance of `V1beta1ListProjectUsersResponseRolePair`
"""
- model = V1beta1ListProjectUsersResponseRolePair()
+ model = V1beta1ListProjectUsersResponseRolePair() # noqa: E501
if include_optional:
return V1beta1ListProjectUsersResponseRolePair(
user_id = '',
diff --git a/test/test_v1beta1_list_projects_by_current_user_response.py b/test/test_v1beta1_list_projects_by_current_user_response.py
index 0a7f618..4929d43 100644
--- a/test/test_v1beta1_list_projects_by_current_user_response.py
+++ b/test/test_v1beta1_list_projects_by_current_user_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_projects_by_current_user_response import V1beta1ListProjectsByCurrentUserResponse
+from frontier_api.models.v1beta1_list_projects_by_current_user_response import V1beta1ListProjectsByCurrentUserResponse # noqa: E501
class TestV1beta1ListProjectsByCurrentUserResponse(unittest.TestCase):
"""V1beta1ListProjectsByCurrentUserResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListProjectsByCurrentUserRes
optional params are included """
# uncomment below to create an instance of `V1beta1ListProjectsByCurrentUserResponse`
"""
- model = V1beta1ListProjectsByCurrentUserResponse()
+ model = V1beta1ListProjectsByCurrentUserResponse() # noqa: E501
if include_optional:
return V1beta1ListProjectsByCurrentUserResponse(
projects = [
@@ -45,7 +45,8 @@ def make_instance(self, include_optional) -> V1beta1ListProjectsByCurrentUserRes
org_id = '',
metadata = frontier_api.models.metadata.metadata(),
created_at = '2023-06-07T05:39:56.961Z',
- updated_at = '2023-06-07T05:39:56.961Z', )
+ updated_at = '2023-06-07T05:39:56.961Z',
+ members_count = 2, )
],
access_pairs = [
frontier_api.models.v1beta1_list_projects_by_current_user_response_access_pair.v1beta1ListProjectsByCurrentUserResponseAccessPair(
diff --git a/test/test_v1beta1_list_projects_by_current_user_response_access_pair.py b/test/test_v1beta1_list_projects_by_current_user_response_access_pair.py
index 2168b6e..3c5418f 100644
--- a/test/test_v1beta1_list_projects_by_current_user_response_access_pair.py
+++ b/test/test_v1beta1_list_projects_by_current_user_response_access_pair.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_projects_by_current_user_response_access_pair import V1beta1ListProjectsByCurrentUserResponseAccessPair
+from frontier_api.models.v1beta1_list_projects_by_current_user_response_access_pair import V1beta1ListProjectsByCurrentUserResponseAccessPair # noqa: E501
class TestV1beta1ListProjectsByCurrentUserResponseAccessPair(unittest.TestCase):
"""V1beta1ListProjectsByCurrentUserResponseAccessPair unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListProjectsByCurrentUserRes
optional params are included """
# uncomment below to create an instance of `V1beta1ListProjectsByCurrentUserResponseAccessPair`
"""
- model = V1beta1ListProjectsByCurrentUserResponseAccessPair()
+ model = V1beta1ListProjectsByCurrentUserResponseAccessPair() # noqa: E501
if include_optional:
return V1beta1ListProjectsByCurrentUserResponseAccessPair(
project_id = '',
diff --git a/test/test_v1beta1_list_projects_by_user_response.py b/test/test_v1beta1_list_projects_by_user_response.py
index 7c419c0..a83c98b 100644
--- a/test/test_v1beta1_list_projects_by_user_response.py
+++ b/test/test_v1beta1_list_projects_by_user_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_projects_by_user_response import V1beta1ListProjectsByUserResponse
+from frontier_api.models.v1beta1_list_projects_by_user_response import V1beta1ListProjectsByUserResponse # noqa: E501
class TestV1beta1ListProjectsByUserResponse(unittest.TestCase):
"""V1beta1ListProjectsByUserResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListProjectsByUserResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListProjectsByUserResponse`
"""
- model = V1beta1ListProjectsByUserResponse()
+ model = V1beta1ListProjectsByUserResponse() # noqa: E501
if include_optional:
return V1beta1ListProjectsByUserResponse(
projects = [
@@ -45,7 +45,8 @@ def make_instance(self, include_optional) -> V1beta1ListProjectsByUserResponse:
org_id = '',
metadata = frontier_api.models.metadata.metadata(),
created_at = '2023-06-07T05:39:56.961Z',
- updated_at = '2023-06-07T05:39:56.961Z', )
+ updated_at = '2023-06-07T05:39:56.961Z',
+ members_count = 2, )
]
)
else:
diff --git a/test/test_v1beta1_list_projects_response.py b/test/test_v1beta1_list_projects_response.py
index d315fb4..062a060 100644
--- a/test/test_v1beta1_list_projects_response.py
+++ b/test/test_v1beta1_list_projects_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_projects_response import V1beta1ListProjectsResponse
+from frontier_api.models.v1beta1_list_projects_response import V1beta1ListProjectsResponse # noqa: E501
class TestV1beta1ListProjectsResponse(unittest.TestCase):
"""V1beta1ListProjectsResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListProjectsResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListProjectsResponse`
"""
- model = V1beta1ListProjectsResponse()
+ model = V1beta1ListProjectsResponse() # noqa: E501
if include_optional:
return V1beta1ListProjectsResponse(
projects = [
@@ -45,7 +45,8 @@ def make_instance(self, include_optional) -> V1beta1ListProjectsResponse:
org_id = '',
metadata = frontier_api.models.metadata.metadata(),
created_at = '2023-06-07T05:39:56.961Z',
- updated_at = '2023-06-07T05:39:56.961Z', )
+ updated_at = '2023-06-07T05:39:56.961Z',
+ members_count = 2, )
]
)
else:
diff --git a/test/test_v1beta1_list_relations_response.py b/test/test_v1beta1_list_relations_response.py
index a7e0122..327bac2 100644
--- a/test/test_v1beta1_list_relations_response.py
+++ b/test/test_v1beta1_list_relations_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_relations_response import V1beta1ListRelationsResponse
+from frontier_api.models.v1beta1_list_relations_response import V1beta1ListRelationsResponse # noqa: E501
class TestV1beta1ListRelationsResponse(unittest.TestCase):
"""V1beta1ListRelationsResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListRelationsResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListRelationsResponse`
"""
- model = V1beta1ListRelationsResponse()
+ model = V1beta1ListRelationsResponse() # noqa: E501
if include_optional:
return V1beta1ListRelationsResponse(
relations = [
diff --git a/test/test_v1beta1_list_resources_response.py b/test/test_v1beta1_list_resources_response.py
index acd1a34..4cc7e16 100644
--- a/test/test_v1beta1_list_resources_response.py
+++ b/test/test_v1beta1_list_resources_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_resources_response import V1beta1ListResourcesResponse
+from frontier_api.models.v1beta1_list_resources_response import V1beta1ListResourcesResponse # noqa: E501
class TestV1beta1ListResourcesResponse(unittest.TestCase):
"""V1beta1ListResourcesResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListResourcesResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListResourcesResponse`
"""
- model = V1beta1ListResourcesResponse()
+ model = V1beta1ListResourcesResponse() # noqa: E501
if include_optional:
return V1beta1ListResourcesResponse(
resources = [
diff --git a/test/test_v1beta1_list_roles_response.py b/test/test_v1beta1_list_roles_response.py
index 73032a9..eea8984 100644
--- a/test/test_v1beta1_list_roles_response.py
+++ b/test/test_v1beta1_list_roles_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_roles_response import V1beta1ListRolesResponse
+from frontier_api.models.v1beta1_list_roles_response import V1beta1ListRolesResponse # noqa: E501
class TestV1beta1ListRolesResponse(unittest.TestCase):
"""V1beta1ListRolesResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListRolesResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListRolesResponse`
"""
- model = V1beta1ListRolesResponse()
+ model = V1beta1ListRolesResponse() # noqa: E501
if include_optional:
return V1beta1ListRolesResponse(
roles = [
diff --git a/test/test_v1beta1_list_service_user_keys_response.py b/test/test_v1beta1_list_service_user_keys_response.py
index cb287ed..a66075a 100644
--- a/test/test_v1beta1_list_service_user_keys_response.py
+++ b/test/test_v1beta1_list_service_user_keys_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_service_user_keys_response import V1beta1ListServiceUserKeysResponse
+from frontier_api.models.v1beta1_list_service_user_keys_response import V1beta1ListServiceUserKeysResponse # noqa: E501
class TestV1beta1ListServiceUserKeysResponse(unittest.TestCase):
"""V1beta1ListServiceUserKeysResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListServiceUserKeysResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListServiceUserKeysResponse`
"""
- model = V1beta1ListServiceUserKeysResponse()
+ model = V1beta1ListServiceUserKeysResponse() # noqa: E501
if include_optional:
return V1beta1ListServiceUserKeysResponse(
keys = [
diff --git a/test/test_v1beta1_list_service_user_secrets_response.py b/test/test_v1beta1_list_service_user_secrets_response.py
index e91467e..23172de 100644
--- a/test/test_v1beta1_list_service_user_secrets_response.py
+++ b/test/test_v1beta1_list_service_user_secrets_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_service_user_secrets_response import V1beta1ListServiceUserSecretsResponse
+from frontier_api.models.v1beta1_list_service_user_secrets_response import V1beta1ListServiceUserSecretsResponse # noqa: E501
class TestV1beta1ListServiceUserSecretsResponse(unittest.TestCase):
"""V1beta1ListServiceUserSecretsResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListServiceUserSecretsRespon
optional params are included """
# uncomment below to create an instance of `V1beta1ListServiceUserSecretsResponse`
"""
- model = V1beta1ListServiceUserSecretsResponse()
+ model = V1beta1ListServiceUserSecretsResponse() # noqa: E501
if include_optional:
return V1beta1ListServiceUserSecretsResponse(
secrets = [
diff --git a/test/test_v1beta1_list_service_users_response.py b/test/test_v1beta1_list_service_users_response.py
index 8f0ee11..296404d 100644
--- a/test/test_v1beta1_list_service_users_response.py
+++ b/test/test_v1beta1_list_service_users_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_service_users_response import V1beta1ListServiceUsersResponse
+from frontier_api.models.v1beta1_list_service_users_response import V1beta1ListServiceUsersResponse # noqa: E501
class TestV1beta1ListServiceUsersResponse(unittest.TestCase):
"""V1beta1ListServiceUsersResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListServiceUsersResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListServiceUsersResponse`
"""
- model = V1beta1ListServiceUsersResponse()
+ model = V1beta1ListServiceUsersResponse() # noqa: E501
if include_optional:
return V1beta1ListServiceUsersResponse(
serviceusers = [
diff --git a/test/test_v1beta1_list_subscriptions_response.py b/test/test_v1beta1_list_subscriptions_response.py
index 5d72bf9..12c9fc4 100644
--- a/test/test_v1beta1_list_subscriptions_response.py
+++ b/test/test_v1beta1_list_subscriptions_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_subscriptions_response import V1beta1ListSubscriptionsResponse
+from frontier_api.models.v1beta1_list_subscriptions_response import V1beta1ListSubscriptionsResponse # noqa: E501
class TestV1beta1ListSubscriptionsResponse(unittest.TestCase):
"""V1beta1ListSubscriptionsResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListSubscriptionsResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListSubscriptionsResponse`
"""
- model = V1beta1ListSubscriptionsResponse()
+ model = V1beta1ListSubscriptionsResponse() # noqa: E501
if include_optional:
return V1beta1ListSubscriptionsResponse(
subscriptions = [
diff --git a/test/test_v1beta1_list_user_groups_response.py b/test/test_v1beta1_list_user_groups_response.py
index eb943a4..2f2be08 100644
--- a/test/test_v1beta1_list_user_groups_response.py
+++ b/test/test_v1beta1_list_user_groups_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_user_groups_response import V1beta1ListUserGroupsResponse
+from frontier_api.models.v1beta1_list_user_groups_response import V1beta1ListUserGroupsResponse # noqa: E501
class TestV1beta1ListUserGroupsResponse(unittest.TestCase):
"""V1beta1ListUserGroupsResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListUserGroupsResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListUserGroupsResponse`
"""
- model = V1beta1ListUserGroupsResponse()
+ model = V1beta1ListUserGroupsResponse() # noqa: E501
if include_optional:
return V1beta1ListUserGroupsResponse(
groups = [
@@ -57,7 +57,8 @@ def make_instance(self, include_optional) -> V1beta1ListUserGroupsResponse:
updated_at = '2023-06-07T05:39:56.961Z',
state = 'enabled',
avatar = '', )
- ], )
+ ],
+ members_count = 2, )
]
)
else:
diff --git a/test/test_v1beta1_list_user_invitations_response.py b/test/test_v1beta1_list_user_invitations_response.py
index 6a056e6..06b40f8 100644
--- a/test/test_v1beta1_list_user_invitations_response.py
+++ b/test/test_v1beta1_list_user_invitations_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_user_invitations_response import V1beta1ListUserInvitationsResponse
+from frontier_api.models.v1beta1_list_user_invitations_response import V1beta1ListUserInvitationsResponse # noqa: E501
class TestV1beta1ListUserInvitationsResponse(unittest.TestCase):
"""V1beta1ListUserInvitationsResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListUserInvitationsResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListUserInvitationsResponse`
"""
- model = V1beta1ListUserInvitationsResponse()
+ model = V1beta1ListUserInvitationsResponse() # noqa: E501
if include_optional:
return V1beta1ListUserInvitationsResponse(
invitations = [
diff --git a/test/test_v1beta1_list_user_preferences_response.py b/test/test_v1beta1_list_user_preferences_response.py
index 0755c1a..88e79df 100644
--- a/test/test_v1beta1_list_user_preferences_response.py
+++ b/test/test_v1beta1_list_user_preferences_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_user_preferences_response import V1beta1ListUserPreferencesResponse
+from frontier_api.models.v1beta1_list_user_preferences_response import V1beta1ListUserPreferencesResponse # noqa: E501
class TestV1beta1ListUserPreferencesResponse(unittest.TestCase):
"""V1beta1ListUserPreferencesResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListUserPreferencesResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListUserPreferencesResponse`
"""
- model = V1beta1ListUserPreferencesResponse()
+ model = V1beta1ListUserPreferencesResponse() # noqa: E501
if include_optional:
return V1beta1ListUserPreferencesResponse(
preferences = [
diff --git a/test/test_v1beta1_list_users_response.py b/test/test_v1beta1_list_users_response.py
index 32491ac..d359689 100644
--- a/test/test_v1beta1_list_users_response.py
+++ b/test/test_v1beta1_list_users_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_list_users_response import V1beta1ListUsersResponse
+from frontier_api.models.v1beta1_list_users_response import V1beta1ListUsersResponse # noqa: E501
class TestV1beta1ListUsersResponse(unittest.TestCase):
"""V1beta1ListUsersResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ListUsersResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1ListUsersResponse`
"""
- model = V1beta1ListUsersResponse()
+ model = V1beta1ListUsersResponse() # noqa: E501
if include_optional:
return V1beta1ListUsersResponse(
count = 56,
diff --git a/test/test_v1beta1_meta_schema.py b/test/test_v1beta1_meta_schema.py
index fd20298..1d1f54c 100644
--- a/test/test_v1beta1_meta_schema.py
+++ b/test/test_v1beta1_meta_schema.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_meta_schema import V1beta1MetaSchema
+from frontier_api.models.v1beta1_meta_schema import V1beta1MetaSchema # noqa: E501
class TestV1beta1MetaSchema(unittest.TestCase):
"""V1beta1MetaSchema unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1MetaSchema:
optional params are included """
# uncomment below to create an instance of `V1beta1MetaSchema`
"""
- model = V1beta1MetaSchema()
+ model = V1beta1MetaSchema() # noqa: E501
if include_optional:
return V1beta1MetaSchema(
id = 'a9c4f4e2-9b9a-4c1a-8f1a-2b9b9b9b9b9b',
diff --git a/test/test_v1beta1_meta_schema_request_body.py b/test/test_v1beta1_meta_schema_request_body.py
index 2cd75bf..b8d7eee 100644
--- a/test/test_v1beta1_meta_schema_request_body.py
+++ b/test/test_v1beta1_meta_schema_request_body.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_meta_schema_request_body import V1beta1MetaSchemaRequestBody
+from frontier_api.models.v1beta1_meta_schema_request_body import V1beta1MetaSchemaRequestBody # noqa: E501
class TestV1beta1MetaSchemaRequestBody(unittest.TestCase):
"""V1beta1MetaSchemaRequestBody unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1MetaSchemaRequestBody:
optional params are included """
# uncomment below to create an instance of `V1beta1MetaSchemaRequestBody`
"""
- model = V1beta1MetaSchemaRequestBody()
+ model = V1beta1MetaSchemaRequestBody() # noqa: E501
if include_optional:
return V1beta1MetaSchemaRequestBody(
name = '',
diff --git a/test/test_v1beta1_namespace.py b/test/test_v1beta1_namespace.py
index bcce403..63b95fd 100644
--- a/test/test_v1beta1_namespace.py
+++ b/test/test_v1beta1_namespace.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_namespace import V1beta1Namespace
+from frontier_api.models.v1beta1_namespace import V1beta1Namespace # noqa: E501
class TestV1beta1Namespace(unittest.TestCase):
"""V1beta1Namespace unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1Namespace:
optional params are included """
# uncomment below to create an instance of `V1beta1Namespace`
"""
- model = V1beta1Namespace()
+ model = V1beta1Namespace() # noqa: E501
if include_optional:
return V1beta1Namespace(
id = '',
diff --git a/test/test_v1beta1_organization.py b/test/test_v1beta1_organization.py
index f9faa35..7b478d6 100644
--- a/test/test_v1beta1_organization.py
+++ b/test/test_v1beta1_organization.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_organization import V1beta1Organization
+from frontier_api.models.v1beta1_organization import V1beta1Organization # noqa: E501
class TestV1beta1Organization(unittest.TestCase):
"""V1beta1Organization unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1Organization:
optional params are included """
# uncomment below to create an instance of `V1beta1Organization`
"""
- model = V1beta1Organization()
+ model = V1beta1Organization() # noqa: E501
if include_optional:
return V1beta1Organization(
id = '',
diff --git a/test/test_v1beta1_organization_request_body.py b/test/test_v1beta1_organization_request_body.py
index f57b8af..8ada65d 100644
--- a/test/test_v1beta1_organization_request_body.py
+++ b/test/test_v1beta1_organization_request_body.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_organization_request_body import V1beta1OrganizationRequestBody
+from frontier_api.models.v1beta1_organization_request_body import V1beta1OrganizationRequestBody # noqa: E501
class TestV1beta1OrganizationRequestBody(unittest.TestCase):
"""V1beta1OrganizationRequestBody unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1OrganizationRequestBody:
optional params are included """
# uncomment below to create an instance of `V1beta1OrganizationRequestBody`
"""
- model = V1beta1OrganizationRequestBody()
+ model = V1beta1OrganizationRequestBody() # noqa: E501
if include_optional:
return V1beta1OrganizationRequestBody(
name = '',
diff --git a/test/test_v1beta1_permission.py b/test/test_v1beta1_permission.py
index 1b81be4..9eab4d3 100644
--- a/test/test_v1beta1_permission.py
+++ b/test/test_v1beta1_permission.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_permission import V1beta1Permission
+from frontier_api.models.v1beta1_permission import V1beta1Permission # noqa: E501
class TestV1beta1Permission(unittest.TestCase):
"""V1beta1Permission unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1Permission:
optional params are included """
# uncomment below to create an instance of `V1beta1Permission`
"""
- model = V1beta1Permission()
+ model = V1beta1Permission() # noqa: E501
if include_optional:
return V1beta1Permission(
id = '',
diff --git a/test/test_v1beta1_permission_request_body.py b/test/test_v1beta1_permission_request_body.py
index 27ee053..2e30fb1 100644
--- a/test/test_v1beta1_permission_request_body.py
+++ b/test/test_v1beta1_permission_request_body.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_permission_request_body import V1beta1PermissionRequestBody
+from frontier_api.models.v1beta1_permission_request_body import V1beta1PermissionRequestBody # noqa: E501
class TestV1beta1PermissionRequestBody(unittest.TestCase):
"""V1beta1PermissionRequestBody unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1PermissionRequestBody:
optional params are included """
# uncomment below to create an instance of `V1beta1PermissionRequestBody`
"""
- model = V1beta1PermissionRequestBody()
+ model = V1beta1PermissionRequestBody() # noqa: E501
if include_optional:
return V1beta1PermissionRequestBody(
name = '',
diff --git a/test/test_v1beta1_plan.py b/test/test_v1beta1_plan.py
index f6d384b..860dc44 100644
--- a/test/test_v1beta1_plan.py
+++ b/test/test_v1beta1_plan.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_plan import V1beta1Plan
+from frontier_api.models.v1beta1_plan import V1beta1Plan # noqa: E501
class TestV1beta1Plan(unittest.TestCase):
"""V1beta1Plan unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1Plan:
optional params are included """
# uncomment below to create an instance of `V1beta1Plan`
"""
- model = V1beta1Plan()
+ model = V1beta1Plan() # noqa: E501
if include_optional:
return V1beta1Plan(
id = '',
diff --git a/test/test_v1beta1_plan_request_body.py b/test/test_v1beta1_plan_request_body.py
index 9f2b720..ac13a4d 100644
--- a/test/test_v1beta1_plan_request_body.py
+++ b/test/test_v1beta1_plan_request_body.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_plan_request_body import V1beta1PlanRequestBody
+from frontier_api.models.v1beta1_plan_request_body import V1beta1PlanRequestBody # noqa: E501
class TestV1beta1PlanRequestBody(unittest.TestCase):
"""V1beta1PlanRequestBody unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1PlanRequestBody:
optional params are included """
# uncomment below to create an instance of `V1beta1PlanRequestBody`
"""
- model = V1beta1PlanRequestBody()
+ model = V1beta1PlanRequestBody() # noqa: E501
if include_optional:
return V1beta1PlanRequestBody(
name = '',
diff --git a/test/test_v1beta1_policy.py b/test/test_v1beta1_policy.py
index 76eb2b4..dbb74d2 100644
--- a/test/test_v1beta1_policy.py
+++ b/test/test_v1beta1_policy.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_policy import V1beta1Policy
+from frontier_api.models.v1beta1_policy import V1beta1Policy # noqa: E501
class TestV1beta1Policy(unittest.TestCase):
"""V1beta1Policy unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1Policy:
optional params are included """
# uncomment below to create an instance of `V1beta1Policy`
"""
- model = V1beta1Policy()
+ model = V1beta1Policy() # noqa: E501
if include_optional:
return V1beta1Policy(
id = '',
diff --git a/test/test_v1beta1_policy_request_body.py b/test/test_v1beta1_policy_request_body.py
index fc8b3ef..23173f2 100644
--- a/test/test_v1beta1_policy_request_body.py
+++ b/test/test_v1beta1_policy_request_body.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_policy_request_body import V1beta1PolicyRequestBody
+from frontier_api.models.v1beta1_policy_request_body import V1beta1PolicyRequestBody # noqa: E501
class TestV1beta1PolicyRequestBody(unittest.TestCase):
"""V1beta1PolicyRequestBody unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1PolicyRequestBody:
optional params are included """
# uncomment below to create an instance of `V1beta1PolicyRequestBody`
"""
- model = V1beta1PolicyRequestBody()
+ model = V1beta1PolicyRequestBody() # noqa: E501
if include_optional:
return V1beta1PolicyRequestBody(
role_id = '',
diff --git a/test/test_v1beta1_preference.py b/test/test_v1beta1_preference.py
index ce48ca4..9706849 100644
--- a/test/test_v1beta1_preference.py
+++ b/test/test_v1beta1_preference.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_preference import V1beta1Preference
+from frontier_api.models.v1beta1_preference import V1beta1Preference # noqa: E501
class TestV1beta1Preference(unittest.TestCase):
"""V1beta1Preference unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1Preference:
optional params are included """
# uncomment below to create an instance of `V1beta1Preference`
"""
- model = V1beta1Preference()
+ model = V1beta1Preference() # noqa: E501
if include_optional:
return V1beta1Preference(
id = '',
diff --git a/test/test_v1beta1_preference_request_body.py b/test/test_v1beta1_preference_request_body.py
index 424cbcf..d90b210 100644
--- a/test/test_v1beta1_preference_request_body.py
+++ b/test/test_v1beta1_preference_request_body.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_preference_request_body import V1beta1PreferenceRequestBody
+from frontier_api.models.v1beta1_preference_request_body import V1beta1PreferenceRequestBody # noqa: E501
class TestV1beta1PreferenceRequestBody(unittest.TestCase):
"""V1beta1PreferenceRequestBody unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1PreferenceRequestBody:
optional params are included """
# uncomment below to create an instance of `V1beta1PreferenceRequestBody`
"""
- model = V1beta1PreferenceRequestBody()
+ model = V1beta1PreferenceRequestBody() # noqa: E501
if include_optional:
return V1beta1PreferenceRequestBody(
name = '',
diff --git a/test/test_v1beta1_preference_trait.py b/test/test_v1beta1_preference_trait.py
index 598b527..656635a 100644
--- a/test/test_v1beta1_preference_trait.py
+++ b/test/test_v1beta1_preference_trait.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_preference_trait import V1beta1PreferenceTrait
+from frontier_api.models.v1beta1_preference_trait import V1beta1PreferenceTrait # noqa: E501
class TestV1beta1PreferenceTrait(unittest.TestCase):
"""V1beta1PreferenceTrait unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1PreferenceTrait:
optional params are included """
# uncomment below to create an instance of `V1beta1PreferenceTrait`
"""
- model = V1beta1PreferenceTrait()
+ model = V1beta1PreferenceTrait() # noqa: E501
if include_optional:
return V1beta1PreferenceTrait(
resource_type = '',
diff --git a/test/test_v1beta1_price.py b/test/test_v1beta1_price.py
index dba2654..1f4dfda 100644
--- a/test/test_v1beta1_price.py
+++ b/test/test_v1beta1_price.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_price import V1beta1Price
+from frontier_api.models.v1beta1_price import V1beta1Price # noqa: E501
class TestV1beta1Price(unittest.TestCase):
"""V1beta1Price unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1Price:
optional params are included """
# uncomment below to create an instance of `V1beta1Price`
"""
- model = V1beta1Price()
+ model = V1beta1Price() # noqa: E501
if include_optional:
return V1beta1Price(
id = '',
diff --git a/test/test_v1beta1_project.py b/test/test_v1beta1_project.py
index b0b141a..e532be6 100644
--- a/test/test_v1beta1_project.py
+++ b/test/test_v1beta1_project.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_project import V1beta1Project
+from frontier_api.models.v1beta1_project import V1beta1Project # noqa: E501
class TestV1beta1Project(unittest.TestCase):
"""V1beta1Project unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1Project:
optional params are included """
# uncomment below to create an instance of `V1beta1Project`
"""
- model = V1beta1Project()
+ model = V1beta1Project() # noqa: E501
if include_optional:
return V1beta1Project(
id = '',
@@ -43,7 +43,8 @@ def make_instance(self, include_optional) -> V1beta1Project:
org_id = '',
metadata = frontier_api.models.metadata.metadata(),
created_at = '2023-06-07T05:39:56.961Z',
- updated_at = '2023-06-07T05:39:56.961Z'
+ updated_at = '2023-06-07T05:39:56.961Z',
+ members_count = 2
)
else:
return V1beta1Project(
diff --git a/test/test_v1beta1_project_request_body.py b/test/test_v1beta1_project_request_body.py
index a1cc4ba..0e7303e 100644
--- a/test/test_v1beta1_project_request_body.py
+++ b/test/test_v1beta1_project_request_body.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_project_request_body import V1beta1ProjectRequestBody
+from frontier_api.models.v1beta1_project_request_body import V1beta1ProjectRequestBody # noqa: E501
class TestV1beta1ProjectRequestBody(unittest.TestCase):
"""V1beta1ProjectRequestBody unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ProjectRequestBody:
optional params are included """
# uncomment below to create an instance of `V1beta1ProjectRequestBody`
"""
- model = V1beta1ProjectRequestBody()
+ model = V1beta1ProjectRequestBody() # noqa: E501
if include_optional:
return V1beta1ProjectRequestBody(
name = '',
diff --git a/test/test_v1beta1_relation.py b/test/test_v1beta1_relation.py
index fa484a6..b82c632 100644
--- a/test/test_v1beta1_relation.py
+++ b/test/test_v1beta1_relation.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_relation import V1beta1Relation
+from frontier_api.models.v1beta1_relation import V1beta1Relation # noqa: E501
class TestV1beta1Relation(unittest.TestCase):
"""V1beta1Relation unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1Relation:
optional params are included """
# uncomment below to create an instance of `V1beta1Relation`
"""
- model = V1beta1Relation()
+ model = V1beta1Relation() # noqa: E501
if include_optional:
return V1beta1Relation(
id = '',
diff --git a/test/test_v1beta1_relation_request_body.py b/test/test_v1beta1_relation_request_body.py
index 811c5bd..556a387 100644
--- a/test/test_v1beta1_relation_request_body.py
+++ b/test/test_v1beta1_relation_request_body.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_relation_request_body import V1beta1RelationRequestBody
+from frontier_api.models.v1beta1_relation_request_body import V1beta1RelationRequestBody # noqa: E501
class TestV1beta1RelationRequestBody(unittest.TestCase):
"""V1beta1RelationRequestBody unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1RelationRequestBody:
optional params are included """
# uncomment below to create an instance of `V1beta1RelationRequestBody`
"""
- model = V1beta1RelationRequestBody()
+ model = V1beta1RelationRequestBody() # noqa: E501
if include_optional:
return V1beta1RelationRequestBody(
object = '',
diff --git a/test/test_v1beta1_resource.py b/test/test_v1beta1_resource.py
index 52dd924..c311617 100644
--- a/test/test_v1beta1_resource.py
+++ b/test/test_v1beta1_resource.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_resource import V1beta1Resource
+from frontier_api.models.v1beta1_resource import V1beta1Resource # noqa: E501
class TestV1beta1Resource(unittest.TestCase):
"""V1beta1Resource unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1Resource:
optional params are included """
# uncomment below to create an instance of `V1beta1Resource`
"""
- model = V1beta1Resource()
+ model = V1beta1Resource() # noqa: E501
if include_optional:
return V1beta1Resource(
id = '',
diff --git a/test/test_v1beta1_resource_request_body.py b/test/test_v1beta1_resource_request_body.py
index ddd286d..ce0a426 100644
--- a/test/test_v1beta1_resource_request_body.py
+++ b/test/test_v1beta1_resource_request_body.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_resource_request_body import V1beta1ResourceRequestBody
+from frontier_api.models.v1beta1_resource_request_body import V1beta1ResourceRequestBody # noqa: E501
class TestV1beta1ResourceRequestBody(unittest.TestCase):
"""V1beta1ResourceRequestBody unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ResourceRequestBody:
optional params are included """
# uncomment below to create an instance of `V1beta1ResourceRequestBody`
"""
- model = V1beta1ResourceRequestBody()
+ model = V1beta1ResourceRequestBody() # noqa: E501
if include_optional:
return V1beta1ResourceRequestBody(
name = '',
diff --git a/test/test_v1beta1_role.py b/test/test_v1beta1_role.py
index 9683733..090f8d3 100644
--- a/test/test_v1beta1_role.py
+++ b/test/test_v1beta1_role.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_role import V1beta1Role
+from frontier_api.models.v1beta1_role import V1beta1Role # noqa: E501
class TestV1beta1Role(unittest.TestCase):
"""V1beta1Role unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1Role:
optional params are included """
# uncomment below to create an instance of `V1beta1Role`
"""
- model = V1beta1Role()
+ model = V1beta1Role() # noqa: E501
if include_optional:
return V1beta1Role(
id = '',
diff --git a/test/test_v1beta1_role_request_body.py b/test/test_v1beta1_role_request_body.py
index 80ac03f..9d56cc7 100644
--- a/test/test_v1beta1_role_request_body.py
+++ b/test/test_v1beta1_role_request_body.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_role_request_body import V1beta1RoleRequestBody
+from frontier_api.models.v1beta1_role_request_body import V1beta1RoleRequestBody # noqa: E501
class TestV1beta1RoleRequestBody(unittest.TestCase):
"""V1beta1RoleRequestBody unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1RoleRequestBody:
optional params are included """
# uncomment below to create an instance of `V1beta1RoleRequestBody`
"""
- model = V1beta1RoleRequestBody()
+ model = V1beta1RoleRequestBody() # noqa: E501
if include_optional:
return V1beta1RoleRequestBody(
name = '',
diff --git a/test/test_v1beta1_secret_credential.py b/test/test_v1beta1_secret_credential.py
index ece8992..6456f2e 100644
--- a/test/test_v1beta1_secret_credential.py
+++ b/test/test_v1beta1_secret_credential.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_secret_credential import V1beta1SecretCredential
+from frontier_api.models.v1beta1_secret_credential import V1beta1SecretCredential # noqa: E501
class TestV1beta1SecretCredential(unittest.TestCase):
"""V1beta1SecretCredential unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1SecretCredential:
optional params are included """
# uncomment below to create an instance of `V1beta1SecretCredential`
"""
- model = V1beta1SecretCredential()
+ model = V1beta1SecretCredential() # noqa: E501
if include_optional:
return V1beta1SecretCredential(
id = '',
diff --git a/test/test_v1beta1_service_user.py b/test/test_v1beta1_service_user.py
index c2b8a9a..f99f8de 100644
--- a/test/test_v1beta1_service_user.py
+++ b/test/test_v1beta1_service_user.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_service_user import V1beta1ServiceUser
+from frontier_api.models.v1beta1_service_user import V1beta1ServiceUser # noqa: E501
class TestV1beta1ServiceUser(unittest.TestCase):
"""V1beta1ServiceUser unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ServiceUser:
optional params are included """
# uncomment below to create an instance of `V1beta1ServiceUser`
"""
- model = V1beta1ServiceUser()
+ model = V1beta1ServiceUser() # noqa: E501
if include_optional:
return V1beta1ServiceUser(
id = '',
diff --git a/test/test_v1beta1_service_user_key.py b/test/test_v1beta1_service_user_key.py
index 7011f14..8752d11 100644
--- a/test/test_v1beta1_service_user_key.py
+++ b/test/test_v1beta1_service_user_key.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_service_user_key import V1beta1ServiceUserKey
+from frontier_api.models.v1beta1_service_user_key import V1beta1ServiceUserKey # noqa: E501
class TestV1beta1ServiceUserKey(unittest.TestCase):
"""V1beta1ServiceUserKey unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ServiceUserKey:
optional params are included """
# uncomment below to create an instance of `V1beta1ServiceUserKey`
"""
- model = V1beta1ServiceUserKey()
+ model = V1beta1ServiceUserKey() # noqa: E501
if include_optional:
return V1beta1ServiceUserKey(
id = '',
diff --git a/test/test_v1beta1_service_user_request_body.py b/test/test_v1beta1_service_user_request_body.py
index 808f146..d17cb47 100644
--- a/test/test_v1beta1_service_user_request_body.py
+++ b/test/test_v1beta1_service_user_request_body.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_service_user_request_body import V1beta1ServiceUserRequestBody
+from frontier_api.models.v1beta1_service_user_request_body import V1beta1ServiceUserRequestBody # noqa: E501
class TestV1beta1ServiceUserRequestBody(unittest.TestCase):
"""V1beta1ServiceUserRequestBody unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1ServiceUserRequestBody:
optional params are included """
# uncomment below to create an instance of `V1beta1ServiceUserRequestBody`
"""
- model = V1beta1ServiceUserRequestBody()
+ model = V1beta1ServiceUserRequestBody() # noqa: E501
if include_optional:
return V1beta1ServiceUserRequestBody(
title = 'Order Service',
diff --git a/test/test_v1beta1_subscription.py b/test/test_v1beta1_subscription.py
index 89789dd..642c04b 100644
--- a/test/test_v1beta1_subscription.py
+++ b/test/test_v1beta1_subscription.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_subscription import V1beta1Subscription
+from frontier_api.models.v1beta1_subscription import V1beta1Subscription # noqa: E501
class TestV1beta1Subscription(unittest.TestCase):
"""V1beta1Subscription unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1Subscription:
optional params are included """
# uncomment below to create an instance of `V1beta1Subscription`
"""
- model = V1beta1Subscription()
+ model = V1beta1Subscription() # noqa: E501
if include_optional:
return V1beta1Subscription(
id = '',
diff --git a/test/test_v1beta1_update_billing_account_response.py b/test/test_v1beta1_update_billing_account_response.py
index 97a239c..24eb933 100644
--- a/test/test_v1beta1_update_billing_account_response.py
+++ b/test/test_v1beta1_update_billing_account_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_update_billing_account_response import V1beta1UpdateBillingAccountResponse
+from frontier_api.models.v1beta1_update_billing_account_response import V1beta1UpdateBillingAccountResponse # noqa: E501
class TestV1beta1UpdateBillingAccountResponse(unittest.TestCase):
"""V1beta1UpdateBillingAccountResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1UpdateBillingAccountResponse
optional params are included """
# uncomment below to create an instance of `V1beta1UpdateBillingAccountResponse`
"""
- model = V1beta1UpdateBillingAccountResponse()
+ model = V1beta1UpdateBillingAccountResponse() # noqa: E501
if include_optional:
return V1beta1UpdateBillingAccountResponse(
billing_account = frontier_api.models.v1beta1_billing_account.v1beta1BillingAccount(
diff --git a/test/test_v1beta1_update_current_user_response.py b/test/test_v1beta1_update_current_user_response.py
index c57bd60..f0170a2 100644
--- a/test/test_v1beta1_update_current_user_response.py
+++ b/test/test_v1beta1_update_current_user_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_update_current_user_response import V1beta1UpdateCurrentUserResponse
+from frontier_api.models.v1beta1_update_current_user_response import V1beta1UpdateCurrentUserResponse # noqa: E501
class TestV1beta1UpdateCurrentUserResponse(unittest.TestCase):
"""V1beta1UpdateCurrentUserResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1UpdateCurrentUserResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1UpdateCurrentUserResponse`
"""
- model = V1beta1UpdateCurrentUserResponse()
+ model = V1beta1UpdateCurrentUserResponse() # noqa: E501
if include_optional:
return V1beta1UpdateCurrentUserResponse(
user = frontier_api.models.v1beta1_user.v1beta1User(
diff --git a/test/test_v1beta1_update_feature_response.py b/test/test_v1beta1_update_feature_response.py
index e6008bc..fda9fa0 100644
--- a/test/test_v1beta1_update_feature_response.py
+++ b/test/test_v1beta1_update_feature_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_update_feature_response import V1beta1UpdateFeatureResponse
+from frontier_api.models.v1beta1_update_feature_response import V1beta1UpdateFeatureResponse # noqa: E501
class TestV1beta1UpdateFeatureResponse(unittest.TestCase):
"""V1beta1UpdateFeatureResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1UpdateFeatureResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1UpdateFeatureResponse`
"""
- model = V1beta1UpdateFeatureResponse()
+ model = V1beta1UpdateFeatureResponse() # noqa: E501
if include_optional:
return V1beta1UpdateFeatureResponse(
feature = frontier_api.models.v1beta1_feature.v1beta1Feature(
diff --git a/test/test_v1beta1_update_group_response.py b/test/test_v1beta1_update_group_response.py
index 67e1411..3e137e9 100644
--- a/test/test_v1beta1_update_group_response.py
+++ b/test/test_v1beta1_update_group_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_update_group_response import V1beta1UpdateGroupResponse
+from frontier_api.models.v1beta1_update_group_response import V1beta1UpdateGroupResponse # noqa: E501
class TestV1beta1UpdateGroupResponse(unittest.TestCase):
"""V1beta1UpdateGroupResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1UpdateGroupResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1UpdateGroupResponse`
"""
- model = V1beta1UpdateGroupResponse()
+ model = V1beta1UpdateGroupResponse() # noqa: E501
if include_optional:
return V1beta1UpdateGroupResponse(
group = frontier_api.models.v1beta1_group.v1beta1Group(
@@ -56,7 +56,8 @@ def make_instance(self, include_optional) -> V1beta1UpdateGroupResponse:
updated_at = '2023-06-07T05:39:56.961Z',
state = 'enabled',
avatar = '', )
- ], )
+ ],
+ members_count = 2, )
)
else:
return V1beta1UpdateGroupResponse(
diff --git a/test/test_v1beta1_update_meta_schema_response.py b/test/test_v1beta1_update_meta_schema_response.py
index c25d184..021e04b 100644
--- a/test/test_v1beta1_update_meta_schema_response.py
+++ b/test/test_v1beta1_update_meta_schema_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_update_meta_schema_response import V1beta1UpdateMetaSchemaResponse
+from frontier_api.models.v1beta1_update_meta_schema_response import V1beta1UpdateMetaSchemaResponse # noqa: E501
class TestV1beta1UpdateMetaSchemaResponse(unittest.TestCase):
"""V1beta1UpdateMetaSchemaResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1UpdateMetaSchemaResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1UpdateMetaSchemaResponse`
"""
- model = V1beta1UpdateMetaSchemaResponse()
+ model = V1beta1UpdateMetaSchemaResponse() # noqa: E501
if include_optional:
return V1beta1UpdateMetaSchemaResponse(
metaschema = frontier_api.models.v1beta1_meta_schema.v1beta1MetaSchema(
diff --git a/test/test_v1beta1_update_organization_response.py b/test/test_v1beta1_update_organization_response.py
index e8eac99..7855be8 100644
--- a/test/test_v1beta1_update_organization_response.py
+++ b/test/test_v1beta1_update_organization_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_update_organization_response import V1beta1UpdateOrganizationResponse
+from frontier_api.models.v1beta1_update_organization_response import V1beta1UpdateOrganizationResponse # noqa: E501
class TestV1beta1UpdateOrganizationResponse(unittest.TestCase):
"""V1beta1UpdateOrganizationResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1UpdateOrganizationResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1UpdateOrganizationResponse`
"""
- model = V1beta1UpdateOrganizationResponse()
+ model = V1beta1UpdateOrganizationResponse() # noqa: E501
if include_optional:
return V1beta1UpdateOrganizationResponse(
organization = frontier_api.models.v1beta1_organization.v1beta1Organization(
diff --git a/test/test_v1beta1_update_organization_role_response.py b/test/test_v1beta1_update_organization_role_response.py
index 6f2d3fc..f9a2141 100644
--- a/test/test_v1beta1_update_organization_role_response.py
+++ b/test/test_v1beta1_update_organization_role_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_update_organization_role_response import V1beta1UpdateOrganizationRoleResponse
+from frontier_api.models.v1beta1_update_organization_role_response import V1beta1UpdateOrganizationRoleResponse # noqa: E501
class TestV1beta1UpdateOrganizationRoleResponse(unittest.TestCase):
"""V1beta1UpdateOrganizationRoleResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1UpdateOrganizationRoleRespon
optional params are included """
# uncomment below to create an instance of `V1beta1UpdateOrganizationRoleResponse`
"""
- model = V1beta1UpdateOrganizationRoleResponse()
+ model = V1beta1UpdateOrganizationRoleResponse() # noqa: E501
if include_optional:
return V1beta1UpdateOrganizationRoleResponse(
role = frontier_api.models.v1beta1_role.v1beta1Role(
diff --git a/test/test_v1beta1_update_permission_response.py b/test/test_v1beta1_update_permission_response.py
index a98e457..2e9f3f8 100644
--- a/test/test_v1beta1_update_permission_response.py
+++ b/test/test_v1beta1_update_permission_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_update_permission_response import V1beta1UpdatePermissionResponse
+from frontier_api.models.v1beta1_update_permission_response import V1beta1UpdatePermissionResponse # noqa: E501
class TestV1beta1UpdatePermissionResponse(unittest.TestCase):
"""V1beta1UpdatePermissionResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1UpdatePermissionResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1UpdatePermissionResponse`
"""
- model = V1beta1UpdatePermissionResponse()
+ model = V1beta1UpdatePermissionResponse() # noqa: E501
if include_optional:
return V1beta1UpdatePermissionResponse(
permission = frontier_api.models.v1beta1_permission.v1beta1Permission(
diff --git a/test/test_v1beta1_update_plan_response.py b/test/test_v1beta1_update_plan_response.py
index 8256778..97e499d 100644
--- a/test/test_v1beta1_update_plan_response.py
+++ b/test/test_v1beta1_update_plan_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_update_plan_response import V1beta1UpdatePlanResponse
+from frontier_api.models.v1beta1_update_plan_response import V1beta1UpdatePlanResponse # noqa: E501
class TestV1beta1UpdatePlanResponse(unittest.TestCase):
"""V1beta1UpdatePlanResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1UpdatePlanResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1UpdatePlanResponse`
"""
- model = V1beta1UpdatePlanResponse()
+ model = V1beta1UpdatePlanResponse() # noqa: E501
if include_optional:
return V1beta1UpdatePlanResponse(
plan = frontier_api.models.v1beta1_plan.v1beta1Plan(
diff --git a/test/test_v1beta1_update_policy_response.py b/test/test_v1beta1_update_policy_response.py
index 585119b..f5a8fa8 100644
--- a/test/test_v1beta1_update_policy_response.py
+++ b/test/test_v1beta1_update_policy_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_update_policy_response import V1beta1UpdatePolicyResponse
+from frontier_api.models.v1beta1_update_policy_response import V1beta1UpdatePolicyResponse # noqa: E501
class TestV1beta1UpdatePolicyResponse(unittest.TestCase):
"""V1beta1UpdatePolicyResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1UpdatePolicyResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1UpdatePolicyResponse`
"""
- model = V1beta1UpdatePolicyResponse()
+ model = V1beta1UpdatePolicyResponse() # noqa: E501
if include_optional:
return V1beta1UpdatePolicyResponse(
policies = [
diff --git a/test/test_v1beta1_update_project_resource_response.py b/test/test_v1beta1_update_project_resource_response.py
index 6a0ad37..4f2fe04 100644
--- a/test/test_v1beta1_update_project_resource_response.py
+++ b/test/test_v1beta1_update_project_resource_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_update_project_resource_response import V1beta1UpdateProjectResourceResponse
+from frontier_api.models.v1beta1_update_project_resource_response import V1beta1UpdateProjectResourceResponse # noqa: E501
class TestV1beta1UpdateProjectResourceResponse(unittest.TestCase):
"""V1beta1UpdateProjectResourceResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1UpdateProjectResourceRespons
optional params are included """
# uncomment below to create an instance of `V1beta1UpdateProjectResourceResponse`
"""
- model = V1beta1UpdateProjectResourceResponse()
+ model = V1beta1UpdateProjectResourceResponse() # noqa: E501
if include_optional:
return V1beta1UpdateProjectResourceResponse(
resource = frontier_api.models.v1beta1_resource.v1beta1Resource(
diff --git a/test/test_v1beta1_update_project_response.py b/test/test_v1beta1_update_project_response.py
index c7c16c5..df18233 100644
--- a/test/test_v1beta1_update_project_response.py
+++ b/test/test_v1beta1_update_project_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_update_project_response import V1beta1UpdateProjectResponse
+from frontier_api.models.v1beta1_update_project_response import V1beta1UpdateProjectResponse # noqa: E501
class TestV1beta1UpdateProjectResponse(unittest.TestCase):
"""V1beta1UpdateProjectResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1UpdateProjectResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1UpdateProjectResponse`
"""
- model = V1beta1UpdateProjectResponse()
+ model = V1beta1UpdateProjectResponse() # noqa: E501
if include_optional:
return V1beta1UpdateProjectResponse(
project = frontier_api.models.v1beta1_project.v1beta1Project(
@@ -44,7 +44,8 @@ def make_instance(self, include_optional) -> V1beta1UpdateProjectResponse:
org_id = '',
metadata = frontier_api.models.metadata.metadata(),
created_at = '2023-06-07T05:39:56.961Z',
- updated_at = '2023-06-07T05:39:56.961Z', )
+ updated_at = '2023-06-07T05:39:56.961Z',
+ members_count = 2, )
)
else:
return V1beta1UpdateProjectResponse(
diff --git a/test/test_v1beta1_update_role_response.py b/test/test_v1beta1_update_role_response.py
index f4219e7..632b0b7 100644
--- a/test/test_v1beta1_update_role_response.py
+++ b/test/test_v1beta1_update_role_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_update_role_response import V1beta1UpdateRoleResponse
+from frontier_api.models.v1beta1_update_role_response import V1beta1UpdateRoleResponse # noqa: E501
class TestV1beta1UpdateRoleResponse(unittest.TestCase):
"""V1beta1UpdateRoleResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1UpdateRoleResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1UpdateRoleResponse`
"""
- model = V1beta1UpdateRoleResponse()
+ model = V1beta1UpdateRoleResponse() # noqa: E501
if include_optional:
return V1beta1UpdateRoleResponse(
role = frontier_api.models.v1beta1_role.v1beta1Role(
diff --git a/test/test_v1beta1_update_subscription_response.py b/test/test_v1beta1_update_subscription_response.py
index a8b5122..1995e48 100644
--- a/test/test_v1beta1_update_subscription_response.py
+++ b/test/test_v1beta1_update_subscription_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_update_subscription_response import V1beta1UpdateSubscriptionResponse
+from frontier_api.models.v1beta1_update_subscription_response import V1beta1UpdateSubscriptionResponse # noqa: E501
class TestV1beta1UpdateSubscriptionResponse(unittest.TestCase):
"""V1beta1UpdateSubscriptionResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1UpdateSubscriptionResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1UpdateSubscriptionResponse`
"""
- model = V1beta1UpdateSubscriptionResponse()
+ model = V1beta1UpdateSubscriptionResponse() # noqa: E501
if include_optional:
return V1beta1UpdateSubscriptionResponse(
subscription = frontier_api.models.v1beta1_subscription.v1beta1Subscription(
diff --git a/test/test_v1beta1_update_user_response.py b/test/test_v1beta1_update_user_response.py
index b1d3c34..63c2fc3 100644
--- a/test/test_v1beta1_update_user_response.py
+++ b/test/test_v1beta1_update_user_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_update_user_response import V1beta1UpdateUserResponse
+from frontier_api.models.v1beta1_update_user_response import V1beta1UpdateUserResponse # noqa: E501
class TestV1beta1UpdateUserResponse(unittest.TestCase):
"""V1beta1UpdateUserResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1UpdateUserResponse:
optional params are included """
# uncomment below to create an instance of `V1beta1UpdateUserResponse`
"""
- model = V1beta1UpdateUserResponse()
+ model = V1beta1UpdateUserResponse() # noqa: E501
if include_optional:
return V1beta1UpdateUserResponse(
user = frontier_api.models.v1beta1_user.v1beta1User(
diff --git a/test/test_v1beta1_usage.py b/test/test_v1beta1_usage.py
index ac5d716..3175b7f 100644
--- a/test/test_v1beta1_usage.py
+++ b/test/test_v1beta1_usage.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_usage import V1beta1Usage
+from frontier_api.models.v1beta1_usage import V1beta1Usage # noqa: E501
class TestV1beta1Usage(unittest.TestCase):
"""V1beta1Usage unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1Usage:
optional params are included """
# uncomment below to create an instance of `V1beta1Usage`
"""
- model = V1beta1Usage()
+ model = V1beta1Usage() # noqa: E501
if include_optional:
return V1beta1Usage(
id = '',
diff --git a/test/test_v1beta1_user.py b/test/test_v1beta1_user.py
index 13dff3c..076e8b8 100644
--- a/test/test_v1beta1_user.py
+++ b/test/test_v1beta1_user.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_user import V1beta1User
+from frontier_api.models.v1beta1_user import V1beta1User # noqa: E501
class TestV1beta1User(unittest.TestCase):
"""V1beta1User unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1User:
optional params are included """
# uncomment below to create an instance of `V1beta1User`
"""
- model = V1beta1User()
+ model = V1beta1User() # noqa: E501
if include_optional:
return V1beta1User(
id = '',
diff --git a/test/test_v1beta1_user_request_body.py b/test/test_v1beta1_user_request_body.py
index 53a2ac4..24bcff0 100644
--- a/test/test_v1beta1_user_request_body.py
+++ b/test/test_v1beta1_user_request_body.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_user_request_body import V1beta1UserRequestBody
+from frontier_api.models.v1beta1_user_request_body import V1beta1UserRequestBody # noqa: E501
class TestV1beta1UserRequestBody(unittest.TestCase):
"""V1beta1UserRequestBody unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1UserRequestBody:
optional params are included """
# uncomment below to create an instance of `V1beta1UserRequestBody`
"""
- model = V1beta1UserRequestBody()
+ model = V1beta1UserRequestBody() # noqa: E501
if include_optional:
return V1beta1UserRequestBody(
name = '',
diff --git a/test/test_v1beta1_verify_organization_domain_response.py b/test/test_v1beta1_verify_organization_domain_response.py
index 030fd9d..3561c0c 100644
--- a/test/test_v1beta1_verify_organization_domain_response.py
+++ b/test/test_v1beta1_verify_organization_domain_response.py
@@ -16,7 +16,7 @@
import unittest
import datetime
-from frontier_api.models.v1beta1_verify_organization_domain_response import V1beta1VerifyOrganizationDomainResponse
+from frontier_api.models.v1beta1_verify_organization_domain_response import V1beta1VerifyOrganizationDomainResponse # noqa: E501
class TestV1beta1VerifyOrganizationDomainResponse(unittest.TestCase):
"""V1beta1VerifyOrganizationDomainResponse unit test stubs"""
@@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> V1beta1VerifyOrganizationDomainResp
optional params are included """
# uncomment below to create an instance of `V1beta1VerifyOrganizationDomainResponse`
"""
- model = V1beta1VerifyOrganizationDomainResponse()
+ model = V1beta1VerifyOrganizationDomainResponse() # noqa: E501
if include_optional:
return V1beta1VerifyOrganizationDomainResponse(
state = ''