diff --git a/docs/AbstractType.md b/docs/AbstractType.md index 7e1af69..dcb4570 100644 --- a/docs/AbstractType.md +++ b/docs/AbstractType.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of AbstractType from a JSON string abstract_type_instance = AbstractType.from_json(json) # print the JSON string representation of the object -print(AbstractType.to_json()) +print AbstractType.to_json() # convert the object into a dict abstract_type_dict = abstract_type_instance.to_dict() # create an instance of AbstractType from a dict -abstract_type_from_dict = AbstractType.from_dict(abstract_type_dict) +abstract_type_form_dict = abstract_type.from_dict(abstract_type_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Any.md b/docs/Any.md index 453798c..6c48b36 100644 --- a/docs/Any.md +++ b/docs/Any.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of Any from a JSON string any_instance = Any.from_json(json) # print the JSON string representation of the object -print(Any.to_json()) +print Any.to_json() # convert the object into a dict any_dict = any_instance.to_dict() # create an instance of Any from a dict -any_from_dict = Any.from_dict(any_dict) +any_form_dict = any.from_dict(any_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/Argument.md b/docs/Argument.md index bf924a9..167c912 100644 --- a/docs/Argument.md +++ b/docs/Argument.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of Argument from a JSON string argument_instance = Argument.from_json(json) # print the JSON string representation of the object -print(Argument.to_json()) +print Argument.to_json() # convert the object into a dict argument_dict = argument_instance.to_dict() # create an instance of Argument from a dict -argument_from_dict = Argument.from_dict(argument_dict) +argument_form_dict = argument.from_dict(argument_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/Attribute.md b/docs/Attribute.md index a52f77f..ef49be7 100644 --- a/docs/Attribute.md +++ b/docs/Attribute.md @@ -20,12 +20,12 @@ json = "{}" # create an instance of Attribute from a JSON string attribute_instance = Attribute.from_json(json) # print the JSON string representation of the object -print(Attribute.to_json()) +print Attribute.to_json() # convert the object into a dict attribute_dict = attribute_instance.to_dict() # create an instance of Attribute from a dict -attribute_from_dict = Attribute.from_dict(attribute_dict) +attribute_form_dict = attribute.from_dict(attribute_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/AttributeDefinition.md b/docs/AttributeDefinition.md index c6591e8..616675e 100644 --- a/docs/AttributeDefinition.md +++ b/docs/AttributeDefinition.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of AttributeDefinition from a JSON string attribute_definition_instance = AttributeDefinition.from_json(json) # print the JSON string representation of the object -print(AttributeDefinition.to_json()) +print AttributeDefinition.to_json() # convert the object into a dict attribute_definition_dict = attribute_definition_instance.to_dict() # create an instance of AttributeDefinition from a dict -attribute_definition_from_dict = AttributeDefinition.from_dict(attribute_definition_dict) +attribute_definition_form_dict = attribute_definition.from_dict(attribute_definition_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AttributeFilter.md b/docs/AttributeFilter.md index 5ec16bd..1bdf063 100644 --- a/docs/AttributeFilter.md +++ b/docs/AttributeFilter.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of AttributeFilter from a JSON string attribute_filter_instance = AttributeFilter.from_json(json) # print the JSON string representation of the object -print(AttributeFilter.to_json()) +print AttributeFilter.to_json() # convert the object into a dict attribute_filter_dict = attribute_filter_instance.to_dict() # create an instance of AttributeFilter from a dict -attribute_filter_from_dict = AttributeFilter.from_dict(attribute_filter_dict) +attribute_filter_form_dict = attribute_filter.from_dict(attribute_filter_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/AttributeReadRequestMetadata.md b/docs/AttributeReadRequestMetadata.md index 0684864..7a4d776 100644 --- a/docs/AttributeReadRequestMetadata.md +++ b/docs/AttributeReadRequestMetadata.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of AttributeReadRequestMetadata from a JSON string attribute_read_request_metadata_instance = AttributeReadRequestMetadata.from_json(json) # print the JSON string representation of the object -print(AttributeReadRequestMetadata.to_json()) +print AttributeReadRequestMetadata.to_json() # convert the object into a dict attribute_read_request_metadata_dict = attribute_read_request_metadata_instance.to_dict() # create an instance of AttributeReadRequestMetadata from a dict -attribute_read_request_metadata_from_dict = AttributeReadRequestMetadata.from_dict(attribute_read_request_metadata_dict) +attribute_read_request_metadata_form_dict = attribute_read_request_metadata.from_dict(attribute_read_request_metadata_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/AttributeReadResponse.md b/docs/AttributeReadResponse.md index 22066d9..5df9e99 100644 --- a/docs/AttributeReadResponse.md +++ b/docs/AttributeReadResponse.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of AttributeReadResponse from a JSON string attribute_read_response_instance = AttributeReadResponse.from_json(json) # print the JSON string representation of the object -print(AttributeReadResponse.to_json()) +print AttributeReadResponse.to_json() # convert the object into a dict attribute_read_response_dict = attribute_read_response_instance.to_dict() # create an instance of AttributeReadResponse from a dict -attribute_read_response_from_dict = AttributeReadResponse.from_dict(attribute_read_response_dict) +attribute_read_response_form_dict = attribute_read_response.from_dict(attribute_read_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/AttributeType.md b/docs/AttributeType.md index 73daf90..72ad213 100644 --- a/docs/AttributeType.md +++ b/docs/AttributeType.md @@ -2,23 +2,10 @@ Enumerates the types of attribute. - ATTRIBUTE_TYPE_BOOLEAN: A boolean attribute type. - ATTRIBUTE_TYPE_BOOLEAN_ARRAY: A boolean array attribute type. - ATTRIBUTE_TYPE_STRING: A string attribute type. - ATTRIBUTE_TYPE_STRING_ARRAY: A string array attribute type. - ATTRIBUTE_TYPE_INTEGER: An integer attribute type. - ATTRIBUTE_TYPE_INTEGER_ARRAY: An integer array attribute type. - ATTRIBUTE_TYPE_DOUBLE: A double attribute type. - ATTRIBUTE_TYPE_DOUBLE_ARRAY: A double array attribute type. -## Enum +## Properties -* `ATTRIBUTE_TYPE_BOOLEAN` (value: `'ATTRIBUTE_TYPE_BOOLEAN'`) - -* `ATTRIBUTE_TYPE_BOOLEAN_ARRAY` (value: `'ATTRIBUTE_TYPE_BOOLEAN_ARRAY'`) - -* `ATTRIBUTE_TYPE_STRING` (value: `'ATTRIBUTE_TYPE_STRING'`) - -* `ATTRIBUTE_TYPE_STRING_ARRAY` (value: `'ATTRIBUTE_TYPE_STRING_ARRAY'`) - -* `ATTRIBUTE_TYPE_INTEGER` (value: `'ATTRIBUTE_TYPE_INTEGER'`) - -* `ATTRIBUTE_TYPE_INTEGER_ARRAY` (value: `'ATTRIBUTE_TYPE_INTEGER_ARRAY'`) - -* `ATTRIBUTE_TYPE_DOUBLE` (value: `'ATTRIBUTE_TYPE_DOUBLE'`) - -* `ATTRIBUTE_TYPE_DOUBLE_ARRAY` (value: `'ATTRIBUTE_TYPE_DOUBLE_ARRAY'`) +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- [[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/BundleApi.md b/docs/BundleApi.md index 861001d..408902f 100644 --- a/docs/BundleApi.md +++ b/docs/BundleApi.md @@ -18,6 +18,8 @@ delete bundle ```python +import time +import os import permify from permify.models.bundle_delete_body import BundleDeleteBody from permify.models.bundle_delete_response import BundleDeleteResponse @@ -88,6 +90,8 @@ read bundle ```python +import time +import os import permify from permify.models.bundle_read_body import BundleReadBody from permify.models.bundle_read_response import BundleReadResponse @@ -158,6 +162,8 @@ write bundle ```python +import time +import os import permify from permify.models.bundle_write_body import BundleWriteBody from permify.models.bundle_write_response import BundleWriteResponse diff --git a/docs/BundleDeleteBody.md b/docs/BundleDeleteBody.md index a44b066..e9936eb 100644 --- a/docs/BundleDeleteBody.md +++ b/docs/BundleDeleteBody.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of BundleDeleteBody from a JSON string bundle_delete_body_instance = BundleDeleteBody.from_json(json) # print the JSON string representation of the object -print(BundleDeleteBody.to_json()) +print BundleDeleteBody.to_json() # convert the object into a dict bundle_delete_body_dict = bundle_delete_body_instance.to_dict() # create an instance of BundleDeleteBody from a dict -bundle_delete_body_from_dict = BundleDeleteBody.from_dict(bundle_delete_body_dict) +bundle_delete_body_form_dict = bundle_delete_body.from_dict(bundle_delete_body_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/BundleDeleteResponse.md b/docs/BundleDeleteResponse.md index 48910e4..07b0571 100644 --- a/docs/BundleDeleteResponse.md +++ b/docs/BundleDeleteResponse.md @@ -17,12 +17,12 @@ json = "{}" # create an instance of BundleDeleteResponse from a JSON string bundle_delete_response_instance = BundleDeleteResponse.from_json(json) # print the JSON string representation of the object -print(BundleDeleteResponse.to_json()) +print BundleDeleteResponse.to_json() # convert the object into a dict bundle_delete_response_dict = bundle_delete_response_instance.to_dict() # create an instance of BundleDeleteResponse from a dict -bundle_delete_response_from_dict = BundleDeleteResponse.from_dict(bundle_delete_response_dict) +bundle_delete_response_form_dict = bundle_delete_response.from_dict(bundle_delete_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/BundleReadBody.md b/docs/BundleReadBody.md index 8d50143..66b544e 100644 --- a/docs/BundleReadBody.md +++ b/docs/BundleReadBody.md @@ -17,12 +17,12 @@ json = "{}" # create an instance of BundleReadBody from a JSON string bundle_read_body_instance = BundleReadBody.from_json(json) # print the JSON string representation of the object -print(BundleReadBody.to_json()) +print BundleReadBody.to_json() # convert the object into a dict bundle_read_body_dict = bundle_read_body_instance.to_dict() # create an instance of BundleReadBody from a dict -bundle_read_body_from_dict = BundleReadBody.from_dict(bundle_read_body_dict) +bundle_read_body_form_dict = bundle_read_body.from_dict(bundle_read_body_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/BundleReadResponse.md b/docs/BundleReadResponse.md index 92c799e..682d48a 100644 --- a/docs/BundleReadResponse.md +++ b/docs/BundleReadResponse.md @@ -17,12 +17,12 @@ json = "{}" # create an instance of BundleReadResponse from a JSON string bundle_read_response_instance = BundleReadResponse.from_json(json) # print the JSON string representation of the object -print(BundleReadResponse.to_json()) +print BundleReadResponse.to_json() # convert the object into a dict bundle_read_response_dict = bundle_read_response_instance.to_dict() # create an instance of BundleReadResponse from a dict -bundle_read_response_from_dict = BundleReadResponse.from_dict(bundle_read_response_dict) +bundle_read_response_form_dict = bundle_read_response.from_dict(bundle_read_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/BundleRunResponse.md b/docs/BundleRunResponse.md index 087a865..0d77ce2 100644 --- a/docs/BundleRunResponse.md +++ b/docs/BundleRunResponse.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of BundleRunResponse from a JSON string bundle_run_response_instance = BundleRunResponse.from_json(json) # print the JSON string representation of the object -print(BundleRunResponse.to_json()) +print BundleRunResponse.to_json() # convert the object into a dict bundle_run_response_dict = bundle_run_response_instance.to_dict() # create an instance of BundleRunResponse from a dict -bundle_run_response_from_dict = BundleRunResponse.from_dict(bundle_run_response_dict) +bundle_run_response_form_dict = bundle_run_response.from_dict(bundle_run_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/BundleWriteBody.md b/docs/BundleWriteBody.md index dbca928..e2c3570 100644 --- a/docs/BundleWriteBody.md +++ b/docs/BundleWriteBody.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of BundleWriteBody from a JSON string bundle_write_body_instance = BundleWriteBody.from_json(json) # print the JSON string representation of the object -print(BundleWriteBody.to_json()) +print BundleWriteBody.to_json() # convert the object into a dict bundle_write_body_dict = bundle_write_body_instance.to_dict() # create an instance of BundleWriteBody from a dict -bundle_write_body_from_dict = BundleWriteBody.from_dict(bundle_write_body_dict) +bundle_write_body_form_dict = bundle_write_body.from_dict(bundle_write_body_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/BundleWriteResponse.md b/docs/BundleWriteResponse.md index 991c1fc..05fc5a5 100644 --- a/docs/BundleWriteResponse.md +++ b/docs/BundleWriteResponse.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of BundleWriteResponse from a JSON string bundle_write_response_instance = BundleWriteResponse.from_json(json) # print the JSON string representation of the object -print(BundleWriteResponse.to_json()) +print BundleWriteResponse.to_json() # convert the object into a dict bundle_write_response_dict = bundle_write_response_instance.to_dict() # create an instance of BundleWriteResponse from a dict -bundle_write_response_from_dict = BundleWriteResponse.from_dict(bundle_write_response_dict) +bundle_write_response_form_dict = bundle_write_response.from_dict(bundle_write_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/CheckBody.md b/docs/CheckBody.md index f2006ab..7e73b57 100644 --- a/docs/CheckBody.md +++ b/docs/CheckBody.md @@ -23,12 +23,12 @@ json = "{}" # create an instance of CheckBody from a JSON string check_body_instance = CheckBody.from_json(json) # print the JSON string representation of the object -print(CheckBody.to_json()) +print CheckBody.to_json() # convert the object into a dict check_body_dict = check_body_instance.to_dict() # create an instance of CheckBody from a dict -check_body_from_dict = CheckBody.from_dict(check_body_dict) +check_body_form_dict = check_body.from_dict(check_body_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/CheckResult.md b/docs/CheckResult.md index 70a72f4..240db72 100644 --- a/docs/CheckResult.md +++ b/docs/CheckResult.md @@ -2,11 +2,10 @@ Enumerates results of a check operation. - CHECK_RESULT_ALLOWED: Represents a successful check (the check allowed the operation). - CHECK_RESULT_DENIED: Represents a failed check (the check denied the operation). -## Enum +## Properties -* `CHECK_RESULT_ALLOWED` (value: `'CHECK_RESULT_ALLOWED'`) - -* `CHECK_RESULT_DENIED` (value: `'CHECK_RESULT_DENIED'`) +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- [[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/CheckedExpr.md b/docs/CheckedExpr.md index a8bf2bd..7f6b04d 100644 --- a/docs/CheckedExpr.md +++ b/docs/CheckedExpr.md @@ -22,12 +22,12 @@ json = "{}" # create an instance of CheckedExpr from a JSON string checked_expr_instance = CheckedExpr.from_json(json) # print the JSON string representation of the object -print(CheckedExpr.to_json()) +print CheckedExpr.to_json() # convert the object into a dict checked_expr_dict = checked_expr_instance.to_dict() # create an instance of CheckedExpr from a dict -checked_expr_from_dict = CheckedExpr.from_dict(checked_expr_dict) +checked_expr_form_dict = checked_expr.from_dict(checked_expr_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/Child.md b/docs/Child.md index 9f7df17..68b6e04 100644 --- a/docs/Child.md +++ b/docs/Child.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of Child from a JSON string child_instance = Child.from_json(json) # print the JSON string representation of the object -print(Child.to_json()) +print Child.to_json() # convert the object into a dict child_dict = child_instance.to_dict() # create an instance of Child from a dict -child_from_dict = Child.from_dict(child_dict) +child_form_dict = child.from_dict(child_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/Comprehension.md b/docs/Comprehension.md index 6fe7113..839063f 100644 --- a/docs/Comprehension.md +++ b/docs/Comprehension.md @@ -24,12 +24,12 @@ json = "{}" # create an instance of Comprehension from a JSON string comprehension_instance = Comprehension.from_json(json) # print the JSON string representation of the object -print(Comprehension.to_json()) +print Comprehension.to_json() # convert the object into a dict comprehension_dict = comprehension_instance.to_dict() # create an instance of Comprehension from a dict -comprehension_from_dict = Comprehension.from_dict(comprehension_dict) +comprehension_form_dict = comprehension.from_dict(comprehension_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/ComputedAttribute.md b/docs/ComputedAttribute.md index 1f8c4dd..71c4cc8 100644 --- a/docs/ComputedAttribute.md +++ b/docs/ComputedAttribute.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of ComputedAttribute from a JSON string computed_attribute_instance = ComputedAttribute.from_json(json) # print the JSON string representation of the object -print(ComputedAttribute.to_json()) +print ComputedAttribute.to_json() # convert the object into a dict computed_attribute_dict = computed_attribute_instance.to_dict() # create an instance of ComputedAttribute from a dict -computed_attribute_from_dict = ComputedAttribute.from_dict(computed_attribute_dict) +computed_attribute_form_dict = computed_attribute.from_dict(computed_attribute_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/ComputedUserSet.md b/docs/ComputedUserSet.md index 073baea..4c46239 100644 --- a/docs/ComputedUserSet.md +++ b/docs/ComputedUserSet.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of ComputedUserSet from a JSON string computed_user_set_instance = ComputedUserSet.from_json(json) # print the JSON string representation of the object -print(ComputedUserSet.to_json()) +print ComputedUserSet.to_json() # convert the object into a dict computed_user_set_dict = computed_user_set_instance.to_dict() # create an instance of ComputedUserSet from a dict -computed_user_set_from_dict = ComputedUserSet.from_dict(computed_user_set_dict) +computed_user_set_form_dict = computed_user_set.from_dict(computed_user_set_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/Constant.md b/docs/Constant.md index e371ea4..b877bae 100644 --- a/docs/Constant.md +++ b/docs/Constant.md @@ -26,12 +26,12 @@ json = "{}" # create an instance of Constant from a JSON string constant_instance = Constant.from_json(json) # print the JSON string representation of the object -print(Constant.to_json()) +print Constant.to_json() # convert the object into a dict constant_dict = constant_instance.to_dict() # create an instance of Constant from a dict -constant_from_dict = Constant.from_dict(constant_dict) +constant_form_dict = constant.from_dict(constant_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/Context.md b/docs/Context.md index c2edb1a..2141022 100644 --- a/docs/Context.md +++ b/docs/Context.md @@ -20,12 +20,12 @@ json = "{}" # create an instance of Context from a JSON string context_instance = Context.from_json(json) # print the JSON string representation of the object -print(Context.to_json()) +print Context.to_json() # convert the object into a dict context_dict = context_instance.to_dict() # create an instance of Context from a dict -context_from_dict = Context.from_dict(context_dict) +context_form_dict = context.from_dict(context_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/ContextAttribute.md b/docs/ContextAttribute.md deleted file mode 100644 index 4ebea84..0000000 --- a/docs/ContextAttribute.md +++ /dev/null @@ -1,30 +0,0 @@ -# ContextAttribute - -ContextAttribute defines a context attribute which includes its name. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | [optional] - -## Example - -```python -from permify.models.context_attribute import ContextAttribute - -# TODO update the JSON string below -json = "{}" -# create an instance of ContextAttribute from a JSON string -context_attribute_instance = ContextAttribute.from_json(json) -# print the JSON string representation of the object -print(ContextAttribute.to_json()) - -# convert the object into a dict -context_attribute_dict = context_attribute_instance.to_dict() -# create an instance of ContextAttribute from a dict -context_attribute_from_dict = ContextAttribute.from_dict(context_attribute_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/CreateList.md b/docs/CreateList.md index fe3dc9a..cec12b3 100644 --- a/docs/CreateList.md +++ b/docs/CreateList.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of CreateList from a JSON string create_list_instance = CreateList.from_json(json) # print the JSON string representation of the object -print(CreateList.to_json()) +print CreateList.to_json() # convert the object into a dict create_list_dict = create_list_instance.to_dict() # create an instance of CreateList from a dict -create_list_from_dict = CreateList.from_dict(create_list_dict) +create_list_form_dict = create_list.from_dict(create_list_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/CreateStruct.md b/docs/CreateStruct.md index 63f37e1..4e9ecfe 100644 --- a/docs/CreateStruct.md +++ b/docs/CreateStruct.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of CreateStruct from a JSON string create_struct_instance = CreateStruct.from_json(json) # print the JSON string representation of the object -print(CreateStruct.to_json()) +print CreateStruct.to_json() # convert the object into a dict create_struct_dict = create_struct_instance.to_dict() # create an instance of CreateStruct from a dict -create_struct_from_dict = CreateStruct.from_dict(create_struct_dict) +create_struct_form_dict = create_struct.from_dict(create_struct_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/DataApi.md b/docs/DataApi.md index 43ff592..88be10c 100644 --- a/docs/DataApi.md +++ b/docs/DataApi.md @@ -22,6 +22,8 @@ run bundle ```python +import time +import os import permify from permify.models.bundle_run_response import BundleRunResponse from permify.models.run_bundle_body import RunBundleBody @@ -92,6 +94,8 @@ read attributes ```python +import time +import os import permify from permify.models.attribute_read_response import AttributeReadResponse from permify.models.read_attributes_body import ReadAttributesBody @@ -162,6 +166,8 @@ delete data ```python +import time +import os import permify from permify.models.data_delete_body import DataDeleteBody from permify.models.data_delete_response import DataDeleteResponse @@ -232,6 +238,8 @@ read relationships ```python +import time +import os import permify from permify.models.read_relationships_body import ReadRelationshipsBody from permify.models.relationship_read_response import RelationshipReadResponse @@ -302,6 +310,8 @@ write data ```python +import time +import os import permify from permify.models.data_write_body import DataWriteBody from permify.models.data_write_response import DataWriteResponse @@ -372,6 +382,8 @@ delete relationships ```python +import time +import os import permify from permify.models.delete_relationships_body import DeleteRelationshipsBody from permify.models.relationship_delete_response import RelationshipDeleteResponse @@ -442,6 +454,8 @@ write relationships ```python +import time +import os import permify from permify.models.relationship_write_response import RelationshipWriteResponse from permify.models.write_relationships_body import WriteRelationshipsBody diff --git a/docs/DataBundle.md b/docs/DataBundle.md index 9de3b2f..5280301 100644 --- a/docs/DataBundle.md +++ b/docs/DataBundle.md @@ -20,12 +20,12 @@ json = "{}" # create an instance of DataBundle from a JSON string data_bundle_instance = DataBundle.from_json(json) # print the JSON string representation of the object -print(DataBundle.to_json()) +print DataBundle.to_json() # convert the object into a dict data_bundle_dict = data_bundle_instance.to_dict() # create an instance of DataBundle from a dict -data_bundle_from_dict = DataBundle.from_dict(data_bundle_dict) +data_bundle_form_dict = data_bundle.from_dict(data_bundle_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/DataChange.md b/docs/DataChange.md index ae9a140..68202d1 100644 --- a/docs/DataChange.md +++ b/docs/DataChange.md @@ -20,12 +20,12 @@ json = "{}" # create an instance of DataChange from a JSON string data_change_instance = DataChange.from_json(json) # print the JSON string representation of the object -print(DataChange.to_json()) +print DataChange.to_json() # convert the object into a dict data_change_dict = data_change_instance.to_dict() # create an instance of DataChange from a dict -data_change_from_dict = DataChange.from_dict(data_change_dict) +data_change_form_dict = data_change.from_dict(data_change_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/DataChangeOperation.md b/docs/DataChangeOperation.md index 7ddda04..16ada55 100644 --- a/docs/DataChangeOperation.md +++ b/docs/DataChangeOperation.md @@ -2,11 +2,10 @@ - OPERATION_CREATE: Creation operation. - OPERATION_DELETE: Deletion operation. -## Enum +## Properties -* `OPERATION_CREATE` (value: `'OPERATION_CREATE'`) - -* `OPERATION_DELETE` (value: `'OPERATION_DELETE'`) +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- [[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/DataChanges.md b/docs/DataChanges.md index 6a16ae4..2550846 100644 --- a/docs/DataChanges.md +++ b/docs/DataChanges.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of DataChanges from a JSON string data_changes_instance = DataChanges.from_json(json) # print the JSON string representation of the object -print(DataChanges.to_json()) +print DataChanges.to_json() # convert the object into a dict data_changes_dict = data_changes_instance.to_dict() # create an instance of DataChanges from a dict -data_changes_from_dict = DataChanges.from_dict(data_changes_dict) +data_changes_form_dict = data_changes.from_dict(data_changes_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/DataDeleteBody.md b/docs/DataDeleteBody.md index a84b5ac..c0b8834 100644 --- a/docs/DataDeleteBody.md +++ b/docs/DataDeleteBody.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of DataDeleteBody from a JSON string data_delete_body_instance = DataDeleteBody.from_json(json) # print the JSON string representation of the object -print(DataDeleteBody.to_json()) +print DataDeleteBody.to_json() # convert the object into a dict data_delete_body_dict = data_delete_body_instance.to_dict() # create an instance of DataDeleteBody from a dict -data_delete_body_from_dict = DataDeleteBody.from_dict(data_delete_body_dict) +data_delete_body_form_dict = data_delete_body.from_dict(data_delete_body_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/DataDeleteResponse.md b/docs/DataDeleteResponse.md index 16b8bf3..b668973 100644 --- a/docs/DataDeleteResponse.md +++ b/docs/DataDeleteResponse.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of DataDeleteResponse from a JSON string data_delete_response_instance = DataDeleteResponse.from_json(json) # print the JSON string representation of the object -print(DataDeleteResponse.to_json()) +print DataDeleteResponse.to_json() # convert the object into a dict data_delete_response_dict = data_delete_response_instance.to_dict() # create an instance of DataDeleteResponse from a dict -data_delete_response_from_dict = DataDeleteResponse.from_dict(data_delete_response_dict) +data_delete_response_form_dict = data_delete_response.from_dict(data_delete_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/DataWriteBody.md b/docs/DataWriteBody.md index 6be6bd7..c342567 100644 --- a/docs/DataWriteBody.md +++ b/docs/DataWriteBody.md @@ -20,12 +20,12 @@ json = "{}" # create an instance of DataWriteBody from a JSON string data_write_body_instance = DataWriteBody.from_json(json) # print the JSON string representation of the object -print(DataWriteBody.to_json()) +print DataWriteBody.to_json() # convert the object into a dict data_write_body_dict = data_write_body_instance.to_dict() # create an instance of DataWriteBody from a dict -data_write_body_from_dict = DataWriteBody.from_dict(data_write_body_dict) +data_write_body_form_dict = data_write_body.from_dict(data_write_body_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/DataWriteRequestMetadata.md b/docs/DataWriteRequestMetadata.md index cac8c11..f2426dd 100644 --- a/docs/DataWriteRequestMetadata.md +++ b/docs/DataWriteRequestMetadata.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of DataWriteRequestMetadata from a JSON string data_write_request_metadata_instance = DataWriteRequestMetadata.from_json(json) # print the JSON string representation of the object -print(DataWriteRequestMetadata.to_json()) +print DataWriteRequestMetadata.to_json() # convert the object into a dict data_write_request_metadata_dict = data_write_request_metadata_instance.to_dict() # create an instance of DataWriteRequestMetadata from a dict -data_write_request_metadata_from_dict = DataWriteRequestMetadata.from_dict(data_write_request_metadata_dict) +data_write_request_metadata_form_dict = data_write_request_metadata.from_dict(data_write_request_metadata_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/DataWriteResponse.md b/docs/DataWriteResponse.md index 1792ee0..db0f4b4 100644 --- a/docs/DataWriteResponse.md +++ b/docs/DataWriteResponse.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of DataWriteResponse from a JSON string data_write_response_instance = DataWriteResponse.from_json(json) # print the JSON string representation of the object -print(DataWriteResponse.to_json()) +print DataWriteResponse.to_json() # convert the object into a dict data_write_response_dict = data_write_response_instance.to_dict() # create an instance of DataWriteResponse from a dict -data_write_response_from_dict = DataWriteResponse.from_dict(data_write_response_dict) +data_write_response_form_dict = data_write_response.from_dict(data_write_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/DeleteRelationshipsBody.md b/docs/DeleteRelationshipsBody.md index 74504d5..e007470 100644 --- a/docs/DeleteRelationshipsBody.md +++ b/docs/DeleteRelationshipsBody.md @@ -17,12 +17,12 @@ json = "{}" # create an instance of DeleteRelationshipsBody from a JSON string delete_relationships_body_instance = DeleteRelationshipsBody.from_json(json) # print the JSON string representation of the object -print(DeleteRelationshipsBody.to_json()) +print DeleteRelationshipsBody.to_json() # convert the object into a dict delete_relationships_body_dict = delete_relationships_body_instance.to_dict() # create an instance of DeleteRelationshipsBody from a dict -delete_relationships_body_from_dict = DeleteRelationshipsBody.from_dict(delete_relationships_body_dict) +delete_relationships_body_form_dict = delete_relationships_body.from_dict(delete_relationships_body_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/Entity.md b/docs/Entity.md index 721581b..7b0bfbb 100644 --- a/docs/Entity.md +++ b/docs/Entity.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of Entity from a JSON string entity_instance = Entity.from_json(json) # print the JSON string representation of the object -print(Entity.to_json()) +print Entity.to_json() # convert the object into a dict entity_dict = entity_instance.to_dict() # create an instance of Entity from a dict -entity_from_dict = Entity.from_dict(entity_dict) +entity_form_dict = entity.from_dict(entity_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/EntityDefinition.md b/docs/EntityDefinition.md index 111b3d3..b789b3f 100644 --- a/docs/EntityDefinition.md +++ b/docs/EntityDefinition.md @@ -22,12 +22,12 @@ json = "{}" # create an instance of EntityDefinition from a JSON string entity_definition_instance = EntityDefinition.from_json(json) # print the JSON string representation of the object -print(EntityDefinition.to_json()) +print EntityDefinition.to_json() # convert the object into a dict entity_definition_dict = entity_definition_instance.to_dict() # create an instance of EntityDefinition from a dict -entity_definition_from_dict = EntityDefinition.from_dict(entity_definition_dict) +entity_definition_form_dict = entity_definition.from_dict(entity_definition_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EntityDefinitionReference.md b/docs/EntityDefinitionReference.md index 12a35ec..1751c56 100644 --- a/docs/EntityDefinitionReference.md +++ b/docs/EntityDefinitionReference.md @@ -2,13 +2,10 @@ The Reference enum specifies whether a name pertains to a relation, permission, or attribute. - REFERENCE_RELATION: Indicates that the name refers to a relation. - REFERENCE_PERMISSION: Indicates that the name refers to a permission. - REFERENCE_ATTRIBUTE: Indicates that the name refers to an attribute. -## Enum +## Properties -* `REFERENCE_RELATION` (value: `'REFERENCE_RELATION'`) - -* `REFERENCE_PERMISSION` (value: `'REFERENCE_PERMISSION'`) - -* `REFERENCE_ATTRIBUTE` (value: `'REFERENCE_ATTRIBUTE'`) +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- [[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/EntityFilter.md b/docs/EntityFilter.md index f6dc886..d5d07e4 100644 --- a/docs/EntityFilter.md +++ b/docs/EntityFilter.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of EntityFilter from a JSON string entity_filter_instance = EntityFilter.from_json(json) # print the JSON string representation of the object -print(EntityFilter.to_json()) +print EntityFilter.to_json() # convert the object into a dict entity_filter_dict = entity_filter_instance.to_dict() # create an instance of EntityFilter from a dict -entity_filter_from_dict = EntityFilter.from_dict(entity_filter_dict) +entity_filter_form_dict = entity_filter.from_dict(entity_filter_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/Entry.md b/docs/Entry.md index 6542d5c..755185a 100644 --- a/docs/Entry.md +++ b/docs/Entry.md @@ -22,12 +22,12 @@ json = "{}" # create an instance of Entry from a JSON string entry_instance = Entry.from_json(json) # print the JSON string representation of the object -print(Entry.to_json()) +print Entry.to_json() # convert the object into a dict entry_dict = entry_instance.to_dict() # create an instance of Entry from a dict -entry_from_dict = Entry.from_dict(entry_dict) +entry_form_dict = entry.from_dict(entry_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/ExpandLeaf.md b/docs/ExpandLeaf.md index c341034..18f13ac 100644 --- a/docs/ExpandLeaf.md +++ b/docs/ExpandLeaf.md @@ -20,12 +20,12 @@ json = "{}" # create an instance of ExpandLeaf from a JSON string expand_leaf_instance = ExpandLeaf.from_json(json) # print the JSON string representation of the object -print(ExpandLeaf.to_json()) +print ExpandLeaf.to_json() # convert the object into a dict expand_leaf_dict = expand_leaf_instance.to_dict() # create an instance of ExpandLeaf from a dict -expand_leaf_from_dict = ExpandLeaf.from_dict(expand_leaf_dict) +expand_leaf_form_dict = expand_leaf.from_dict(expand_leaf_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/ExpandTreeNode.md b/docs/ExpandTreeNode.md index 3fa8f90..1704af0 100644 --- a/docs/ExpandTreeNode.md +++ b/docs/ExpandTreeNode.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of ExpandTreeNode from a JSON string expand_tree_node_instance = ExpandTreeNode.from_json(json) # print the JSON string representation of the object -print(ExpandTreeNode.to_json()) +print ExpandTreeNode.to_json() # convert the object into a dict expand_tree_node_dict = expand_tree_node_instance.to_dict() # create an instance of ExpandTreeNode from a dict -expand_tree_node_from_dict = ExpandTreeNode.from_dict(expand_tree_node_dict) +expand_tree_node_form_dict = expand_tree_node.from_dict(expand_tree_node_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/ExpandTreeNodeOperation.md b/docs/ExpandTreeNodeOperation.md index 3513fb3..96f4d7c 100644 --- a/docs/ExpandTreeNodeOperation.md +++ b/docs/ExpandTreeNodeOperation.md @@ -2,13 +2,10 @@ Operation is an enum representing the type of operation to be applied on the tree node. -## Enum +## Properties -* `OPERATION_UNION` (value: `'OPERATION_UNION'`) - -* `OPERATION_INTERSECTION` (value: `'OPERATION_INTERSECTION'`) - -* `OPERATION_EXCLUSION` (value: `'OPERATION_EXCLUSION'`) +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- [[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/Expr.md b/docs/Expr.md index 37a97ed..a7118f3 100644 --- a/docs/Expr.md +++ b/docs/Expr.md @@ -25,12 +25,12 @@ json = "{}" # create an instance of Expr from a JSON string expr_instance = Expr.from_json(json) # print the JSON string representation of the object -print(Expr.to_json()) +print Expr.to_json() # convert the object into a dict expr_dict = expr_instance.to_dict() # create an instance of Expr from a dict -expr_from_dict = Expr.from_dict(expr_dict) +expr_form_dict = expr.from_dict(expr_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/ExprCall.md b/docs/ExprCall.md index fcef88b..c437a7a 100644 --- a/docs/ExprCall.md +++ b/docs/ExprCall.md @@ -20,12 +20,12 @@ json = "{}" # create an instance of ExprCall from a JSON string expr_call_instance = ExprCall.from_json(json) # print the JSON string representation of the object -print(ExprCall.to_json()) +print ExprCall.to_json() # convert the object into a dict expr_call_dict = expr_call_instance.to_dict() # create an instance of ExprCall from a dict -expr_call_from_dict = ExprCall.from_dict(expr_call_dict) +expr_call_form_dict = expr_call.from_dict(expr_call_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/FunctionType.md b/docs/FunctionType.md index 509010d..4269e22 100644 --- a/docs/FunctionType.md +++ b/docs/FunctionType.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of FunctionType from a JSON string function_type_instance = FunctionType.from_json(json) # print the JSON string representation of the object -print(FunctionType.to_json()) +print FunctionType.to_json() # convert the object into a dict function_type_dict = function_type_instance.to_dict() # create an instance of FunctionType from a dict -function_type_from_dict = FunctionType.from_dict(function_type_dict) +function_type_form_dict = function_type.from_dict(function_type_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/HealthApi.md b/docs/HealthApi.md deleted file mode 100644 index e8e403b..0000000 --- a/docs/HealthApi.md +++ /dev/null @@ -1,72 +0,0 @@ -# permify.HealthApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**health_check**](HealthApi.md#health_check) | **GET** /healthz | health api - - -# **health_check** -> HealthResponse health_check() - -health api - -### Example - - -```python -import permify -from permify.models.health_response import HealthResponse -from permify.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = permify.Configuration( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with permify.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = permify.HealthApi(api_client) - - try: - # health api - api_response = api_instance.health_check() - print("The response of HealthApi->health_check:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling HealthApi->health_check: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**HealthResponse**](HealthResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | A successful response. | - | -**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/HealthResponse.md b/docs/HealthResponse.md deleted file mode 100644 index 0e3b194..0000000 --- a/docs/HealthResponse.md +++ /dev/null @@ -1,29 +0,0 @@ -# HealthResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **str** | | [optional] - -## Example - -```python -from permify.models.health_response import HealthResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of HealthResponse from a JSON string -health_response_instance = HealthResponse.from_json(json) -# print the JSON string representation of the object -print(HealthResponse.to_json()) - -# convert the object into a dict -health_response_dict = health_response_instance.to_dict() -# create an instance of HealthResponse from a dict -health_response_from_dict = HealthResponse.from_dict(health_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/Ident.md b/docs/Ident.md index 79d033a..f7a2ff4 100644 --- a/docs/Ident.md +++ b/docs/Ident.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of Ident from a JSON string ident_instance = Ident.from_json(json) # print the JSON string representation of the object -print(Ident.to_json()) +print Ident.to_json() # convert the object into a dict ident_dict = ident_instance.to_dict() # create an instance of Ident from a dict -ident_from_dict = Ident.from_dict(ident_dict) +ident_form_dict = ident.from_dict(ident_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/Leaf.md b/docs/Leaf.md index df7eddd..25e84e1 100644 --- a/docs/Leaf.md +++ b/docs/Leaf.md @@ -21,12 +21,12 @@ json = "{}" # create an instance of Leaf from a JSON string leaf_instance = Leaf.from_json(json) # print the JSON string representation of the object -print(Leaf.to_json()) +print Leaf.to_json() # convert the object into a dict leaf_dict = leaf_instance.to_dict() # create an instance of Leaf from a dict -leaf_from_dict = Leaf.from_dict(leaf_dict) +leaf_form_dict = leaf.from_dict(leaf_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/ListType.md b/docs/ListType.md index 5d94971..52435a0 100644 --- a/docs/ListType.md +++ b/docs/ListType.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of ListType from a JSON string list_type_instance = ListType.from_json(json) # print the JSON string representation of the object -print(ListType.to_json()) +print ListType.to_json() # convert the object into a dict list_type_dict = list_type_instance.to_dict() # create an instance of ListType from a dict -list_type_from_dict = ListType.from_dict(list_type_dict) +list_type_form_dict = list_type.from_dict(list_type_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LookupEntityBody.md b/docs/LookupEntityBody.md index 786d06b..3f1efda 100644 --- a/docs/LookupEntityBody.md +++ b/docs/LookupEntityBody.md @@ -25,12 +25,12 @@ json = "{}" # create an instance of LookupEntityBody from a JSON string lookup_entity_body_instance = LookupEntityBody.from_json(json) # print the JSON string representation of the object -print(LookupEntityBody.to_json()) +print LookupEntityBody.to_json() # convert the object into a dict lookup_entity_body_dict = lookup_entity_body_instance.to_dict() # create an instance of LookupEntityBody from a dict -lookup_entity_body_from_dict = LookupEntityBody.from_dict(lookup_entity_body_dict) +lookup_entity_body_form_dict = lookup_entity_body.from_dict(lookup_entity_body_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/LookupEntityStreamBody.md b/docs/LookupEntityStreamBody.md index 41a0ecc..267d3bd 100644 --- a/docs/LookupEntityStreamBody.md +++ b/docs/LookupEntityStreamBody.md @@ -25,12 +25,12 @@ json = "{}" # create an instance of LookupEntityStreamBody from a JSON string lookup_entity_stream_body_instance = LookupEntityStreamBody.from_json(json) # print the JSON string representation of the object -print(LookupEntityStreamBody.to_json()) +print LookupEntityStreamBody.to_json() # convert the object into a dict lookup_entity_stream_body_dict = lookup_entity_stream_body_instance.to_dict() # create an instance of LookupEntityStreamBody from a dict -lookup_entity_stream_body_from_dict = LookupEntityStreamBody.from_dict(lookup_entity_stream_body_dict) +lookup_entity_stream_body_form_dict = lookup_entity_stream_body.from_dict(lookup_entity_stream_body_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/LookupSubjectBody.md b/docs/LookupSubjectBody.md index 87b9506..70685e1 100644 --- a/docs/LookupSubjectBody.md +++ b/docs/LookupSubjectBody.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **permission** | **str** | Permission to be checked, can be a permission or relation. Required, and must match the pattern \"^([a-zA-Z][a-zA-Z0-9_]{1,62}[a-zA-Z0-9])$\", max 64 bytes. | [optional] **subject_reference** | [**RelationReference**](RelationReference.md) | | [optional] **context** | [**Context**](Context.md) | | [optional] +**arguments** | [**List[Argument]**](Argument.md) | Additional arguments associated with this request. | [optional] **page_size** | **int** | page_size is the number of subjects to be returned in the response. The value should be between 1 and 100. | [optional] **continuous_token** | **str** | continuous_token is an optional parameter used for pagination. It should be the value received in the previous response. | [optional] @@ -24,12 +25,12 @@ json = "{}" # create an instance of LookupSubjectBody from a JSON string lookup_subject_body_instance = LookupSubjectBody.from_json(json) # print the JSON string representation of the object -print(LookupSubjectBody.to_json()) +print LookupSubjectBody.to_json() # convert the object into a dict lookup_subject_body_dict = lookup_subject_body_instance.to_dict() # create an instance of LookupSubjectBody from a dict -lookup_subject_body_from_dict = LookupSubjectBody.from_dict(lookup_subject_body_dict) +lookup_subject_body_form_dict = lookup_subject_body.from_dict(lookup_subject_body_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/MapType.md b/docs/MapType.md index 14445ab..8964cb9 100644 --- a/docs/MapType.md +++ b/docs/MapType.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of MapType from a JSON string map_type_instance = MapType.from_json(json) # print the JSON string representation of the object -print(MapType.to_json()) +print MapType.to_json() # convert the object into a dict map_type_dict = map_type_instance.to_dict() # create an instance of MapType from a dict -map_type_from_dict = MapType.from_dict(map_type_dict) +map_type_form_dict = map_type.from_dict(map_type_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PartialWriteBody.md b/docs/PartialWriteBody.md index 5babf37..67fc4a3 100644 --- a/docs/PartialWriteBody.md +++ b/docs/PartialWriteBody.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of PartialWriteBody from a JSON string partial_write_body_instance = PartialWriteBody.from_json(json) # print the JSON string representation of the object -print(PartialWriteBody.to_json()) +print PartialWriteBody.to_json() # convert the object into a dict partial_write_body_dict = partial_write_body_instance.to_dict() # create an instance of PartialWriteBody from a dict -partial_write_body_from_dict = PartialWriteBody.from_dict(partial_write_body_dict) +partial_write_body_form_dict = partial_write_body.from_dict(partial_write_body_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/Partials.md b/docs/Partials.md index 952913c..2f7a569 100644 --- a/docs/Partials.md +++ b/docs/Partials.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of Partials from a JSON string partials_instance = Partials.from_json(json) # print the JSON string representation of the object -print(Partials.to_json()) +print Partials.to_json() # convert the object into a dict partials_dict = partials_instance.to_dict() # create an instance of Partials from a dict -partials_from_dict = Partials.from_dict(partials_dict) +partials_form_dict = partials.from_dict(partials_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/PermissionApi.md b/docs/PermissionApi.md index 3cbe3df..938f5e6 100644 --- a/docs/PermissionApi.md +++ b/docs/PermissionApi.md @@ -21,6 +21,8 @@ check api ```python +import time +import os import permify from permify.models.check_body import CheckBody from permify.models.permission_check_response import PermissionCheckResponse @@ -91,6 +93,8 @@ expand api ```python +import time +import os import permify from permify.models.permission_expand_body import PermissionExpandBody from permify.models.permission_expand_response import PermissionExpandResponse @@ -161,6 +165,8 @@ lookup entity ```python +import time +import os import permify from permify.models.lookup_entity_body import LookupEntityBody from permify.models.permission_lookup_entity_response import PermissionLookupEntityResponse @@ -231,6 +237,8 @@ lookup entity stream ```python +import time +import os import permify from permify.models.lookup_entity_stream_body import LookupEntityStreamBody from permify.models.stream_result_of_permission_lookup_entity_stream_response import StreamResultOfPermissionLookupEntityStreamResponse @@ -301,6 +309,8 @@ lookup-subject ```python +import time +import os import permify from permify.models.lookup_subject_body import LookupSubjectBody from permify.models.permission_lookup_subject_response import PermissionLookupSubjectResponse @@ -371,6 +381,8 @@ subject permission ```python +import time +import os import permify from permify.models.permission_subject_permission_response import PermissionSubjectPermissionResponse from permify.models.subject_permission_body import SubjectPermissionBody diff --git a/docs/PermissionCheckBody.md b/docs/PermissionCheckBody.md deleted file mode 100644 index a20bb48..0000000 --- a/docs/PermissionCheckBody.md +++ /dev/null @@ -1,35 +0,0 @@ -# PermissionCheckBody - -PermissionCheckRequest is the request message for the Check method in the Permission service. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**metadata** | [**PermissionCheckRequestMetadata**](PermissionCheckRequestMetadata.md) | | [optional] -**entity** | [**Entity**](Entity.md) | | [optional] -**permission** | **str** | The action the user wants to perform on the resource | [optional] -**subject** | [**Subject**](Subject.md) | | [optional] -**context** | [**Context**](Context.md) | | [optional] -**arguments** | [**List[Argument]**](Argument.md) | Additional arguments associated with this request. | [optional] - -## Example - -```python -from permify.models.permission_check_body import PermissionCheckBody - -# TODO update the JSON string below -json = "{}" -# create an instance of PermissionCheckBody from a JSON string -permission_check_body_instance = PermissionCheckBody.from_json(json) -# print the JSON string representation of the object -print(PermissionCheckBody.to_json()) - -# convert the object into a dict -permission_check_body_dict = permission_check_body_instance.to_dict() -# create an instance of PermissionCheckBody from a dict -permission_check_body_from_dict = PermissionCheckBody.from_dict(permission_check_body_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/PermissionCheckRequestMetadata.md b/docs/PermissionCheckRequestMetadata.md index b0b9484..cc5a499 100644 --- a/docs/PermissionCheckRequestMetadata.md +++ b/docs/PermissionCheckRequestMetadata.md @@ -20,12 +20,12 @@ json = "{}" # create an instance of PermissionCheckRequestMetadata from a JSON string permission_check_request_metadata_instance = PermissionCheckRequestMetadata.from_json(json) # print the JSON string representation of the object -print(PermissionCheckRequestMetadata.to_json()) +print PermissionCheckRequestMetadata.to_json() # convert the object into a dict permission_check_request_metadata_dict = permission_check_request_metadata_instance.to_dict() # create an instance of PermissionCheckRequestMetadata from a dict -permission_check_request_metadata_from_dict = PermissionCheckRequestMetadata.from_dict(permission_check_request_metadata_dict) +permission_check_request_metadata_form_dict = permission_check_request_metadata.from_dict(permission_check_request_metadata_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/PermissionCheckResponse.md b/docs/PermissionCheckResponse.md index 1d5a353..55d719d 100644 --- a/docs/PermissionCheckResponse.md +++ b/docs/PermissionCheckResponse.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of PermissionCheckResponse from a JSON string permission_check_response_instance = PermissionCheckResponse.from_json(json) # print the JSON string representation of the object -print(PermissionCheckResponse.to_json()) +print PermissionCheckResponse.to_json() # convert the object into a dict permission_check_response_dict = permission_check_response_instance.to_dict() # create an instance of PermissionCheckResponse from a dict -permission_check_response_from_dict = PermissionCheckResponse.from_dict(permission_check_response_dict) +permission_check_response_form_dict = permission_check_response.from_dict(permission_check_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/PermissionCheckResponseMetadata.md b/docs/PermissionCheckResponseMetadata.md index e59ac70..ba651ba 100644 --- a/docs/PermissionCheckResponseMetadata.md +++ b/docs/PermissionCheckResponseMetadata.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of PermissionCheckResponseMetadata from a JSON string permission_check_response_metadata_instance = PermissionCheckResponseMetadata.from_json(json) # print the JSON string representation of the object -print(PermissionCheckResponseMetadata.to_json()) +print PermissionCheckResponseMetadata.to_json() # convert the object into a dict permission_check_response_metadata_dict = permission_check_response_metadata_instance.to_dict() # create an instance of PermissionCheckResponseMetadata from a dict -permission_check_response_metadata_from_dict = PermissionCheckResponseMetadata.from_dict(permission_check_response_metadata_dict) +permission_check_response_metadata_form_dict = permission_check_response_metadata.from_dict(permission_check_response_metadata_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/PermissionDefinition.md b/docs/PermissionDefinition.md index 5905a25..f0cf417 100644 --- a/docs/PermissionDefinition.md +++ b/docs/PermissionDefinition.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of PermissionDefinition from a JSON string permission_definition_instance = PermissionDefinition.from_json(json) # print the JSON string representation of the object -print(PermissionDefinition.to_json()) +print PermissionDefinition.to_json() # convert the object into a dict permission_definition_dict = permission_definition_instance.to_dict() # create an instance of PermissionDefinition from a dict -permission_definition_from_dict = PermissionDefinition.from_dict(permission_definition_dict) +permission_definition_form_dict = permission_definition.from_dict(permission_definition_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PermissionExpandBody.md b/docs/PermissionExpandBody.md index a01c380..32e8529 100644 --- a/docs/PermissionExpandBody.md +++ b/docs/PermissionExpandBody.md @@ -22,12 +22,12 @@ json = "{}" # create an instance of PermissionExpandBody from a JSON string permission_expand_body_instance = PermissionExpandBody.from_json(json) # print the JSON string representation of the object -print(PermissionExpandBody.to_json()) +print PermissionExpandBody.to_json() # convert the object into a dict permission_expand_body_dict = permission_expand_body_instance.to_dict() # create an instance of PermissionExpandBody from a dict -permission_expand_body_from_dict = PermissionExpandBody.from_dict(permission_expand_body_dict) +permission_expand_body_form_dict = permission_expand_body.from_dict(permission_expand_body_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/PermissionExpandRequestMetadata.md b/docs/PermissionExpandRequestMetadata.md index 2b61dba..a32398d 100644 --- a/docs/PermissionExpandRequestMetadata.md +++ b/docs/PermissionExpandRequestMetadata.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of PermissionExpandRequestMetadata from a JSON string permission_expand_request_metadata_instance = PermissionExpandRequestMetadata.from_json(json) # print the JSON string representation of the object -print(PermissionExpandRequestMetadata.to_json()) +print PermissionExpandRequestMetadata.to_json() # convert the object into a dict permission_expand_request_metadata_dict = permission_expand_request_metadata_instance.to_dict() # create an instance of PermissionExpandRequestMetadata from a dict -permission_expand_request_metadata_from_dict = PermissionExpandRequestMetadata.from_dict(permission_expand_request_metadata_dict) +permission_expand_request_metadata_form_dict = permission_expand_request_metadata.from_dict(permission_expand_request_metadata_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/PermissionExpandResponse.md b/docs/PermissionExpandResponse.md index 567cedb..2938040 100644 --- a/docs/PermissionExpandResponse.md +++ b/docs/PermissionExpandResponse.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of PermissionExpandResponse from a JSON string permission_expand_response_instance = PermissionExpandResponse.from_json(json) # print the JSON string representation of the object -print(PermissionExpandResponse.to_json()) +print PermissionExpandResponse.to_json() # convert the object into a dict permission_expand_response_dict = permission_expand_response_instance.to_dict() # create an instance of PermissionExpandResponse from a dict -permission_expand_response_from_dict = PermissionExpandResponse.from_dict(permission_expand_response_dict) +permission_expand_response_form_dict = permission_expand_response.from_dict(permission_expand_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/PermissionLookupEntityRequestMetadata.md b/docs/PermissionLookupEntityRequestMetadata.md index e28dbd2..7599110 100644 --- a/docs/PermissionLookupEntityRequestMetadata.md +++ b/docs/PermissionLookupEntityRequestMetadata.md @@ -20,12 +20,12 @@ json = "{}" # create an instance of PermissionLookupEntityRequestMetadata from a JSON string permission_lookup_entity_request_metadata_instance = PermissionLookupEntityRequestMetadata.from_json(json) # print the JSON string representation of the object -print(PermissionLookupEntityRequestMetadata.to_json()) +print PermissionLookupEntityRequestMetadata.to_json() # convert the object into a dict permission_lookup_entity_request_metadata_dict = permission_lookup_entity_request_metadata_instance.to_dict() # create an instance of PermissionLookupEntityRequestMetadata from a dict -permission_lookup_entity_request_metadata_from_dict = PermissionLookupEntityRequestMetadata.from_dict(permission_lookup_entity_request_metadata_dict) +permission_lookup_entity_request_metadata_form_dict = permission_lookup_entity_request_metadata.from_dict(permission_lookup_entity_request_metadata_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/PermissionLookupEntityResponse.md b/docs/PermissionLookupEntityResponse.md index 0c460ff..6a0349e 100644 --- a/docs/PermissionLookupEntityResponse.md +++ b/docs/PermissionLookupEntityResponse.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of PermissionLookupEntityResponse from a JSON string permission_lookup_entity_response_instance = PermissionLookupEntityResponse.from_json(json) # print the JSON string representation of the object -print(PermissionLookupEntityResponse.to_json()) +print PermissionLookupEntityResponse.to_json() # convert the object into a dict permission_lookup_entity_response_dict = permission_lookup_entity_response_instance.to_dict() # create an instance of PermissionLookupEntityResponse from a dict -permission_lookup_entity_response_from_dict = PermissionLookupEntityResponse.from_dict(permission_lookup_entity_response_dict) +permission_lookup_entity_response_form_dict = permission_lookup_entity_response.from_dict(permission_lookup_entity_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/PermissionLookupEntityStreamResponse.md b/docs/PermissionLookupEntityStreamResponse.md index 26b9b6f..49adefd 100644 --- a/docs/PermissionLookupEntityStreamResponse.md +++ b/docs/PermissionLookupEntityStreamResponse.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of PermissionLookupEntityStreamResponse from a JSON string permission_lookup_entity_stream_response_instance = PermissionLookupEntityStreamResponse.from_json(json) # print the JSON string representation of the object -print(PermissionLookupEntityStreamResponse.to_json()) +print PermissionLookupEntityStreamResponse.to_json() # convert the object into a dict permission_lookup_entity_stream_response_dict = permission_lookup_entity_stream_response_instance.to_dict() # create an instance of PermissionLookupEntityStreamResponse from a dict -permission_lookup_entity_stream_response_from_dict = PermissionLookupEntityStreamResponse.from_dict(permission_lookup_entity_stream_response_dict) +permission_lookup_entity_stream_response_form_dict = permission_lookup_entity_stream_response.from_dict(permission_lookup_entity_stream_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/PermissionLookupSubjectRequestMetadata.md b/docs/PermissionLookupSubjectRequestMetadata.md index 6fd331d..a94a12d 100644 --- a/docs/PermissionLookupSubjectRequestMetadata.md +++ b/docs/PermissionLookupSubjectRequestMetadata.md @@ -20,12 +20,12 @@ json = "{}" # create an instance of PermissionLookupSubjectRequestMetadata from a JSON string permission_lookup_subject_request_metadata_instance = PermissionLookupSubjectRequestMetadata.from_json(json) # print the JSON string representation of the object -print(PermissionLookupSubjectRequestMetadata.to_json()) +print PermissionLookupSubjectRequestMetadata.to_json() # convert the object into a dict permission_lookup_subject_request_metadata_dict = permission_lookup_subject_request_metadata_instance.to_dict() # create an instance of PermissionLookupSubjectRequestMetadata from a dict -permission_lookup_subject_request_metadata_from_dict = PermissionLookupSubjectRequestMetadata.from_dict(permission_lookup_subject_request_metadata_dict) +permission_lookup_subject_request_metadata_form_dict = permission_lookup_subject_request_metadata.from_dict(permission_lookup_subject_request_metadata_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/PermissionLookupSubjectResponse.md b/docs/PermissionLookupSubjectResponse.md index c2cdf3b..f2a66e3 100644 --- a/docs/PermissionLookupSubjectResponse.md +++ b/docs/PermissionLookupSubjectResponse.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of PermissionLookupSubjectResponse from a JSON string permission_lookup_subject_response_instance = PermissionLookupSubjectResponse.from_json(json) # print the JSON string representation of the object -print(PermissionLookupSubjectResponse.to_json()) +print PermissionLookupSubjectResponse.to_json() # convert the object into a dict permission_lookup_subject_response_dict = permission_lookup_subject_response_instance.to_dict() # create an instance of PermissionLookupSubjectResponse from a dict -permission_lookup_subject_response_from_dict = PermissionLookupSubjectResponse.from_dict(permission_lookup_subject_response_dict) +permission_lookup_subject_response_form_dict = permission_lookup_subject_response.from_dict(permission_lookup_subject_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/PermissionSubjectPermissionRequestMetadata.md b/docs/PermissionSubjectPermissionRequestMetadata.md index cef45d3..b347fbc 100644 --- a/docs/PermissionSubjectPermissionRequestMetadata.md +++ b/docs/PermissionSubjectPermissionRequestMetadata.md @@ -21,12 +21,12 @@ json = "{}" # create an instance of PermissionSubjectPermissionRequestMetadata from a JSON string permission_subject_permission_request_metadata_instance = PermissionSubjectPermissionRequestMetadata.from_json(json) # print the JSON string representation of the object -print(PermissionSubjectPermissionRequestMetadata.to_json()) +print PermissionSubjectPermissionRequestMetadata.to_json() # convert the object into a dict permission_subject_permission_request_metadata_dict = permission_subject_permission_request_metadata_instance.to_dict() # create an instance of PermissionSubjectPermissionRequestMetadata from a dict -permission_subject_permission_request_metadata_from_dict = PermissionSubjectPermissionRequestMetadata.from_dict(permission_subject_permission_request_metadata_dict) +permission_subject_permission_request_metadata_form_dict = permission_subject_permission_request_metadata.from_dict(permission_subject_permission_request_metadata_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/PermissionSubjectPermissionResponse.md b/docs/PermissionSubjectPermissionResponse.md index cba1f98..14aafd9 100644 --- a/docs/PermissionSubjectPermissionResponse.md +++ b/docs/PermissionSubjectPermissionResponse.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of PermissionSubjectPermissionResponse from a JSON string permission_subject_permission_response_instance = PermissionSubjectPermissionResponse.from_json(json) # print the JSON string representation of the object -print(PermissionSubjectPermissionResponse.to_json()) +print PermissionSubjectPermissionResponse.to_json() # convert the object into a dict permission_subject_permission_response_dict = permission_subject_permission_response_instance.to_dict() # create an instance of PermissionSubjectPermissionResponse from a dict -permission_subject_permission_response_from_dict = PermissionSubjectPermissionResponse.from_dict(permission_subject_permission_response_dict) +permission_subject_permission_response_form_dict = permission_subject_permission_response.from_dict(permission_subject_permission_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/PrimitiveType.md b/docs/PrimitiveType.md index 44a784e..84b7193 100644 --- a/docs/PrimitiveType.md +++ b/docs/PrimitiveType.md @@ -2,19 +2,10 @@ CEL primitive types. - BOOL: Boolean type. - INT64: Int64 type. Proto-based integer values are widened to int64. - UINT64: Uint64 type. Proto-based unsigned integer values are widened to uint64. - DOUBLE: Double type. Proto-based float values are widened to double values. - STRING: String type. - BYTES: Bytes type. -## Enum +## Properties -* `BOOL` (value: `'BOOL'`) - -* `INT64` (value: `'INT64'`) - -* `UINT64` (value: `'UINT64'`) - -* `DOUBLE` (value: `'DOUBLE'`) - -* `STRING` (value: `'STRING'`) - -* `BYTES` (value: `'BYTES'`) +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- [[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/ReadAttributesBody.md b/docs/ReadAttributesBody.md index 85fff23..a3996b3 100644 --- a/docs/ReadAttributesBody.md +++ b/docs/ReadAttributesBody.md @@ -21,12 +21,12 @@ json = "{}" # create an instance of ReadAttributesBody from a JSON string read_attributes_body_instance = ReadAttributesBody.from_json(json) # print the JSON string representation of the object -print(ReadAttributesBody.to_json()) +print ReadAttributesBody.to_json() # convert the object into a dict read_attributes_body_dict = read_attributes_body_instance.to_dict() # create an instance of ReadAttributesBody from a dict -read_attributes_body_from_dict = ReadAttributesBody.from_dict(read_attributes_body_dict) +read_attributes_body_form_dict = read_attributes_body.from_dict(read_attributes_body_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/ReadRelationshipsBody.md b/docs/ReadRelationshipsBody.md index 7d94d3b..ae60ce3 100644 --- a/docs/ReadRelationshipsBody.md +++ b/docs/ReadRelationshipsBody.md @@ -21,12 +21,12 @@ json = "{}" # create an instance of ReadRelationshipsBody from a JSON string read_relationships_body_instance = ReadRelationshipsBody.from_json(json) # print the JSON string representation of the object -print(ReadRelationshipsBody.to_json()) +print ReadRelationshipsBody.to_json() # convert the object into a dict read_relationships_body_dict = read_relationships_body_instance.to_dict() # create an instance of ReadRelationshipsBody from a dict -read_relationships_body_from_dict = ReadRelationshipsBody.from_dict(read_relationships_body_dict) +read_relationships_body_form_dict = read_relationships_body.from_dict(read_relationships_body_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/RelationDefinition.md b/docs/RelationDefinition.md index bad764c..a895bd8 100644 --- a/docs/RelationDefinition.md +++ b/docs/RelationDefinition.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of RelationDefinition from a JSON string relation_definition_instance = RelationDefinition.from_json(json) # print the JSON string representation of the object -print(RelationDefinition.to_json()) +print RelationDefinition.to_json() # convert the object into a dict relation_definition_dict = relation_definition_instance.to_dict() # create an instance of RelationDefinition from a dict -relation_definition_from_dict = RelationDefinition.from_dict(relation_definition_dict) +relation_definition_form_dict = relation_definition.from_dict(relation_definition_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RelationReference.md b/docs/RelationReference.md index 062cf75..914d91a 100644 --- a/docs/RelationReference.md +++ b/docs/RelationReference.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of RelationReference from a JSON string relation_reference_instance = RelationReference.from_json(json) # print the JSON string representation of the object -print(RelationReference.to_json()) +print RelationReference.to_json() # convert the object into a dict relation_reference_dict = relation_reference_instance.to_dict() # create an instance of RelationReference from a dict -relation_reference_from_dict = RelationReference.from_dict(relation_reference_dict) +relation_reference_form_dict = relation_reference.from_dict(relation_reference_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/RelationshipDeleteResponse.md b/docs/RelationshipDeleteResponse.md index 4dde9e9..7862a30 100644 --- a/docs/RelationshipDeleteResponse.md +++ b/docs/RelationshipDeleteResponse.md @@ -17,12 +17,12 @@ json = "{}" # create an instance of RelationshipDeleteResponse from a JSON string relationship_delete_response_instance = RelationshipDeleteResponse.from_json(json) # print the JSON string representation of the object -print(RelationshipDeleteResponse.to_json()) +print RelationshipDeleteResponse.to_json() # convert the object into a dict relationship_delete_response_dict = relationship_delete_response_instance.to_dict() # create an instance of RelationshipDeleteResponse from a dict -relationship_delete_response_from_dict = RelationshipDeleteResponse.from_dict(relationship_delete_response_dict) +relationship_delete_response_form_dict = relationship_delete_response.from_dict(relationship_delete_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/RelationshipReadRequestMetadata.md b/docs/RelationshipReadRequestMetadata.md index 88fe4ce..5c476a1 100644 --- a/docs/RelationshipReadRequestMetadata.md +++ b/docs/RelationshipReadRequestMetadata.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of RelationshipReadRequestMetadata from a JSON string relationship_read_request_metadata_instance = RelationshipReadRequestMetadata.from_json(json) # print the JSON string representation of the object -print(RelationshipReadRequestMetadata.to_json()) +print RelationshipReadRequestMetadata.to_json() # convert the object into a dict relationship_read_request_metadata_dict = relationship_read_request_metadata_instance.to_dict() # create an instance of RelationshipReadRequestMetadata from a dict -relationship_read_request_metadata_from_dict = RelationshipReadRequestMetadata.from_dict(relationship_read_request_metadata_dict) +relationship_read_request_metadata_form_dict = relationship_read_request_metadata.from_dict(relationship_read_request_metadata_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/RelationshipReadResponse.md b/docs/RelationshipReadResponse.md index 2f39224..cb51504 100644 --- a/docs/RelationshipReadResponse.md +++ b/docs/RelationshipReadResponse.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of RelationshipReadResponse from a JSON string relationship_read_response_instance = RelationshipReadResponse.from_json(json) # print the JSON string representation of the object -print(RelationshipReadResponse.to_json()) +print RelationshipReadResponse.to_json() # convert the object into a dict relationship_read_response_dict = relationship_read_response_instance.to_dict() # create an instance of RelationshipReadResponse from a dict -relationship_read_response_from_dict = RelationshipReadResponse.from_dict(relationship_read_response_dict) +relationship_read_response_form_dict = relationship_read_response.from_dict(relationship_read_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/RelationshipWriteRequestMetadata.md b/docs/RelationshipWriteRequestMetadata.md index 3aca639..1638d13 100644 --- a/docs/RelationshipWriteRequestMetadata.md +++ b/docs/RelationshipWriteRequestMetadata.md @@ -17,12 +17,12 @@ json = "{}" # create an instance of RelationshipWriteRequestMetadata from a JSON string relationship_write_request_metadata_instance = RelationshipWriteRequestMetadata.from_json(json) # print the JSON string representation of the object -print(RelationshipWriteRequestMetadata.to_json()) +print RelationshipWriteRequestMetadata.to_json() # convert the object into a dict relationship_write_request_metadata_dict = relationship_write_request_metadata_instance.to_dict() # create an instance of RelationshipWriteRequestMetadata from a dict -relationship_write_request_metadata_from_dict = RelationshipWriteRequestMetadata.from_dict(relationship_write_request_metadata_dict) +relationship_write_request_metadata_form_dict = relationship_write_request_metadata.from_dict(relationship_write_request_metadata_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/RelationshipWriteResponse.md b/docs/RelationshipWriteResponse.md index de6e008..2a2969a 100644 --- a/docs/RelationshipWriteResponse.md +++ b/docs/RelationshipWriteResponse.md @@ -17,12 +17,12 @@ json = "{}" # create an instance of RelationshipWriteResponse from a JSON string relationship_write_response_instance = RelationshipWriteResponse.from_json(json) # print the JSON string representation of the object -print(RelationshipWriteResponse.to_json()) +print RelationshipWriteResponse.to_json() # convert the object into a dict relationship_write_response_dict = relationship_write_response_instance.to_dict() # create an instance of RelationshipWriteResponse from a dict -relationship_write_response_from_dict = RelationshipWriteResponse.from_dict(relationship_write_response_dict) +relationship_write_response_form_dict = relationship_write_response.from_dict(relationship_write_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/Rewrite.md b/docs/Rewrite.md index ffe0a0a..e95e91b 100644 --- a/docs/Rewrite.md +++ b/docs/Rewrite.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of Rewrite from a JSON string rewrite_instance = Rewrite.from_json(json) # print the JSON string representation of the object -print(Rewrite.to_json()) +print Rewrite.to_json() # convert the object into a dict rewrite_dict = rewrite_instance.to_dict() # create an instance of Rewrite from a dict -rewrite_from_dict = Rewrite.from_dict(rewrite_dict) +rewrite_form_dict = rewrite.from_dict(rewrite_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/RewriteOperation.md b/docs/RewriteOperation.md index 34d284b..90eac96 100644 --- a/docs/RewriteOperation.md +++ b/docs/RewriteOperation.md @@ -2,13 +2,10 @@ Operation enum includes potential rewrite operations. OPERATION_UNION: Represents a union operation. OPERATION_INTERSECTION: Represents an intersection operation. OPERATION_EXCLUSION: Represents an exclusion operation. - OPERATION_UNION: Represents a union operation. - OPERATION_INTERSECTION: Represents an intersection operation. - OPERATION_EXCLUSION: Represents an exclusion operation. -## Enum +## Properties -* `OPERATION_UNION` (value: `'OPERATION_UNION'`) - -* `OPERATION_INTERSECTION` (value: `'OPERATION_INTERSECTION'`) - -* `OPERATION_EXCLUSION` (value: `'OPERATION_EXCLUSION'`) +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- [[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/RuleDefinition.md b/docs/RuleDefinition.md index d16f458..6ded8f8 100644 --- a/docs/RuleDefinition.md +++ b/docs/RuleDefinition.md @@ -20,12 +20,12 @@ json = "{}" # create an instance of RuleDefinition from a JSON string rule_definition_instance = RuleDefinition.from_json(json) # print the JSON string representation of the object -print(RuleDefinition.to_json()) +print RuleDefinition.to_json() # convert the object into a dict rule_definition_dict = rule_definition_instance.to_dict() # create an instance of RuleDefinition from a dict -rule_definition_from_dict = RuleDefinition.from_dict(rule_definition_dict) +rule_definition_form_dict = rule_definition.from_dict(rule_definition_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RunBundleBody.md b/docs/RunBundleBody.md index a50d65a..b6c4370 100644 --- a/docs/RunBundleBody.md +++ b/docs/RunBundleBody.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of RunBundleBody from a JSON string run_bundle_body_instance = RunBundleBody.from_json(json) # print the JSON string representation of the object -print(RunBundleBody.to_json()) +print RunBundleBody.to_json() # convert the object into a dict run_bundle_body_dict = run_bundle_body_instance.to_dict() # create an instance of RunBundleBody from a dict -run_bundle_body_from_dict = RunBundleBody.from_dict(run_bundle_body_dict) +run_bundle_body_form_dict = run_bundle_body.from_dict(run_bundle_body_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/SchemaApi.md b/docs/SchemaApi.md index 85cb79e..c7eaeb7 100644 --- a/docs/SchemaApi.md +++ b/docs/SchemaApi.md @@ -19,6 +19,8 @@ list schema ```python +import time +import os import permify from permify.models.schema_list_body import SchemaListBody from permify.models.schema_list_response import SchemaListResponse @@ -89,6 +91,8 @@ partially update your authorization model ```python +import time +import os import permify from permify.models.partial_write_body import PartialWriteBody from permify.models.schema_partial_write_response import SchemaPartialWriteResponse @@ -159,6 +163,8 @@ read schema ```python +import time +import os import permify from permify.models.schema_read_body import SchemaReadBody from permify.models.schema_read_response import SchemaReadResponse @@ -229,6 +235,8 @@ write schema ```python +import time +import os import permify from permify.models.schema_write_body import SchemaWriteBody from permify.models.schema_write_response import SchemaWriteResponse diff --git a/docs/SchemaDefinition.md b/docs/SchemaDefinition.md index b9eaf70..b2242d5 100644 --- a/docs/SchemaDefinition.md +++ b/docs/SchemaDefinition.md @@ -20,12 +20,12 @@ json = "{}" # create an instance of SchemaDefinition from a JSON string schema_definition_instance = SchemaDefinition.from_json(json) # print the JSON string representation of the object -print(SchemaDefinition.to_json()) +print SchemaDefinition.to_json() # convert the object into a dict schema_definition_dict = schema_definition_instance.to_dict() # create an instance of SchemaDefinition from a dict -schema_definition_from_dict = SchemaDefinition.from_dict(schema_definition_dict) +schema_definition_form_dict = schema_definition.from_dict(schema_definition_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SchemaDefinitionReference.md b/docs/SchemaDefinitionReference.md index 3fb0c0a..4f6792f 100644 --- a/docs/SchemaDefinitionReference.md +++ b/docs/SchemaDefinitionReference.md @@ -2,11 +2,10 @@ The Reference enum helps distinguish whether a name corresponds to an entity or a rule. - REFERENCE_ENTITY: Indicates that the name refers to an entity. - REFERENCE_RULE: Indicates that the name refers to a rule. -## Enum +## Properties -* `REFERENCE_ENTITY` (value: `'REFERENCE_ENTITY'`) - -* `REFERENCE_RULE` (value: `'REFERENCE_RULE'`) +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- [[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/SchemaList.md b/docs/SchemaList.md index 4c56506..c8d3798 100644 --- a/docs/SchemaList.md +++ b/docs/SchemaList.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of SchemaList from a JSON string schema_list_instance = SchemaList.from_json(json) # print the JSON string representation of the object -print(SchemaList.to_json()) +print SchemaList.to_json() # convert the object into a dict schema_list_dict = schema_list_instance.to_dict() # create an instance of SchemaList from a dict -schema_list_from_dict = SchemaList.from_dict(schema_list_dict) +schema_list_form_dict = schema_list.from_dict(schema_list_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/SchemaListBody.md b/docs/SchemaListBody.md index fa7424c..0f45f86 100644 --- a/docs/SchemaListBody.md +++ b/docs/SchemaListBody.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of SchemaListBody from a JSON string schema_list_body_instance = SchemaListBody.from_json(json) # print the JSON string representation of the object -print(SchemaListBody.to_json()) +print SchemaListBody.to_json() # convert the object into a dict schema_list_body_dict = schema_list_body_instance.to_dict() # create an instance of SchemaListBody from a dict -schema_list_body_from_dict = SchemaListBody.from_dict(schema_list_body_dict) +schema_list_body_form_dict = schema_list_body.from_dict(schema_list_body_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/SchemaListResponse.md b/docs/SchemaListResponse.md index d998721..3048d47 100644 --- a/docs/SchemaListResponse.md +++ b/docs/SchemaListResponse.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of SchemaListResponse from a JSON string schema_list_response_instance = SchemaListResponse.from_json(json) # print the JSON string representation of the object -print(SchemaListResponse.to_json()) +print SchemaListResponse.to_json() # convert the object into a dict schema_list_response_dict = schema_list_response_instance.to_dict() # create an instance of SchemaListResponse from a dict -schema_list_response_from_dict = SchemaListResponse.from_dict(schema_list_response_dict) +schema_list_response_form_dict = schema_list_response.from_dict(schema_list_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/SchemaPartialWriteRequestMetadata.md b/docs/SchemaPartialWriteRequestMetadata.md index 1b577d3..c133bd9 100644 --- a/docs/SchemaPartialWriteRequestMetadata.md +++ b/docs/SchemaPartialWriteRequestMetadata.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of SchemaPartialWriteRequestMetadata from a JSON string schema_partial_write_request_metadata_instance = SchemaPartialWriteRequestMetadata.from_json(json) # print the JSON string representation of the object -print(SchemaPartialWriteRequestMetadata.to_json()) +print SchemaPartialWriteRequestMetadata.to_json() # convert the object into a dict schema_partial_write_request_metadata_dict = schema_partial_write_request_metadata_instance.to_dict() # create an instance of SchemaPartialWriteRequestMetadata from a dict -schema_partial_write_request_metadata_from_dict = SchemaPartialWriteRequestMetadata.from_dict(schema_partial_write_request_metadata_dict) +schema_partial_write_request_metadata_form_dict = schema_partial_write_request_metadata.from_dict(schema_partial_write_request_metadata_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/SchemaPartialWriteResponse.md b/docs/SchemaPartialWriteResponse.md index ee48141..ba1796c 100644 --- a/docs/SchemaPartialWriteResponse.md +++ b/docs/SchemaPartialWriteResponse.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of SchemaPartialWriteResponse from a JSON string schema_partial_write_response_instance = SchemaPartialWriteResponse.from_json(json) # print the JSON string representation of the object -print(SchemaPartialWriteResponse.to_json()) +print SchemaPartialWriteResponse.to_json() # convert the object into a dict schema_partial_write_response_dict = schema_partial_write_response_instance.to_dict() # create an instance of SchemaPartialWriteResponse from a dict -schema_partial_write_response_from_dict = SchemaPartialWriteResponse.from_dict(schema_partial_write_response_dict) +schema_partial_write_response_form_dict = schema_partial_write_response.from_dict(schema_partial_write_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/SchemaReadBody.md b/docs/SchemaReadBody.md index 33a7ebb..b05a9ca 100644 --- a/docs/SchemaReadBody.md +++ b/docs/SchemaReadBody.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of SchemaReadBody from a JSON string schema_read_body_instance = SchemaReadBody.from_json(json) # print the JSON string representation of the object -print(SchemaReadBody.to_json()) +print SchemaReadBody.to_json() # convert the object into a dict schema_read_body_dict = schema_read_body_instance.to_dict() # create an instance of SchemaReadBody from a dict -schema_read_body_from_dict = SchemaReadBody.from_dict(schema_read_body_dict) +schema_read_body_form_dict = schema_read_body.from_dict(schema_read_body_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/SchemaReadRequestMetadata.md b/docs/SchemaReadRequestMetadata.md index ecf124c..06a042d 100644 --- a/docs/SchemaReadRequestMetadata.md +++ b/docs/SchemaReadRequestMetadata.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of SchemaReadRequestMetadata from a JSON string schema_read_request_metadata_instance = SchemaReadRequestMetadata.from_json(json) # print the JSON string representation of the object -print(SchemaReadRequestMetadata.to_json()) +print SchemaReadRequestMetadata.to_json() # convert the object into a dict schema_read_request_metadata_dict = schema_read_request_metadata_instance.to_dict() # create an instance of SchemaReadRequestMetadata from a dict -schema_read_request_metadata_from_dict = SchemaReadRequestMetadata.from_dict(schema_read_request_metadata_dict) +schema_read_request_metadata_form_dict = schema_read_request_metadata.from_dict(schema_read_request_metadata_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/SchemaReadResponse.md b/docs/SchemaReadResponse.md index 320344b..045b16e 100644 --- a/docs/SchemaReadResponse.md +++ b/docs/SchemaReadResponse.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of SchemaReadResponse from a JSON string schema_read_response_instance = SchemaReadResponse.from_json(json) # print the JSON string representation of the object -print(SchemaReadResponse.to_json()) +print SchemaReadResponse.to_json() # convert the object into a dict schema_read_response_dict = schema_read_response_instance.to_dict() # create an instance of SchemaReadResponse from a dict -schema_read_response_from_dict = SchemaReadResponse.from_dict(schema_read_response_dict) +schema_read_response_form_dict = schema_read_response.from_dict(schema_read_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/SchemaWriteBody.md b/docs/SchemaWriteBody.md index 0400742..2b35895 100644 --- a/docs/SchemaWriteBody.md +++ b/docs/SchemaWriteBody.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of SchemaWriteBody from a JSON string schema_write_body_instance = SchemaWriteBody.from_json(json) # print the JSON string representation of the object -print(SchemaWriteBody.to_json()) +print SchemaWriteBody.to_json() # convert the object into a dict schema_write_body_dict = schema_write_body_instance.to_dict() # create an instance of SchemaWriteBody from a dict -schema_write_body_from_dict = SchemaWriteBody.from_dict(schema_write_body_dict) +schema_write_body_form_dict = schema_write_body.from_dict(schema_write_body_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/SchemaWriteResponse.md b/docs/SchemaWriteResponse.md index cf59180..84c34fa 100644 --- a/docs/SchemaWriteResponse.md +++ b/docs/SchemaWriteResponse.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of SchemaWriteResponse from a JSON string schema_write_response_instance = SchemaWriteResponse.from_json(json) # print the JSON string representation of the object -print(SchemaWriteResponse.to_json()) +print SchemaWriteResponse.to_json() # convert the object into a dict schema_write_response_dict = schema_write_response_instance.to_dict() # create an instance of SchemaWriteResponse from a dict -schema_write_response_from_dict = SchemaWriteResponse.from_dict(schema_write_response_dict) +schema_write_response_form_dict = schema_write_response.from_dict(schema_write_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/Select.md b/docs/Select.md index 6d8bf63..7d41735 100644 --- a/docs/Select.md +++ b/docs/Select.md @@ -7,7 +7,7 @@ A field selection expression. e.g. `request.auth`. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **operand** | [**Expr**](Expr.md) | | [optional] -**var_field** | **str** | Required. The name of the field to select. For example, in the select expression `request.auth`, the `auth` portion of the expression would be the `field`. | [optional] +**field** | **str** | Required. The name of the field to select. For example, in the select expression `request.auth`, the `auth` portion of the expression would be the `field`. | [optional] **test_only** | **bool** | Whether the select is to be interpreted as a field presence test. This results from the macro `has(request.auth)`. | [optional] ## Example @@ -20,12 +20,12 @@ json = "{}" # create an instance of Select from a JSON string select_instance = Select.from_json(json) # print the JSON string representation of the object -print(Select.to_json()) +print Select.to_json() # convert the object into a dict select_dict = select_instance.to_dict() # create an instance of Select from a dict -select_from_dict = Select.from_dict(select_dict) +select_form_dict = select.from_dict(select_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/SourceInfo.md b/docs/SourceInfo.md index 57593ed..e98a782 100644 --- a/docs/SourceInfo.md +++ b/docs/SourceInfo.md @@ -22,12 +22,12 @@ json = "{}" # create an instance of SourceInfo from a JSON string source_info_instance = SourceInfo.from_json(json) # print the JSON string representation of the object -print(SourceInfo.to_json()) +print SourceInfo.to_json() # convert the object into a dict source_info_dict = source_info_instance.to_dict() # create an instance of SourceInfo from a dict -source_info_from_dict = SourceInfo.from_dict(source_info_dict) +source_info_form_dict = source_info.from_dict(source_info_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/Status.md b/docs/Status.md index fc0f8cb..b8ecb67 100644 --- a/docs/Status.md +++ b/docs/Status.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of Status from a JSON string status_instance = Status.from_json(json) # print the JSON string representation of the object -print(Status.to_json()) +print Status.to_json() # convert the object into a dict status_dict = status_instance.to_dict() # create an instance of Status from a dict -status_from_dict = Status.from_dict(status_dict) +status_form_dict = status.from_dict(status_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/StreamResultOfPermissionLookupEntityStreamResponse.md b/docs/StreamResultOfPermissionLookupEntityStreamResponse.md index f833c1a..514c43e 100644 --- a/docs/StreamResultOfPermissionLookupEntityStreamResponse.md +++ b/docs/StreamResultOfPermissionLookupEntityStreamResponse.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of StreamResultOfPermissionLookupEntityStreamResponse from a JSON string stream_result_of_permission_lookup_entity_stream_response_instance = StreamResultOfPermissionLookupEntityStreamResponse.from_json(json) # print the JSON string representation of the object -print(StreamResultOfPermissionLookupEntityStreamResponse.to_json()) +print StreamResultOfPermissionLookupEntityStreamResponse.to_json() # convert the object into a dict stream_result_of_permission_lookup_entity_stream_response_dict = stream_result_of_permission_lookup_entity_stream_response_instance.to_dict() # create an instance of StreamResultOfPermissionLookupEntityStreamResponse from a dict -stream_result_of_permission_lookup_entity_stream_response_from_dict = StreamResultOfPermissionLookupEntityStreamResponse.from_dict(stream_result_of_permission_lookup_entity_stream_response_dict) +stream_result_of_permission_lookup_entity_stream_response_form_dict = stream_result_of_permission_lookup_entity_stream_response.from_dict(stream_result_of_permission_lookup_entity_stream_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/StreamResultOfWatchResponse.md b/docs/StreamResultOfWatchResponse.md index 2b47d95..7f94b32 100644 --- a/docs/StreamResultOfWatchResponse.md +++ b/docs/StreamResultOfWatchResponse.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of StreamResultOfWatchResponse from a JSON string stream_result_of_watch_response_instance = StreamResultOfWatchResponse.from_json(json) # print the JSON string representation of the object -print(StreamResultOfWatchResponse.to_json()) +print StreamResultOfWatchResponse.to_json() # convert the object into a dict stream_result_of_watch_response_dict = stream_result_of_watch_response_instance.to_dict() # create an instance of StreamResultOfWatchResponse from a dict -stream_result_of_watch_response_from_dict = StreamResultOfWatchResponse.from_dict(stream_result_of_watch_response_dict) +stream_result_of_watch_response_form_dict = stream_result_of_watch_response.from_dict(stream_result_of_watch_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/StringArrayValue.md b/docs/StringArrayValue.md index cb53f91..ac45606 100644 --- a/docs/StringArrayValue.md +++ b/docs/StringArrayValue.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of StringArrayValue from a JSON string string_array_value_instance = StringArrayValue.from_json(json) # print the JSON string representation of the object -print(StringArrayValue.to_json()) +print StringArrayValue.to_json() # convert the object into a dict string_array_value_dict = string_array_value_instance.to_dict() # create an instance of StringArrayValue from a dict -string_array_value_from_dict = StringArrayValue.from_dict(string_array_value_dict) +string_array_value_form_dict = string_array_value.from_dict(string_array_value_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/Subject.md b/docs/Subject.md index 307d46e..fd4ca15 100644 --- a/docs/Subject.md +++ b/docs/Subject.md @@ -20,12 +20,12 @@ json = "{}" # create an instance of Subject from a JSON string subject_instance = Subject.from_json(json) # print the JSON string representation of the object -print(Subject.to_json()) +print Subject.to_json() # convert the object into a dict subject_dict = subject_instance.to_dict() # create an instance of Subject from a dict -subject_from_dict = Subject.from_dict(subject_dict) +subject_form_dict = subject.from_dict(subject_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/SubjectFilter.md b/docs/SubjectFilter.md index 3bd034e..43bfdc8 100644 --- a/docs/SubjectFilter.md +++ b/docs/SubjectFilter.md @@ -20,12 +20,12 @@ json = "{}" # create an instance of SubjectFilter from a JSON string subject_filter_instance = SubjectFilter.from_json(json) # print the JSON string representation of the object -print(SubjectFilter.to_json()) +print SubjectFilter.to_json() # convert the object into a dict subject_filter_dict = subject_filter_instance.to_dict() # create an instance of SubjectFilter from a dict -subject_filter_from_dict = SubjectFilter.from_dict(subject_filter_dict) +subject_filter_form_dict = subject_filter.from_dict(subject_filter_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/SubjectPermissionBody.md b/docs/SubjectPermissionBody.md index 5645124..058fc8d 100644 --- a/docs/SubjectPermissionBody.md +++ b/docs/SubjectPermissionBody.md @@ -21,12 +21,12 @@ json = "{}" # create an instance of SubjectPermissionBody from a JSON string subject_permission_body_instance = SubjectPermissionBody.from_json(json) # print the JSON string representation of the object -print(SubjectPermissionBody.to_json()) +print SubjectPermissionBody.to_json() # convert the object into a dict subject_permission_body_dict = subject_permission_body_instance.to_dict() # create an instance of SubjectPermissionBody from a dict -subject_permission_body_from_dict = SubjectPermissionBody.from_dict(subject_permission_body_dict) +subject_permission_body_form_dict = subject_permission_body.from_dict(subject_permission_body_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/Subjects.md b/docs/Subjects.md index 141d91e..1f5eb4c 100644 --- a/docs/Subjects.md +++ b/docs/Subjects.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of Subjects from a JSON string subjects_instance = Subjects.from_json(json) # print the JSON string representation of the object -print(Subjects.to_json()) +print Subjects.to_json() # convert the object into a dict subjects_dict = subjects_instance.to_dict() # create an instance of Subjects from a dict -subjects_from_dict = Subjects.from_dict(subjects_dict) +subjects_form_dict = subjects.from_dict(subjects_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/TenancyApi.md b/docs/TenancyApi.md index 60e2a7f..99ed368 100644 --- a/docs/TenancyApi.md +++ b/docs/TenancyApi.md @@ -18,6 +18,8 @@ create tenant ```python +import time +import os import permify from permify.models.tenant_create_request import TenantCreateRequest from permify.models.tenant_create_response import TenantCreateResponse @@ -86,6 +88,8 @@ delete tenant ```python +import time +import os import permify from permify.models.tenant_delete_response import TenantDeleteResponse from permify.rest import ApiException @@ -153,6 +157,8 @@ list tenants ```python +import time +import os import permify from permify.models.tenant_list_request import TenantListRequest from permify.models.tenant_list_response import TenantListResponse diff --git a/docs/Tenant.md b/docs/Tenant.md index cceb18e..b85b00e 100644 --- a/docs/Tenant.md +++ b/docs/Tenant.md @@ -20,12 +20,12 @@ json = "{}" # create an instance of Tenant from a JSON string tenant_instance = Tenant.from_json(json) # print the JSON string representation of the object -print(Tenant.to_json()) +print Tenant.to_json() # convert the object into a dict tenant_dict = tenant_instance.to_dict() # create an instance of Tenant from a dict -tenant_from_dict = Tenant.from_dict(tenant_dict) +tenant_form_dict = tenant.from_dict(tenant_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/TenantCreateRequest.md b/docs/TenantCreateRequest.md index 36dc114..f4d3c73 100644 --- a/docs/TenantCreateRequest.md +++ b/docs/TenantCreateRequest.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of TenantCreateRequest from a JSON string tenant_create_request_instance = TenantCreateRequest.from_json(json) # print the JSON string representation of the object -print(TenantCreateRequest.to_json()) +print TenantCreateRequest.to_json() # convert the object into a dict tenant_create_request_dict = tenant_create_request_instance.to_dict() # create an instance of TenantCreateRequest from a dict -tenant_create_request_from_dict = TenantCreateRequest.from_dict(tenant_create_request_dict) +tenant_create_request_form_dict = tenant_create_request.from_dict(tenant_create_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/TenantCreateResponse.md b/docs/TenantCreateResponse.md index 46388e3..a73aefd 100644 --- a/docs/TenantCreateResponse.md +++ b/docs/TenantCreateResponse.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of TenantCreateResponse from a JSON string tenant_create_response_instance = TenantCreateResponse.from_json(json) # print the JSON string representation of the object -print(TenantCreateResponse.to_json()) +print TenantCreateResponse.to_json() # convert the object into a dict tenant_create_response_dict = tenant_create_response_instance.to_dict() # create an instance of TenantCreateResponse from a dict -tenant_create_response_from_dict = TenantCreateResponse.from_dict(tenant_create_response_dict) +tenant_create_response_form_dict = tenant_create_response.from_dict(tenant_create_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/TenantDeleteResponse.md b/docs/TenantDeleteResponse.md index b512460..4d10eda 100644 --- a/docs/TenantDeleteResponse.md +++ b/docs/TenantDeleteResponse.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of TenantDeleteResponse from a JSON string tenant_delete_response_instance = TenantDeleteResponse.from_json(json) # print the JSON string representation of the object -print(TenantDeleteResponse.to_json()) +print TenantDeleteResponse.to_json() # convert the object into a dict tenant_delete_response_dict = tenant_delete_response_instance.to_dict() # create an instance of TenantDeleteResponse from a dict -tenant_delete_response_from_dict = TenantDeleteResponse.from_dict(tenant_delete_response_dict) +tenant_delete_response_form_dict = tenant_delete_response.from_dict(tenant_delete_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/TenantListRequest.md b/docs/TenantListRequest.md index 3905d60..b08395c 100644 --- a/docs/TenantListRequest.md +++ b/docs/TenantListRequest.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of TenantListRequest from a JSON string tenant_list_request_instance = TenantListRequest.from_json(json) # print the JSON string representation of the object -print(TenantListRequest.to_json()) +print TenantListRequest.to_json() # convert the object into a dict tenant_list_request_dict = tenant_list_request_instance.to_dict() # create an instance of TenantListRequest from a dict -tenant_list_request_from_dict = TenantListRequest.from_dict(tenant_list_request_dict) +tenant_list_request_form_dict = tenant_list_request.from_dict(tenant_list_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/TenantListResponse.md b/docs/TenantListResponse.md index 197fa4d..64a99d2 100644 --- a/docs/TenantListResponse.md +++ b/docs/TenantListResponse.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of TenantListResponse from a JSON string tenant_list_response_instance = TenantListResponse.from_json(json) # print the JSON string representation of the object -print(TenantListResponse.to_json()) +print TenantListResponse.to_json() # convert the object into a dict tenant_list_response_dict = tenant_list_response_instance.to_dict() # create an instance of TenantListResponse from a dict -tenant_list_response_from_dict = TenantListResponse.from_dict(tenant_list_response_dict) +tenant_list_response_form_dict = tenant_list_response.from_dict(tenant_list_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/Tuple.md b/docs/Tuple.md index 7cf57d2..05e12b4 100644 --- a/docs/Tuple.md +++ b/docs/Tuple.md @@ -20,12 +20,12 @@ json = "{}" # create an instance of Tuple from a JSON string tuple_instance = Tuple.from_json(json) # print the JSON string representation of the object -print(Tuple.to_json()) +print Tuple.to_json() # convert the object into a dict tuple_dict = tuple_instance.to_dict() # create an instance of Tuple from a dict -tuple_from_dict = Tuple.from_dict(tuple_dict) +tuple_form_dict = tuple.from_dict(tuple_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/TupleFilter.md b/docs/TupleFilter.md index 26592a7..d1000b8 100644 --- a/docs/TupleFilter.md +++ b/docs/TupleFilter.md @@ -20,12 +20,12 @@ json = "{}" # create an instance of TupleFilter from a JSON string tuple_filter_instance = TupleFilter.from_json(json) # print the JSON string representation of the object -print(TupleFilter.to_json()) +print TupleFilter.to_json() # convert the object into a dict tuple_filter_dict = tuple_filter_instance.to_dict() # create an instance of TupleFilter from a dict -tuple_filter_from_dict = TupleFilter.from_dict(tuple_filter_dict) +tuple_filter_form_dict = tuple_filter.from_dict(tuple_filter_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/TupleSet.md b/docs/TupleSet.md index 32fead0..1885121 100644 --- a/docs/TupleSet.md +++ b/docs/TupleSet.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of TupleSet from a JSON string tuple_set_instance = TupleSet.from_json(json) # print the JSON string representation of the object -print(TupleSet.to_json()) +print TupleSet.to_json() # convert the object into a dict tuple_set_dict = tuple_set_instance.to_dict() # create an instance of TupleSet from a dict -tuple_set_from_dict = TupleSet.from_dict(tuple_set_dict) +tuple_set_form_dict = tuple_set.from_dict(tuple_set_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/TupleToUserSet.md b/docs/TupleToUserSet.md index 9b55f4f..c65e513 100644 --- a/docs/TupleToUserSet.md +++ b/docs/TupleToUserSet.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of TupleToUserSet from a JSON string tuple_to_user_set_instance = TupleToUserSet.from_json(json) # print the JSON string representation of the object -print(TupleToUserSet.to_json()) +print TupleToUserSet.to_json() # convert the object into a dict tuple_to_user_set_dict = tuple_to_user_set_instance.to_dict() # create an instance of TupleToUserSet from a dict -tuple_to_user_set_from_dict = TupleToUserSet.from_dict(tuple_to_user_set_dict) +tuple_to_user_set_form_dict = tuple_to_user_set.from_dict(tuple_to_user_set_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/V1Call.md b/docs/V1Call.md index 001252c..ebead3f 100644 --- a/docs/V1Call.md +++ b/docs/V1Call.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of V1Call from a JSON string v1_call_instance = V1Call.from_json(json) # print the JSON string representation of the object -print(V1Call.to_json()) +print V1Call.to_json() # convert the object into a dict v1_call_dict = v1_call_instance.to_dict() # create an instance of V1Call from a dict -v1_call_from_dict = V1Call.from_dict(v1_call_dict) +v1_call_form_dict = v1_call.from_dict(v1_call_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/V1Expand.md b/docs/V1Expand.md index 108497b..e4f3920 100644 --- a/docs/V1Expand.md +++ b/docs/V1Expand.md @@ -22,12 +22,12 @@ json = "{}" # create an instance of V1Expand from a JSON string v1_expand_instance = V1Expand.from_json(json) # print the JSON string representation of the object -print(V1Expand.to_json()) +print V1Expand.to_json() # convert the object into a dict v1_expand_dict = v1_expand_instance.to_dict() # create an instance of V1Expand from a dict -v1_expand_from_dict = V1Expand.from_dict(v1_expand_dict) +v1_expand_form_dict = v1_expand.from_dict(v1_expand_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/V1Operation.md b/docs/V1Operation.md index af01bc4..1459564 100644 --- a/docs/V1Operation.md +++ b/docs/V1Operation.md @@ -21,12 +21,12 @@ json = "{}" # create an instance of V1Operation from a JSON string v1_operation_instance = V1Operation.from_json(json) # print the JSON string representation of the object -print(V1Operation.to_json()) +print V1Operation.to_json() # convert the object into a dict v1_operation_dict = v1_operation_instance.to_dict() # create an instance of V1Operation from a dict -v1_operation_from_dict = V1Operation.from_dict(v1_operation_dict) +v1_operation_form_dict = v1_operation.from_dict(v1_operation_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/V1alpha1Reference.md b/docs/V1alpha1Reference.md index cca5115..9f5140a 100644 --- a/docs/V1alpha1Reference.md +++ b/docs/V1alpha1Reference.md @@ -20,12 +20,12 @@ json = "{}" # create an instance of V1alpha1Reference from a JSON string v1alpha1_reference_instance = V1alpha1Reference.from_json(json) # print the JSON string representation of the object -print(V1alpha1Reference.to_json()) +print V1alpha1Reference.to_json() # convert the object into a dict v1alpha1_reference_dict = v1alpha1_reference_instance.to_dict() # create an instance of V1alpha1Reference from a dict -v1alpha1_reference_from_dict = V1alpha1Reference.from_dict(v1alpha1_reference_dict) +v1alpha1_reference_form_dict = v1alpha1_reference.from_dict(v1alpha1_reference_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/V1alpha1Type.md b/docs/V1alpha1Type.md index 793e55f..693e9e9 100644 --- a/docs/V1alpha1Type.md +++ b/docs/V1alpha1Type.md @@ -30,12 +30,12 @@ json = "{}" # create an instance of V1alpha1Type from a JSON string v1alpha1_type_instance = V1alpha1Type.from_json(json) # print the JSON string representation of the object -print(V1alpha1Type.to_json()) +print V1alpha1Type.to_json() # convert the object into a dict v1alpha1_type_dict = v1alpha1_type_instance.to_dict() # create an instance of V1alpha1Type from a dict -v1alpha1_type_from_dict = V1alpha1Type.from_dict(v1alpha1_type_dict) +v1alpha1_type_form_dict = v1alpha1_type.from_dict(v1alpha1_type_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Values.md b/docs/Values.md index 150fd4a..4e7e998 100644 --- a/docs/Values.md +++ b/docs/Values.md @@ -17,12 +17,12 @@ json = "{}" # create an instance of Values from a JSON string values_instance = Values.from_json(json) # print the JSON string representation of the object -print(Values.to_json()) +print Values.to_json() # convert the object into a dict values_dict = values_instance.to_dict() # create an instance of Values from a dict -values_from_dict = Values.from_dict(values_dict) +values_form_dict = values.from_dict(values_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/WatchApi.md b/docs/WatchApi.md index d5e2cd0..773c891 100644 --- a/docs/WatchApi.md +++ b/docs/WatchApi.md @@ -16,6 +16,8 @@ watch changes ```python +import time +import os import permify from permify.models.stream_result_of_watch_response import StreamResultOfWatchResponse from permify.models.watch_body import WatchBody diff --git a/docs/WatchBody.md b/docs/WatchBody.md index 40ff4c5..266b6db 100644 --- a/docs/WatchBody.md +++ b/docs/WatchBody.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of WatchBody from a JSON string watch_body_instance = WatchBody.from_json(json) # print the JSON string representation of the object -print(WatchBody.to_json()) +print WatchBody.to_json() # convert the object into a dict watch_body_dict = watch_body_instance.to_dict() # create an instance of WatchBody from a dict -watch_body_from_dict = WatchBody.from_dict(watch_body_dict) +watch_body_form_dict = watch_body.from_dict(watch_body_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/WatchResponse.md b/docs/WatchResponse.md index 57a2ce9..af289ce 100644 --- a/docs/WatchResponse.md +++ b/docs/WatchResponse.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of WatchResponse from a JSON string watch_response_instance = WatchResponse.from_json(json) # print the JSON string representation of the object -print(WatchResponse.to_json()) +print WatchResponse.to_json() # convert the object into a dict watch_response_dict = watch_response_instance.to_dict() # create an instance of WatchResponse from a dict -watch_response_from_dict = WatchResponse.from_dict(watch_response_dict) +watch_response_form_dict = watch_response.from_dict(watch_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/WellKnownType.md b/docs/WellKnownType.md index fc6296c..f569e41 100644 --- a/docs/WellKnownType.md +++ b/docs/WellKnownType.md @@ -2,13 +2,10 @@ Well-known protobuf types treated with first-class support in CEL. - ANY: Well-known protobuf.Any type. Any types are a polymorphic message type. During type-checking they are treated like `DYN` types, but at runtime they are resolved to a specific message type specified at evaluation time. - TIMESTAMP: Well-known protobuf.Timestamp type, internally referenced as `timestamp`. - DURATION: Well-known protobuf.Duration type, internally referenced as `duration`. -## Enum +## Properties -* `ANY` (value: `'ANY'`) - -* `TIMESTAMP` (value: `'TIMESTAMP'`) - -* `DURATION` (value: `'DURATION'`) +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- [[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/WriteRelationshipsBody.md b/docs/WriteRelationshipsBody.md index 747f900..0f4f557 100644 --- a/docs/WriteRelationshipsBody.md +++ b/docs/WriteRelationshipsBody.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of WriteRelationshipsBody from a JSON string write_relationships_body_instance = WriteRelationshipsBody.from_json(json) # print the JSON string representation of the object -print(WriteRelationshipsBody.to_json()) +print WriteRelationshipsBody.to_json() # convert the object into a dict write_relationships_body_dict = write_relationships_body_instance.to_dict() # create an instance of WriteRelationshipsBody from a dict -write_relationships_body_from_dict = WriteRelationshipsBody.from_dict(write_relationships_body_dict) +write_relationships_body_form_dict = write_relationships_body.from_dict(write_relationships_body_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/generator/openapi.json b/generator/openapi.json index e0fde23..3a13ab2 100644 --- a/generator/openapi.json +++ b/generator/openapi.json @@ -3,7 +3,7 @@ "info": { "title": "Permify API", "description": "Permify is an open source authorization service for creating fine-grained and scalable authorization systems.", - "version": "v1.2.2", + "version": "v1.4.2", "contact": { "name": "API Support", "url": "https://github.com/Permify/permify/issues", @@ -3534,4 +3534,4 @@ "in": "header" } } -} +} \ No newline at end of file diff --git a/permify/__init__.py b/permify/__init__.py index 4c34853..6948614 100644 --- a/permify/__init__.py +++ b/permify/__init__.py @@ -7,7 +7,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v0.9.9 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -15,7 +15,7 @@ """ # noqa: E501 -__version__ = "1.0.0" +__version__ = "v1.4.2" # import apis into sdk package from permify.api.bundle_api import BundleApi @@ -62,7 +62,6 @@ from permify.models.computed_user_set import ComputedUserSet from permify.models.constant import Constant from permify.models.context import Context -from permify.models.context_attribute import ContextAttribute from permify.models.create_list import CreateList from permify.models.create_struct import CreateStruct from permify.models.data_bundle import DataBundle @@ -140,6 +139,7 @@ from permify.models.status import Status from permify.models.stream_result_of_permission_lookup_entity_stream_response import StreamResultOfPermissionLookupEntityStreamResponse from permify.models.stream_result_of_watch_response import StreamResultOfWatchResponse +from permify.models.string_array_value import StringArrayValue from permify.models.subject import Subject from permify.models.subject_filter import SubjectFilter from permify.models.subject_permission_body import SubjectPermissionBody diff --git a/permify/api/README.md b/permify/api/README.md deleted file mode 100644 index e69de29..0000000 diff --git a/permify/api/bundle_api.py b/permify/api/bundle_api.py index 214c3f1..b780b65 100644 --- a/permify/api/bundle_api.py +++ b/permify/api/bundle_api.py @@ -5,20 +5,29 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 + +import io import warnings + from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated +from typing import Dict, List, Optional, Tuple, Union, Any + +try: + from typing import Annotated +except ImportError: + from typing_extensions import Annotated -from pydantic import Field, StrictStr +from pydantic import Field from typing_extensions import Annotated +from pydantic import StrictStr + from permify.models.bundle_delete_body import BundleDeleteBody from permify.models.bundle_delete_response import BundleDeleteResponse from permify.models.bundle_read_body import BundleReadBody @@ -26,7 +35,7 @@ from permify.models.bundle_write_body import BundleWriteBody from permify.models.bundle_write_response import BundleWriteResponse -from permify.api_client import ApiClient, RequestSerialized +from permify.api_client import ApiClient from permify.api_response import ApiResponse from permify.rest import RESTResponseType @@ -258,7 +267,7 @@ def _bundle_delete_serialize( _content_type, _headers, _host_index, - ) -> RequestSerialized: + ) -> Tuple: _host = None @@ -269,9 +278,7 @@ def _bundle_delete_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, str] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -286,12 +293,11 @@ def _bundle_delete_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -543,7 +549,7 @@ def _bundle_read_serialize( _content_type, _headers, _host_index, - ) -> RequestSerialized: + ) -> Tuple: _host = None @@ -554,9 +560,7 @@ def _bundle_read_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, str] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -571,12 +575,11 @@ def _bundle_read_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -828,7 +831,7 @@ def _bundle_write_serialize( _content_type, _headers, _host_index, - ) -> RequestSerialized: + ) -> Tuple: _host = None @@ -839,9 +842,7 @@ def _bundle_write_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, str] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -856,12 +857,11 @@ def _bundle_write_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: diff --git a/permify/api/data_api.py b/permify/api/data_api.py index 5b56c77..fe2e47b 100644 --- a/permify/api/data_api.py +++ b/permify/api/data_api.py @@ -5,20 +5,29 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 + +import io import warnings + from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated +from typing import Dict, List, Optional, Tuple, Union, Any + +try: + from typing import Annotated +except ImportError: + from typing_extensions import Annotated -from pydantic import Field, StrictStr +from pydantic import Field from typing_extensions import Annotated +from pydantic import StrictStr + from permify.models.attribute_read_response import AttributeReadResponse from permify.models.bundle_run_response import BundleRunResponse from permify.models.data_delete_body import DataDeleteBody @@ -34,7 +43,7 @@ from permify.models.run_bundle_body import RunBundleBody from permify.models.write_relationships_body import WriteRelationshipsBody -from permify.api_client import ApiClient, RequestSerialized +from permify.api_client import ApiClient from permify.api_response import ApiResponse from permify.rest import RESTResponseType @@ -266,7 +275,7 @@ def _bundle_run_serialize( _content_type, _headers, _host_index, - ) -> RequestSerialized: + ) -> Tuple: _host = None @@ -277,9 +286,7 @@ def _bundle_run_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, str] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -294,12 +301,11 @@ def _bundle_run_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -551,7 +557,7 @@ def _data_attributes_read_serialize( _content_type, _headers, _host_index, - ) -> RequestSerialized: + ) -> Tuple: _host = None @@ -562,9 +568,7 @@ def _data_attributes_read_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, str] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -579,12 +583,11 @@ def _data_attributes_read_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -836,7 +839,7 @@ def _data_delete_serialize( _content_type, _headers, _host_index, - ) -> RequestSerialized: + ) -> Tuple: _host = None @@ -847,9 +850,7 @@ def _data_delete_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, str] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -864,12 +865,11 @@ def _data_delete_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -1121,7 +1121,7 @@ def _data_relationships_read_serialize( _content_type, _headers, _host_index, - ) -> RequestSerialized: + ) -> Tuple: _host = None @@ -1132,9 +1132,7 @@ def _data_relationships_read_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, str] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1149,12 +1147,11 @@ def _data_relationships_read_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -1406,7 +1403,7 @@ def _data_write_serialize( _content_type, _headers, _host_index, - ) -> RequestSerialized: + ) -> Tuple: _host = None @@ -1417,9 +1414,7 @@ def _data_write_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, str] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1434,12 +1429,11 @@ def _data_write_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -1691,7 +1685,7 @@ def _relationships_delete_serialize( _content_type, _headers, _host_index, - ) -> RequestSerialized: + ) -> Tuple: _host = None @@ -1702,9 +1696,7 @@ def _relationships_delete_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, str] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1719,12 +1711,11 @@ def _relationships_delete_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -1976,7 +1967,7 @@ def _relationships_write_serialize( _content_type, _headers, _host_index, - ) -> RequestSerialized: + ) -> Tuple: _host = None @@ -1987,9 +1978,7 @@ def _relationships_write_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, str] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2004,12 +1993,11 @@ def _relationships_write_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: diff --git a/permify/api/health_api.py b/permify/api/health_api.py deleted file mode 100644 index 34fb4df..0000000 --- a/permify/api/health_api.py +++ /dev/null @@ -1,279 +0,0 @@ -# coding: utf-8 - -""" - Permify API - - Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - - The version of the OpenAPI document: v1.1.1 - Contact: hello@permify.co - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from permify.models.health_response import HealthResponse - -from permify.api_client import ApiClient, RequestSerialized -from permify.api_response import ApiResponse -from permify.rest import RESTResponseType - - -class HealthApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def health_check( - 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, - ) -> HealthResponse: - """health api - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._health_check_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "HealthResponse", - } - response_data = self.api_client.call_api( - *_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 health_check_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[HealthResponse]: - """health api - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._health_check_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "HealthResponse", - } - response_data = self.api_client.call_api( - *_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 health_check_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: - """health api - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._health_check_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "HealthResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _health_check_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/healthz', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/permify/api/permission_api.py b/permify/api/permission_api.py index 9f714d2..eba0665 100644 --- a/permify/api/permission_api.py +++ b/permify/api/permission_api.py @@ -5,20 +5,29 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 + +import io import warnings + from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated +from typing import Dict, List, Optional, Tuple, Union, Any -from pydantic import Field, StrictStr +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 permify.models.check_body import CheckBody from permify.models.lookup_entity_body import LookupEntityBody from permify.models.lookup_entity_stream_body import LookupEntityStreamBody @@ -32,7 +41,7 @@ from permify.models.stream_result_of_permission_lookup_entity_stream_response import StreamResultOfPermissionLookupEntityStreamResponse from permify.models.subject_permission_body import SubjectPermissionBody -from permify.api_client import ApiClient, RequestSerialized +from permify.api_client import ApiClient from permify.api_response import ApiResponse from permify.rest import RESTResponseType @@ -264,7 +273,7 @@ def _permissions_check_serialize( _content_type, _headers, _host_index, - ) -> RequestSerialized: + ) -> Tuple: _host = None @@ -275,9 +284,7 @@ def _permissions_check_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, str] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -292,12 +299,11 @@ def _permissions_check_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -549,7 +555,7 @@ def _permissions_expand_serialize( _content_type, _headers, _host_index, - ) -> RequestSerialized: + ) -> Tuple: _host = None @@ -560,9 +566,7 @@ def _permissions_expand_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, str] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -577,12 +581,11 @@ def _permissions_expand_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -834,7 +837,7 @@ def _permissions_lookup_entity_serialize( _content_type, _headers, _host_index, - ) -> RequestSerialized: + ) -> Tuple: _host = None @@ -845,9 +848,7 @@ def _permissions_lookup_entity_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, str] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -862,12 +863,11 @@ def _permissions_lookup_entity_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -1119,7 +1119,7 @@ def _permissions_lookup_entity_stream_serialize( _content_type, _headers, _host_index, - ) -> RequestSerialized: + ) -> Tuple: _host = None @@ -1130,9 +1130,7 @@ def _permissions_lookup_entity_stream_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, str] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1147,12 +1145,11 @@ def _permissions_lookup_entity_stream_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -1404,7 +1401,7 @@ def _permissions_lookup_subject_serialize( _content_type, _headers, _host_index, - ) -> RequestSerialized: + ) -> Tuple: _host = None @@ -1415,9 +1412,7 @@ def _permissions_lookup_subject_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, str] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1432,12 +1427,11 @@ def _permissions_lookup_subject_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -1689,7 +1683,7 @@ def _permissions_subject_permission_serialize( _content_type, _headers, _host_index, - ) -> RequestSerialized: + ) -> Tuple: _host = None @@ -1700,9 +1694,7 @@ def _permissions_subject_permission_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, str] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1717,12 +1709,11 @@ def _permissions_subject_permission_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: diff --git a/permify/api/schema_api.py b/permify/api/schema_api.py index d600589..a4c6435 100644 --- a/permify/api/schema_api.py +++ b/permify/api/schema_api.py @@ -5,20 +5,29 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 + +import io import warnings + from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated +from typing import Dict, List, Optional, Tuple, Union, Any -from pydantic import Field, StrictStr +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 permify.models.partial_write_body import PartialWriteBody from permify.models.schema_list_body import SchemaListBody from permify.models.schema_list_response import SchemaListResponse @@ -28,7 +37,7 @@ from permify.models.schema_write_body import SchemaWriteBody from permify.models.schema_write_response import SchemaWriteResponse -from permify.api_client import ApiClient, RequestSerialized +from permify.api_client import ApiClient from permify.api_response import ApiResponse from permify.rest import RESTResponseType @@ -260,7 +269,7 @@ def _schemas_list_serialize( _content_type, _headers, _host_index, - ) -> RequestSerialized: + ) -> Tuple: _host = None @@ -271,9 +280,7 @@ def _schemas_list_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, str] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -288,12 +295,11 @@ def _schemas_list_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -545,7 +551,7 @@ def _schemas_partial_write_serialize( _content_type, _headers, _host_index, - ) -> RequestSerialized: + ) -> Tuple: _host = None @@ -556,9 +562,7 @@ def _schemas_partial_write_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, str] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -573,12 +577,11 @@ def _schemas_partial_write_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -830,7 +833,7 @@ def _schemas_read_serialize( _content_type, _headers, _host_index, - ) -> RequestSerialized: + ) -> Tuple: _host = None @@ -841,9 +844,7 @@ def _schemas_read_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, str] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -858,12 +859,11 @@ def _schemas_read_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -1115,7 +1115,7 @@ def _schemas_write_serialize( _content_type, _headers, _host_index, - ) -> RequestSerialized: + ) -> Tuple: _host = None @@ -1126,9 +1126,7 @@ def _schemas_write_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, str] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1143,12 +1141,11 @@ def _schemas_write_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: diff --git a/permify/api/tenancy_api.py b/permify/api/tenancy_api.py index a0c18b9..7fec137 100644 --- a/permify/api/tenancy_api.py +++ b/permify/api/tenancy_api.py @@ -5,27 +5,36 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 + +import io import warnings + from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated +from typing import Dict, List, Optional, Tuple, Union, Any + +try: + from typing import Annotated +except ImportError: + from typing_extensions import Annotated -from pydantic import Field, StrictStr +from pydantic import Field from typing_extensions import Annotated +from pydantic import StrictStr + from permify.models.tenant_create_request import TenantCreateRequest from permify.models.tenant_create_response import TenantCreateResponse from permify.models.tenant_delete_response import TenantDeleteResponse from permify.models.tenant_list_request import TenantListRequest from permify.models.tenant_list_response import TenantListResponse -from permify.api_client import ApiClient, RequestSerialized +from permify.api_client import ApiClient from permify.api_response import ApiResponse from permify.rest import RESTResponseType @@ -244,7 +253,7 @@ def _tenants_create_serialize( _content_type, _headers, _host_index, - ) -> RequestSerialized: + ) -> Tuple: _host = None @@ -255,9 +264,7 @@ def _tenants_create_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, str] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -270,12 +277,11 @@ def _tenants_create_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -514,7 +520,7 @@ def _tenants_delete_serialize( _content_type, _headers, _host_index, - ) -> RequestSerialized: + ) -> Tuple: _host = None @@ -525,9 +531,7 @@ def _tenants_delete_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, str] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -540,12 +544,11 @@ def _tenants_delete_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -771,7 +774,7 @@ def _tenants_list_serialize( _content_type, _headers, _host_index, - ) -> RequestSerialized: + ) -> Tuple: _host = None @@ -782,9 +785,7 @@ def _tenants_list_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, str] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -797,12 +798,11 @@ def _tenants_list_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: diff --git a/permify/api/watch_api.py b/permify/api/watch_api.py index 3e78c5a..3788374 100644 --- a/permify/api/watch_api.py +++ b/permify/api/watch_api.py @@ -5,24 +5,33 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 + +import io import warnings + from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated +from typing import Dict, List, Optional, Tuple, Union, Any + +try: + from typing import Annotated +except ImportError: + from typing_extensions import Annotated -from pydantic import Field, StrictStr +from pydantic import Field from typing_extensions import Annotated +from pydantic import StrictStr + from permify.models.stream_result_of_watch_response import StreamResultOfWatchResponse from permify.models.watch_body import WatchBody -from permify.api_client import ApiClient, RequestSerialized +from permify.api_client import ApiClient from permify.api_response import ApiResponse from permify.rest import RESTResponseType @@ -254,7 +263,7 @@ def _watch_watch_serialize( _content_type, _headers, _host_index, - ) -> RequestSerialized: + ) -> Tuple: _host = None @@ -265,9 +274,7 @@ def _watch_watch_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} + _files: Dict[str, str] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -282,12 +289,11 @@ def _watch_watch_serialize( # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: diff --git a/permify/api_client.py b/permify/api_client.py index 85adf44..4fe9671 100644 --- a/permify/api_client.py +++ b/permify/api_client.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v0.9.9 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -13,9 +13,9 @@ """ # noqa: E501 +import atexit import datetime from dateutil.parser import parse -from enum import Enum import json import mimetypes import os @@ -23,11 +23,10 @@ import tempfile from urllib.parse import quote -from typing import Tuple, Optional, List, Dict, Union -from pydantic import SecretStr +from typing import Tuple, Optional, List from permify.configuration import Configuration -from permify.api_response import ApiResponse, T as ApiResponseT +from permify.api_response import ApiResponse import permify.models from permify import rest from permify.exceptions import ( @@ -40,7 +39,6 @@ ServiceException ) -RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] class ApiClient: """Generic API client for OpenAPI client library builds. @@ -89,7 +87,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.user_agent = 'OpenAPI-Generator/v1.4.2/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): @@ -150,7 +148,7 @@ def param_serialize( collection_formats=None, _host=None, _request_auth=None - ) -> RequestSerialized: + ) -> Tuple: """Builds the HTTP request params needed by the request. :param method: Method to call. @@ -209,8 +207,7 @@ def param_serialize( post_params, collection_formats ) - if files: - post_params.extend(self.files_parameters(files)) + post_params.extend(self.files_parameters(files)) # auth setting self.update_params_for_auth( @@ -228,7 +225,7 @@ def param_serialize( body = self.sanitize_for_serialization(body) # request url - if _host is None or self.configuration.ignore_operation_servers: + if _host is None: url = self.configuration.host + resource_path else: # use server/host defined in path or operation instead @@ -277,23 +274,23 @@ def call_api( ) 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: rest.RESTResponse, - response_types_map: Optional[Dict[str, ApiResponseT]]=None - ) -> ApiResponse[ApiResponseT]: + response_data: rest.RESTResponse = 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 """ - msg = "RESTResponse.read() must be called before passing it to response_deserialize()" - assert response_data.data is not None, msg 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: @@ -315,7 +312,7 @@ def response_deserialize( 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, content_type) + return_data = self.deserialize(response_text, response_type) finally: if not 200 <= response_data.status <= 299: raise ApiException.from_response( @@ -335,7 +332,6 @@ def sanitize_for_serialization(self, obj): """Builds a JSON POST object. If obj is None, return None. - If obj is SecretStr, return obj.get_secret_value() If obj is str, int, long, float, bool, return directly. If obj is datetime.datetime, datetime.date convert to string in iso8601 format. @@ -348,10 +344,6 @@ def sanitize_for_serialization(self, obj): """ if obj is None: return None - elif isinstance(obj, Enum): - return obj.value - elif isinstance(obj, SecretStr): - return obj.get_secret_value() elif isinstance(obj, self.PRIMITIVE_TYPES): return obj elif isinstance(obj, list): @@ -373,45 +365,28 @@ def sanitize_for_serialization(self, obj): # and attributes which value is not None. # Convert attribute name to json key in # model definition for request. - if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): - obj_dict = obj.to_dict() - else: - obj_dict = obj.__dict__ + obj_dict = obj.to_dict() return { key: self.sanitize_for_serialization(val) for key, val in obj_dict.items() } - def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + def deserialize(self, response_text, response_type): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. :param response_type: class literal for deserialized object, or string of class name. - :param content_type: content type of response. :return: deserialized object. """ # fetch data from response object - if content_type is None: - try: - data = json.loads(response_text) - except ValueError: - data = response_text - elif content_type.startswith("application/json"): - if response_text == "": - data = "" - else: - data = json.loads(response_text) - elif content_type.startswith("text/plain"): + try: + data = json.loads(response_text) + except ValueError: data = response_text - else: - raise ApiException( - status=0, - reason="Unsupported content type: {0}".format(content_type) - ) return self.__deserialize(data, response_type) @@ -428,16 +403,12 @@ def __deserialize(self, data, klass): if isinstance(klass, str): if klass.startswith('List['): - m = re.match(r'List\[(.*)]', klass) - assert m is not None, "Malformed List type definition" - sub_kls = m.group(1) + sub_kls = re.match(r'List\[(.*)]', klass).group(1) return [self.__deserialize(sub_data, sub_kls) for sub_data in data] if klass.startswith('Dict['): - m = re.match(r'Dict\[([^,]*), (.*)]', klass) - assert m is not None, "Malformed Dict type definition" - sub_kls = m.group(2) + sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) return {k: self.__deserialize(v, sub_kls) for k, v in data.items()} @@ -455,8 +426,6 @@ def __deserialize(self, data, klass): return self.__deserialize_date(data) elif klass == datetime.datetime: return self.__deserialize_datetime(data) - elif issubclass(klass, Enum): - return self.__deserialize_enum(data, klass) else: return self.__deserialize_model(data, klass) @@ -467,7 +436,7 @@ def parameters_to_tuples(self, params, collection_formats): :param dict collection_formats: Parameter collection formats :return: Parameters as list of tuples, collections formatted """ - new_params: List[Tuple[str, str]] = [] + new_params = [] if collection_formats is None: collection_formats = {} for k, v in params.items() if isinstance(params, dict) else params: @@ -497,7 +466,7 @@ def parameters_to_url_query(self, params, collection_formats): :param dict collection_formats: Parameter collection formats :return: URL query string (e.g. a=Hello%20World&b=123) """ - new_params: List[Tuple[str, str]] = [] + new_params = [] if collection_formats is None: collection_formats = {} for k, v in params.items() if isinstance(params, dict) else params: @@ -511,7 +480,7 @@ def parameters_to_url_query(self, params, collection_formats): if k in collection_formats: collection_format = collection_formats[k] if collection_format == 'multi': - new_params.extend((k, str(value)) for value in v) + new_params.extend((k, value) for value in v) else: if collection_format == 'ssv': delimiter = ' ' @@ -527,32 +496,33 @@ def parameters_to_url_query(self, params, collection_formats): else: new_params.append((k, quote(str(v)))) - return "&".join(["=".join(map(str, item)) for item in new_params]) + return "&".join(["=".join(item) for item in new_params]) - def files_parameters(self, files: Dict[str, Union[str, bytes]]): + def files_parameters(self, files=None): """Builds form parameters. :param files: File parameters. :return: Form parameters with files. """ params = [] - for k, v in files.items(): - if isinstance(v, str): - with open(v, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - elif isinstance(v, bytes): - filename = k - filedata = v - else: - raise ValueError("Unsupported file value") - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) + + if files: + for k, v in files.items(): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + 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' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params def select_header_accept(self, accepts: List[str]) -> Optional[str]: @@ -681,12 +651,10 @@ def __deserialize_file(self, response): content_disposition = response.getheader("Content-Disposition") if content_disposition: - m = re.search( + filename = re.search( r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition - ) - assert m is not None, "Unexpected 'content-disposition' header value" - filename = m.group(1) + ).group(1) path = os.path.join(os.path.dirname(path), filename) with open(path, "wb") as f: @@ -753,24 +721,6 @@ def __deserialize_datetime(self, string): ) ) - def __deserialize_enum(self, data, klass): - """Deserializes primitive type to enum. - - :param data: primitive type. - :param klass: class literal. - :return: enum value. - """ - try: - return klass(data) - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as `{1}`" - .format(data, klass) - ) - ) - def __deserialize_model(self, data, klass): """Deserializes list or dict to model. diff --git a/permify/api_response.py b/permify/api_response.py index 9bc7c11..2ac1ada 100644 --- a/permify/api_response.py +++ b/permify/api_response.py @@ -1,8 +1,8 @@ """API response object.""" from __future__ import annotations -from typing import Optional, Generic, Mapping, TypeVar -from pydantic import Field, StrictInt, StrictBytes, BaseModel +from typing import Any, Dict, Optional, Generic, TypeVar +from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel T = TypeVar("T") @@ -12,7 +12,7 @@ class ApiResponse(BaseModel, Generic[T]): """ status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + 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)") diff --git a/permify/configuration.py b/permify/configuration.py index 8baa12d..406ff45 100644 --- a/permify/configuration.py +++ b/permify/configuration.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v0.9.9 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -15,10 +15,8 @@ import copy import logging -from logging import FileHandler import multiprocessing import sys -from typing import Optional import urllib3 import http.client as httplib @@ -33,9 +31,6 @@ class Configuration: """This class contains various settings of the API client. :param host: Base url. - :param ignore_operation_servers - Boolean to ignore operation servers for the API client. - Config will use `host` as the base url regardless of the operation servers. :param api_key: Dict to store API key(s). Each entry in the dict specifies an API key. The dict key is the name of the security scheme in the OAS specification. @@ -58,7 +53,6 @@ class Configuration: values before. :param ssl_ca_cert: str - the path to a file of concatenated CA certificates in PEM format. - :param retries: Number of retries for API requests. :Example: @@ -90,11 +84,7 @@ def __init__(self, host=None, access_token=None, server_index=None, server_variables=None, server_operation_index=None, server_operation_variables=None, - ignore_operation_servers=False, ssl_ca_cert=None, - retries=None, - *, - debug: Optional[bool] = None ) -> None: """Constructor """ @@ -109,9 +99,6 @@ def __init__(self, host=None, self.server_operation_variables = server_operation_variables or {} """Default server variables """ - self.ignore_operation_servers = ignore_operation_servers - """Ignore operation servers - """ self.temp_folder_path = None """Temp file folder for downloading files """ @@ -149,16 +136,13 @@ def __init__(self, host=None, self.logger_stream_handler = None """Log stream handler """ - self.logger_file_handler: Optional[FileHandler] = None + self.logger_file_handler = None """Log file handler """ self.logger_file = None """Debug file location """ - if debug is not None: - self.debug = debug - else: - self.__debug = False + self.debug = False """Debug switch """ @@ -192,7 +176,7 @@ def __init__(self, host=None, cpu_count * 5 is used as default value to increase performance. """ - self.proxy: Optional[str] = None + self.proxy = None """Proxy URL """ self.proxy_headers = None @@ -201,7 +185,7 @@ def __init__(self, host=None, self.safe_chars_for_path_param = '' """Safe chars for path_param """ - self.retries = retries + self.retries = None """Adding retries to override urllib3 default value 3 """ # Enable client side validation @@ -413,8 +397,8 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: v0.9.9\n"\ - "SDK Package Version: 1.0.0".\ + "Version of the API: v1.4.2\n"\ + "SDK Package Version: v1.4.2".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/permify/exceptions.py b/permify/exceptions.py index 6e496f1..df7e674 100644 --- a/permify/exceptions.py +++ b/permify/exceptions.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v0.9.9 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -13,6 +13,7 @@ """ # noqa: E501 from typing import Any, Optional + from typing_extensions import Self class OpenApiException(Exception): diff --git a/permify/models/__init__.py b/permify/models/__init__.py index 2716f88..2ef914b 100644 --- a/permify/models/__init__.py +++ b/permify/models/__init__.py @@ -6,7 +6,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v0.9.9 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -40,7 +40,6 @@ from permify.models.computed_user_set import ComputedUserSet from permify.models.constant import Constant from permify.models.context import Context -from permify.models.context_attribute import ContextAttribute from permify.models.create_list import CreateList from permify.models.create_struct import CreateStruct from permify.models.data_bundle import DataBundle @@ -118,6 +117,7 @@ from permify.models.status import Status from permify.models.stream_result_of_permission_lookup_entity_stream_response import StreamResultOfPermissionLookupEntityStreamResponse from permify.models.stream_result_of_watch_response import StreamResultOfWatchResponse +from permify.models.string_array_value import StringArrayValue from permify.models.subject import Subject from permify.models.subject_filter import SubjectFilter from permify.models.subject_permission_body import SubjectPermissionBody diff --git a/permify/models/abstract_type.py b/permify/models/abstract_type.py index 1ceb74f..91d5ef4 100644 --- a/permify/models/abstract_type.py +++ b/permify/models/abstract_type.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class AbstractType(BaseModel): """ @@ -31,11 +35,11 @@ class AbstractType(BaseModel): parameter_types: Optional[List[V1alpha1Type]] = Field(default=None, description="Parameter types for this abstract type.", alias="parameterTypes") __properties: ClassVar[List[str]] = ["name", "parameterTypes"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of AbstractType from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,25 +66,23 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in parameter_types (list) _items = [] if self.parameter_types: - for _item_parameter_types in self.parameter_types: - if _item_parameter_types: - _items.append(_item_parameter_types.to_dict()) + for _item in self.parameter_types: + if _item: + _items.append(_item.to_dict()) _dict['parameterTypes'] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of AbstractType from a dict""" if obj is None: return None @@ -90,7 +92,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "name": obj.get("name"), - "parameterTypes": [V1alpha1Type.from_dict(_item) for _item in obj["parameterTypes"]] if obj.get("parameterTypes") is not None else None + "parameterTypes": [V1alpha1Type.from_dict(_item) for _item in obj.get("parameterTypes")] if obj.get("parameterTypes") is not None else None }) return _obj diff --git a/permify/models/any.py b/permify/models/any.py index 9f7c4b6..91aff11 100644 --- a/permify/models/any.py +++ b/permify/models/any.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class Any(BaseModel): """ @@ -31,11 +35,11 @@ class Any(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["@type"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of Any from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,13 +67,11 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + "additional_properties", + }, exclude_none=True, ) # puts key-value pairs in additional_properties in the top level @@ -80,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of Any from a dict""" if obj is None: return None diff --git a/permify/models/argument.py b/permify/models/argument.py index 2034787..e64086e 100644 --- a/permify/models/argument.py +++ b/permify/models/argument.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel +from pydantic import Field from permify.models.computed_attribute import ComputedAttribute -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class Argument(BaseModel): """ @@ -31,11 +35,11 @@ class Argument(BaseModel): computed_attribute: Optional[ComputedAttribute] = Field(default=None, alias="computedAttribute") __properties: ClassVar[List[str]] = ["computedAttribute"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of Argument from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,12 +66,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of computed_attribute @@ -76,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of Argument from a dict""" if obj is None: return None @@ -85,7 +87,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "computedAttribute": ComputedAttribute.from_dict(obj["computedAttribute"]) if obj.get("computedAttribute") is not None else None + "computedAttribute": ComputedAttribute.from_dict(obj.get("computedAttribute")) if obj.get("computedAttribute") is not None else None }) return _obj diff --git a/permify/models/attribute.py b/permify/models/attribute.py index c4d641c..a58fbc0 100644 --- a/permify/models/attribute.py +++ b/permify/models/attribute.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,12 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictStr from permify.models.any import Any from permify.models.entity import Entity -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class Attribute(BaseModel): """ @@ -34,11 +37,11 @@ class Attribute(BaseModel): value: Optional[Any] = None __properties: ClassVar[List[str]] = ["entity", "attribute", "value"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -51,7 +54,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of Attribute from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,12 +68,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of entity @@ -82,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of Attribute from a dict""" if obj is None: return None @@ -91,9 +92,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "entity": Entity.from_dict(obj["entity"]) if obj.get("entity") is not None else None, + "entity": Entity.from_dict(obj.get("entity")) if obj.get("entity") is not None else None, "attribute": obj.get("attribute"), - "value": Any.from_dict(obj["value"]) if obj.get("value") is not None else None + "value": Any.from_dict(obj.get("value")) if obj.get("value") is not None else None }) return _obj diff --git a/permify/models/attribute_definition.py b/permify/models/attribute_definition.py index 0415e5e..84b7c30 100644 --- a/permify/models/attribute_definition.py +++ b/permify/models/attribute_definition.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictStr +from pydantic import Field from permify.models.attribute_type import AttributeType -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class AttributeDefinition(BaseModel): """ @@ -32,11 +36,11 @@ class AttributeDefinition(BaseModel): type: Optional[AttributeType] = None __properties: ClassVar[List[str]] = ["name", "type"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -49,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of AttributeDefinition from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,18 +67,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of AttributeDefinition from a dict""" if obj is None: return None diff --git a/permify/models/attribute_filter.py b/permify/models/attribute_filter.py index bf7d017..6f757c6 100644 --- a/permify/models/attribute_filter.py +++ b/permify/models/attribute_filter.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictStr from permify.models.entity_filter import EntityFilter -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class AttributeFilter(BaseModel): """ @@ -32,11 +35,11 @@ class AttributeFilter(BaseModel): attributes: Optional[List[StrictStr]] = None __properties: ClassVar[List[str]] = ["entity", "attributes"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -49,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of AttributeFilter from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,12 +66,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of entity @@ -77,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of AttributeFilter from a dict""" if obj is None: return None @@ -86,7 +87,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "entity": EntityFilter.from_dict(obj["entity"]) if obj.get("entity") is not None else None, + "entity": EntityFilter.from_dict(obj.get("entity")) if obj.get("entity") is not None else None, "attributes": obj.get("attributes") }) return _obj diff --git a/permify/models/attribute_read_request_metadata.py b/permify/models/attribute_read_request_metadata.py index e047ee6..a846b83 100644 --- a/permify/models/attribute_read_request_metadata.py +++ b/permify/models/attribute_read_request_metadata.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class AttributeReadRequestMetadata(BaseModel): """ @@ -30,11 +34,11 @@ class AttributeReadRequestMetadata(BaseModel): snap_token: Optional[StrictStr] = Field(default=None, description="The snap token to avoid stale cache, see more details on [Snap Tokens](../../operations/snap-tokens)") __properties: ClassVar[List[str]] = ["snap_token"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -47,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of AttributeReadRequestMetadata from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,18 +65,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of AttributeReadRequestMetadata from a dict""" if obj is None: return None diff --git a/permify/models/attribute_read_response.py b/permify/models/attribute_read_response.py index f2f7933..2f080d3 100644 --- a/permify/models/attribute_read_response.py +++ b/permify/models/attribute_read_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictStr +from pydantic import Field from permify.models.attribute import Attribute -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class AttributeReadResponse(BaseModel): """ @@ -32,11 +36,11 @@ class AttributeReadResponse(BaseModel): continuous_token: Optional[StrictStr] = Field(default=None, description="continuous_token is used in the case of paginated reads to retrieve the next page of results.") __properties: ClassVar[List[str]] = ["attributes", "continuous_token"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -49,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of AttributeReadResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,25 +67,23 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in attributes (list) _items = [] if self.attributes: - for _item_attributes in self.attributes: - if _item_attributes: - _items.append(_item_attributes.to_dict()) + for _item in self.attributes: + if _item: + _items.append(_item.to_dict()) _dict['attributes'] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of AttributeReadResponse from a dict""" if obj is None: return None @@ -90,7 +92,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "attributes": [Attribute.from_dict(_item) for _item in obj["attributes"]] if obj.get("attributes") is not None else None, + "attributes": [Attribute.from_dict(_item) for _item in obj.get("attributes")] if obj.get("attributes") is not None else None, "continuous_token": obj.get("continuous_token") }) return _obj diff --git a/permify/models/attribute_type.py b/permify/models/attribute_type.py index 7e660d9..aaa3153 100644 --- a/permify/models/attribute_type.py +++ b/permify/models/attribute_type.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -15,8 +15,16 @@ from __future__ import annotations import json +import pprint +import re # noqa: F401 from enum import Enum -from typing_extensions import Self + + + +try: + from typing import Self +except ImportError: + from typing_extensions import Self class AttributeType(str, Enum): diff --git a/permify/models/bundle_delete_body.py b/permify/models/bundle_delete_body.py index 937f877..985e2d8 100644 --- a/permify/models/bundle_delete_body.py +++ b/permify/models/bundle_delete_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class BundleDeleteBody(BaseModel): """ @@ -30,11 +34,11 @@ class BundleDeleteBody(BaseModel): name: Optional[StrictStr] = Field(default=None, description="Name of the bundle to be deleted.") __properties: ClassVar[List[str]] = ["name"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -47,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of BundleDeleteBody from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,18 +65,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of BundleDeleteBody from a dict""" if obj is None: return None diff --git a/permify/models/bundle_delete_response.py b/permify/models/bundle_delete_response.py index d3aa7f1..e8b9bef 100644 --- a/permify/models/bundle_delete_response.py +++ b/permify/models/bundle_delete_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,13 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +try: + from typing import Self +except ImportError: + from typing_extensions import Self class BundleDeleteResponse(BaseModel): """ @@ -30,11 +33,11 @@ class BundleDeleteResponse(BaseModel): name: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["name"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -47,7 +50,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of BundleDeleteResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,18 +64,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of BundleDeleteResponse from a dict""" if obj is None: return None diff --git a/permify/models/bundle_read_body.py b/permify/models/bundle_read_body.py index 1f5eb5f..278b83a 100644 --- a/permify/models/bundle_read_body.py +++ b/permify/models/bundle_read_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,13 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +try: + from typing import Self +except ImportError: + from typing_extensions import Self class BundleReadBody(BaseModel): """ @@ -30,11 +33,11 @@ class BundleReadBody(BaseModel): name: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["name"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -47,7 +50,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of BundleReadBody from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,18 +64,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of BundleReadBody from a dict""" if obj is None: return None diff --git a/permify/models/bundle_read_response.py b/permify/models/bundle_read_response.py index ae1ca8a..d04be45 100644 --- a/permify/models/bundle_read_response.py +++ b/permify/models/bundle_read_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel from permify.models.data_bundle import DataBundle -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class BundleReadResponse(BaseModel): """ @@ -31,11 +34,11 @@ class BundleReadResponse(BaseModel): bundle: Optional[DataBundle] = None __properties: ClassVar[List[str]] = ["bundle"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of BundleReadResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,12 +65,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of bundle @@ -76,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of BundleReadResponse from a dict""" if obj is None: return None @@ -85,7 +86,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "bundle": DataBundle.from_dict(obj["bundle"]) if obj.get("bundle") is not None else None + "bundle": DataBundle.from_dict(obj.get("bundle")) if obj.get("bundle") is not None else None }) return _obj diff --git a/permify/models/bundle_run_response.py b/permify/models/bundle_run_response.py index a2df22e..441c956 100644 --- a/permify/models/bundle_run_response.py +++ b/permify/models/bundle_run_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class BundleRunResponse(BaseModel): """ @@ -30,11 +34,11 @@ class BundleRunResponse(BaseModel): snap_token: Optional[StrictStr] = Field(default=None, description="The snap token to avoid stale cache, see more details on [Snap Tokens](../../operations/snap-tokens)") __properties: ClassVar[List[str]] = ["snap_token"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -47,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of BundleRunResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,18 +65,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of BundleRunResponse from a dict""" if obj is None: return None diff --git a/permify/models/bundle_write_body.py b/permify/models/bundle_write_body.py index 7f9dac3..ca382cd 100644 --- a/permify/models/bundle_write_body.py +++ b/permify/models/bundle_write_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel +from pydantic import Field from permify.models.data_bundle import DataBundle -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class BundleWriteBody(BaseModel): """ @@ -31,11 +35,11 @@ class BundleWriteBody(BaseModel): bundles: Optional[List[DataBundle]] = Field(default=None, description="Contains the bundle data to be written.") __properties: ClassVar[List[str]] = ["bundles"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of BundleWriteBody from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,25 +66,23 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in bundles (list) _items = [] if self.bundles: - for _item_bundles in self.bundles: - if _item_bundles: - _items.append(_item_bundles.to_dict()) + for _item in self.bundles: + if _item: + _items.append(_item.to_dict()) _dict['bundles'] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of BundleWriteBody from a dict""" if obj is None: return None @@ -89,7 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "bundles": [DataBundle.from_dict(_item) for _item in obj["bundles"]] if obj.get("bundles") is not None else None + "bundles": [DataBundle.from_dict(_item) for _item in obj.get("bundles")] if obj.get("bundles") is not None else None }) return _obj diff --git a/permify/models/bundle_write_response.py b/permify/models/bundle_write_response.py index 41e325c..09d0d2a 100644 --- a/permify/models/bundle_write_response.py +++ b/permify/models/bundle_write_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class BundleWriteResponse(BaseModel): """ @@ -30,11 +34,11 @@ class BundleWriteResponse(BaseModel): names: Optional[List[StrictStr]] = Field(default=None, description="Identifier or acknowledgment of the written bundle.") __properties: ClassVar[List[str]] = ["names"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -47,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of BundleWriteResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,18 +65,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of BundleWriteResponse from a dict""" if obj is None: return None diff --git a/permify/models/check_body.py b/permify/models/check_body.py index 79b1faf..f62e9ab 100644 --- a/permify/models/check_body.py +++ b/permify/models/check_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,15 +18,19 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictStr +from pydantic import Field from permify.models.argument import Argument from permify.models.context import Context from permify.models.entity import Entity from permify.models.permission_check_request_metadata import PermissionCheckRequestMetadata from permify.models.subject import Subject -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class CheckBody(BaseModel): """ @@ -40,11 +44,11 @@ class CheckBody(BaseModel): arguments: Optional[List[Argument]] = Field(default=None, description="Additional arguments associated with this request.") __properties: ClassVar[List[str]] = ["metadata", "entity", "permission", "subject", "context", "arguments"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -57,7 +61,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of CheckBody from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -71,12 +75,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of metadata @@ -94,14 +96,14 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in arguments (list) _items = [] if self.arguments: - for _item_arguments in self.arguments: - if _item_arguments: - _items.append(_item_arguments.to_dict()) + for _item in self.arguments: + if _item: + _items.append(_item.to_dict()) _dict['arguments'] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of CheckBody from a dict""" if obj is None: return None @@ -110,12 +112,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "metadata": PermissionCheckRequestMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, - "entity": Entity.from_dict(obj["entity"]) if obj.get("entity") is not None else None, + "metadata": PermissionCheckRequestMetadata.from_dict(obj.get("metadata")) if obj.get("metadata") is not None else None, + "entity": Entity.from_dict(obj.get("entity")) if obj.get("entity") is not None else None, "permission": obj.get("permission"), - "subject": Subject.from_dict(obj["subject"]) if obj.get("subject") is not None else None, - "context": Context.from_dict(obj["context"]) if obj.get("context") is not None else None, - "arguments": [Argument.from_dict(_item) for _item in obj["arguments"]] if obj.get("arguments") is not None else None + "subject": Subject.from_dict(obj.get("subject")) if obj.get("subject") is not None else None, + "context": Context.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "arguments": [Argument.from_dict(_item) for _item in obj.get("arguments")] if obj.get("arguments") is not None else None }) return _obj diff --git a/permify/models/check_result.py b/permify/models/check_result.py index 3e0bafa..fa88691 100644 --- a/permify/models/check_result.py +++ b/permify/models/check_result.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -15,8 +15,16 @@ from __future__ import annotations import json +import pprint +import re # noqa: F401 from enum import Enum -from typing_extensions import Self + + + +try: + from typing import Self +except ImportError: + from typing_extensions import Self class CheckResult(str, Enum): diff --git a/permify/models/checked_expr.py b/permify/models/checked_expr.py index 0d1bb51..83e2c61 100644 --- a/permify/models/checked_expr.py +++ b/permify/models/checked_expr.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,14 +18,18 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictStr +from pydantic import Field from permify.models.expr import Expr from permify.models.source_info import SourceInfo from permify.models.v1alpha1_reference import V1alpha1Reference from permify.models.v1alpha1_type import V1alpha1Type -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class CheckedExpr(BaseModel): """ @@ -38,11 +42,11 @@ class CheckedExpr(BaseModel): expr: Optional[Expr] = None __properties: ClassVar[List[str]] = ["referenceMap", "typeMap", "sourceInfo", "exprVersion", "expr"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -55,7 +59,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of CheckedExpr from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,27 +73,25 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each value in reference_map (dict) _field_dict = {} if self.reference_map: - for _key_reference_map in self.reference_map: - if self.reference_map[_key_reference_map]: - _field_dict[_key_reference_map] = self.reference_map[_key_reference_map].to_dict() + for _key in self.reference_map: + if self.reference_map[_key]: + _field_dict[_key] = self.reference_map[_key].to_dict() _dict['referenceMap'] = _field_dict # override the default output from pydantic by calling `to_dict()` of each value in type_map (dict) _field_dict = {} if self.type_map: - for _key_type_map in self.type_map: - if self.type_map[_key_type_map]: - _field_dict[_key_type_map] = self.type_map[_key_type_map].to_dict() + for _key in self.type_map: + if self.type_map[_key]: + _field_dict[_key] = self.type_map[_key].to_dict() _dict['typeMap'] = _field_dict # override the default output from pydantic by calling `to_dict()` of source_info if self.source_info: @@ -100,7 +102,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of CheckedExpr from a dict""" if obj is None: return None @@ -111,19 +113,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "referenceMap": dict( (_k, V1alpha1Reference.from_dict(_v)) - for _k, _v in obj["referenceMap"].items() + for _k, _v in obj.get("referenceMap").items() ) if obj.get("referenceMap") is not None else None, "typeMap": dict( (_k, V1alpha1Type.from_dict(_v)) - for _k, _v in obj["typeMap"].items() + for _k, _v in obj.get("typeMap").items() ) if obj.get("typeMap") is not None else None, - "sourceInfo": SourceInfo.from_dict(obj["sourceInfo"]) if obj.get("sourceInfo") is not None else None, + "sourceInfo": SourceInfo.from_dict(obj.get("sourceInfo")) if obj.get("sourceInfo") is not None else None, "exprVersion": obj.get("exprVersion"), - "expr": Expr.from_dict(obj["expr"]) if obj.get("expr") is not None else None + "expr": Expr.from_dict(obj.get("expr")) if obj.get("expr") is not None else None }) return _obj diff --git a/permify/models/child.py b/permify/models/child.py index ada3a1d..88bca4d 100644 --- a/permify/models/child.py +++ b/permify/models/child.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel from permify.models.leaf import Leaf -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class Child(BaseModel): """ @@ -32,11 +35,11 @@ class Child(BaseModel): rewrite: Optional[Rewrite] = None __properties: ClassVar[List[str]] = ["leaf", "rewrite"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -49,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of Child from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,12 +66,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of leaf @@ -80,7 +81,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of Child from a dict""" if obj is None: return None @@ -89,8 +90,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "leaf": Leaf.from_dict(obj["leaf"]) if obj.get("leaf") is not None else None, - "rewrite": Rewrite.from_dict(obj["rewrite"]) if obj.get("rewrite") is not None else None + "leaf": Leaf.from_dict(obj.get("leaf")) if obj.get("leaf") is not None else None, + "rewrite": Rewrite.from_dict(obj.get("rewrite")) if obj.get("rewrite") is not None else None }) return _obj diff --git a/permify/models/comprehension.py b/permify/models/comprehension.py index de89126..c66f53f 100644 --- a/permify/models/comprehension.py +++ b/permify/models/comprehension.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class Comprehension(BaseModel): """ @@ -36,11 +40,11 @@ class Comprehension(BaseModel): result: Optional[Expr] = None __properties: ClassVar[List[str]] = ["iterVar", "iterRange", "accuVar", "accuInit", "loopCondition", "loopStep", "result"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -53,7 +57,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of Comprehension from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -67,12 +71,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of iter_range @@ -93,7 +95,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of Comprehension from a dict""" if obj is None: return None @@ -103,12 +105,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "iterVar": obj.get("iterVar"), - "iterRange": Expr.from_dict(obj["iterRange"]) if obj.get("iterRange") is not None else None, + "iterRange": Expr.from_dict(obj.get("iterRange")) if obj.get("iterRange") is not None else None, "accuVar": obj.get("accuVar"), - "accuInit": Expr.from_dict(obj["accuInit"]) if obj.get("accuInit") is not None else None, - "loopCondition": Expr.from_dict(obj["loopCondition"]) if obj.get("loopCondition") is not None else None, - "loopStep": Expr.from_dict(obj["loopStep"]) if obj.get("loopStep") is not None else None, - "result": Expr.from_dict(obj["result"]) if obj.get("result") is not None else None + "accuInit": Expr.from_dict(obj.get("accuInit")) if obj.get("accuInit") is not None else None, + "loopCondition": Expr.from_dict(obj.get("loopCondition")) if obj.get("loopCondition") is not None else None, + "loopStep": Expr.from_dict(obj.get("loopStep")) if obj.get("loopStep") is not None else None, + "result": Expr.from_dict(obj.get("result")) if obj.get("result") is not None else None }) return _obj diff --git a/permify/models/computed_attribute.py b/permify/models/computed_attribute.py index eea1961..dfcf9d0 100644 --- a/permify/models/computed_attribute.py +++ b/permify/models/computed_attribute.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,13 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +try: + from typing import Self +except ImportError: + from typing_extensions import Self class ComputedAttribute(BaseModel): """ @@ -30,11 +33,11 @@ class ComputedAttribute(BaseModel): name: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["name"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -47,7 +50,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of ComputedAttribute from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,18 +64,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of ComputedAttribute from a dict""" if obj is None: return None diff --git a/permify/models/computed_user_set.py b/permify/models/computed_user_set.py index 8639416..b840a96 100644 --- a/permify/models/computed_user_set.py +++ b/permify/models/computed_user_set.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,13 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +try: + from typing import Self +except ImportError: + from typing_extensions import Self class ComputedUserSet(BaseModel): """ @@ -30,11 +33,11 @@ class ComputedUserSet(BaseModel): relation: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["relation"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -47,7 +50,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of ComputedUserSet from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,18 +64,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of ComputedUserSet from a dict""" if obj is None: return None diff --git a/permify/models/constant.py b/permify/models/constant.py index ffd2481..ab00241 100644 --- a/permify/models/constant.py +++ b/permify/models/constant.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,11 +19,14 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union +from pydantic import BaseModel, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from pydantic import Field from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class Constant(BaseModel): """ @@ -50,11 +53,11 @@ def bytes_value_validate_regular_expression(cls, value): raise ValueError(r"must validate the regular expression /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/") return value - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -67,7 +70,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of Constant from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -81,18 +84,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of Constant from a dict""" if obj is None: return None diff --git a/permify/models/context.py b/permify/models/context.py index f641bcb..c28e892 100644 --- a/permify/models/context.py +++ b/permify/models/context.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,12 +18,16 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel +from pydantic import Field from permify.models.attribute import Attribute from permify.models.tuple import Tuple -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class Context(BaseModel): """ @@ -34,11 +38,11 @@ class Context(BaseModel): data: Optional[Dict[str, Any]] = Field(default=None, description="Additional data associated with the context.") __properties: ClassVar[List[str]] = ["tuples", "attributes", "data"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -51,7 +55,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of Context from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,32 +69,30 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in tuples (list) _items = [] if self.tuples: - for _item_tuples in self.tuples: - if _item_tuples: - _items.append(_item_tuples.to_dict()) + for _item in self.tuples: + if _item: + _items.append(_item.to_dict()) _dict['tuples'] = _items # override the default output from pydantic by calling `to_dict()` of each item in attributes (list) _items = [] if self.attributes: - for _item_attributes in self.attributes: - if _item_attributes: - _items.append(_item_attributes.to_dict()) + for _item in self.attributes: + if _item: + _items.append(_item.to_dict()) _dict['attributes'] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of Context from a dict""" if obj is None: return None @@ -99,8 +101,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "tuples": [Tuple.from_dict(_item) for _item in obj["tuples"]] if obj.get("tuples") is not None else None, - "attributes": [Attribute.from_dict(_item) for _item in obj["attributes"]] if obj.get("attributes") is not None else None, + "tuples": [Tuple.from_dict(_item) for _item in obj.get("tuples")] if obj.get("tuples") is not None else None, + "attributes": [Attribute.from_dict(_item) for _item in obj.get("attributes")] if obj.get("attributes") is not None else None, "data": obj.get("data") }) return _obj diff --git a/permify/models/context_attribute.py b/permify/models/context_attribute.py deleted file mode 100644 index 674c1de..0000000 --- a/permify/models/context_attribute.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Permify API - - Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - - The version of the OpenAPI document: v1.0.7 - Contact: hello@permify.co - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ContextAttribute(BaseModel): - """ - ContextAttribute defines a context attribute which includes its name. - """ # noqa: E501 - name: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["name"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ContextAttribute from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ContextAttribute from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name") - }) - return _obj - - diff --git a/permify/models/create_list.py b/permify/models/create_list.py index cccfcc7..54fb9cc 100644 --- a/permify/models/create_list.py +++ b/permify/models/create_list.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictInt +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class CreateList(BaseModel): """ @@ -31,11 +35,11 @@ class CreateList(BaseModel): optional_indices: Optional[List[StrictInt]] = Field(default=None, description="The indices within the elements list which are marked as optional elements. When an optional-typed value is present, the value it contains is included in the list. If the optional-typed value is absent, the list element is omitted from the CreateList result.", alias="optionalIndices") __properties: ClassVar[List[str]] = ["elements", "optionalIndices"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of CreateList from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,25 +66,23 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in elements (list) _items = [] if self.elements: - for _item_elements in self.elements: - if _item_elements: - _items.append(_item_elements.to_dict()) + for _item in self.elements: + if _item: + _items.append(_item.to_dict()) _dict['elements'] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of CreateList from a dict""" if obj is None: return None @@ -89,7 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "elements": [Expr.from_dict(_item) for _item in obj["elements"]] if obj.get("elements") is not None else None, + "elements": [Expr.from_dict(_item) for _item in obj.get("elements")] if obj.get("elements") is not None else None, "optionalIndices": obj.get("optionalIndices") }) return _obj diff --git a/permify/models/create_struct.py b/permify/models/create_struct.py index 6d9afe0..2fd043a 100644 --- a/permify/models/create_struct.py +++ b/permify/models/create_struct.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class CreateStruct(BaseModel): """ @@ -31,11 +35,11 @@ class CreateStruct(BaseModel): entries: Optional[List[Entry]] = Field(default=None, description="The entries in the creation expression.") __properties: ClassVar[List[str]] = ["messageName", "entries"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of CreateStruct from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,25 +66,23 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in entries (list) _items = [] if self.entries: - for _item_entries in self.entries: - if _item_entries: - _items.append(_item_entries.to_dict()) + for _item in self.entries: + if _item: + _items.append(_item.to_dict()) _dict['entries'] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of CreateStruct from a dict""" if obj is None: return None @@ -90,7 +92,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "messageName": obj.get("messageName"), - "entries": [Entry.from_dict(_item) for _item in obj["entries"]] if obj.get("entries") is not None else None + "entries": [Entry.from_dict(_item) for _item in obj.get("entries")] if obj.get("entries") is not None else None }) return _obj diff --git a/permify/models/data_bundle.py b/permify/models/data_bundle.py index 2c105e6..14aac37 100644 --- a/permify/models/data_bundle.py +++ b/permify/models/data_bundle.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictStr +from pydantic import Field from permify.models.v1_operation import V1Operation -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class DataBundle(BaseModel): """ @@ -33,11 +37,11 @@ class DataBundle(BaseModel): operations: Optional[List[V1Operation]] = Field(default=None, description="'operations' is a repeated field containing multiple Operation messages. Each Operation represents a specific action or set of actions to be performed.") __properties: ClassVar[List[str]] = ["name", "arguments", "operations"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -50,7 +54,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of DataBundle from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,25 +68,23 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in operations (list) _items = [] if self.operations: - for _item_operations in self.operations: - if _item_operations: - _items.append(_item_operations.to_dict()) + for _item in self.operations: + if _item: + _items.append(_item.to_dict()) _dict['operations'] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of DataBundle from a dict""" if obj is None: return None @@ -93,7 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "name": obj.get("name"), "arguments": obj.get("arguments"), - "operations": [V1Operation.from_dict(_item) for _item in obj["operations"]] if obj.get("operations") is not None else None + "operations": [V1Operation.from_dict(_item) for _item in obj.get("operations")] if obj.get("operations") is not None else None }) return _obj diff --git a/permify/models/data_change.py b/permify/models/data_change.py index b99b999..34b9a0f 100644 --- a/permify/models/data_change.py +++ b/permify/models/data_change.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,13 +18,16 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel from permify.models.attribute import Attribute from permify.models.data_change_operation import DataChangeOperation from permify.models.tuple import Tuple -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class DataChange(BaseModel): """ @@ -35,11 +38,11 @@ class DataChange(BaseModel): attribute: Optional[Attribute] = None __properties: ClassVar[List[str]] = ["operation", "tuple", "attribute"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -52,7 +55,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of DataChange from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,12 +69,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of tuple @@ -83,7 +84,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of DataChange from a dict""" if obj is None: return None @@ -93,8 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "operation": obj.get("operation"), - "tuple": Tuple.from_dict(obj["tuple"]) if obj.get("tuple") is not None else None, - "attribute": Attribute.from_dict(obj["attribute"]) if obj.get("attribute") is not None else None + "tuple": Tuple.from_dict(obj.get("tuple")) if obj.get("tuple") is not None else None, + "attribute": Attribute.from_dict(obj.get("attribute")) if obj.get("attribute") is not None else None }) return _obj diff --git a/permify/models/data_change_operation.py b/permify/models/data_change_operation.py index adcc35f..b422e48 100644 --- a/permify/models/data_change_operation.py +++ b/permify/models/data_change_operation.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -15,8 +15,16 @@ from __future__ import annotations import json +import pprint +import re # noqa: F401 from enum import Enum -from typing_extensions import Self + + + +try: + from typing import Self +except ImportError: + from typing_extensions import Self class DataChangeOperation(str, Enum): diff --git a/permify/models/data_changes.py b/permify/models/data_changes.py index ea6f0e7..9832eaa 100644 --- a/permify/models/data_changes.py +++ b/permify/models/data_changes.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictStr +from pydantic import Field from permify.models.data_change import DataChange -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class DataChanges(BaseModel): """ @@ -32,11 +36,11 @@ class DataChanges(BaseModel): data_changes: Optional[List[DataChange]] = Field(default=None, description="The list of data changes.") __properties: ClassVar[List[str]] = ["snap_token", "data_changes"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -49,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of DataChanges from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,25 +67,23 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data_changes (list) _items = [] if self.data_changes: - for _item_data_changes in self.data_changes: - if _item_data_changes: - _items.append(_item_data_changes.to_dict()) + for _item in self.data_changes: + if _item: + _items.append(_item.to_dict()) _dict['data_changes'] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of DataChanges from a dict""" if obj is None: return None @@ -91,7 +93,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "snap_token": obj.get("snap_token"), - "data_changes": [DataChange.from_dict(_item) for _item in obj["data_changes"]] if obj.get("data_changes") is not None else None + "data_changes": [DataChange.from_dict(_item) for _item in obj.get("data_changes")] if obj.get("data_changes") is not None else None }) return _obj diff --git a/permify/models/data_delete_body.py b/permify/models/data_delete_body.py index f37fc70..6b2cd01 100644 --- a/permify/models/data_delete_body.py +++ b/permify/models/data_delete_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,12 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel from permify.models.attribute_filter import AttributeFilter from permify.models.tuple_filter import TupleFilter -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class DataDeleteBody(BaseModel): """ @@ -33,11 +36,11 @@ class DataDeleteBody(BaseModel): attribute_filter: Optional[AttributeFilter] = None __properties: ClassVar[List[str]] = ["tuple_filter", "attribute_filter"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -50,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of DataDeleteBody from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,12 +67,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of tuple_filter @@ -81,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of DataDeleteBody from a dict""" if obj is None: return None @@ -90,8 +91,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "tuple_filter": TupleFilter.from_dict(obj["tuple_filter"]) if obj.get("tuple_filter") is not None else None, - "attribute_filter": AttributeFilter.from_dict(obj["attribute_filter"]) if obj.get("attribute_filter") is not None else None + "tuple_filter": TupleFilter.from_dict(obj.get("tuple_filter")) if obj.get("tuple_filter") is not None else None, + "attribute_filter": AttributeFilter.from_dict(obj.get("attribute_filter")) if obj.get("attribute_filter") is not None else None }) return _obj diff --git a/permify/models/data_delete_response.py b/permify/models/data_delete_response.py index 017ebd3..aa3f478 100644 --- a/permify/models/data_delete_response.py +++ b/permify/models/data_delete_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class DataDeleteResponse(BaseModel): """ @@ -30,11 +34,11 @@ class DataDeleteResponse(BaseModel): snap_token: Optional[StrictStr] = Field(default=None, description="The snap token to avoid stale cache, see more details on [Snap Tokens](../../operations/snap-tokens)") __properties: ClassVar[List[str]] = ["snap_token"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -47,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of DataDeleteResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,18 +65,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of DataDeleteResponse from a dict""" if obj is None: return None diff --git a/permify/models/data_write_body.py b/permify/models/data_write_body.py index 89ddec6..2cc78bd 100644 --- a/permify/models/data_write_body.py +++ b/permify/models/data_write_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,13 +18,17 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel +from pydantic import Field from permify.models.attribute import Attribute from permify.models.data_write_request_metadata import DataWriteRequestMetadata from permify.models.tuple import Tuple -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class DataWriteBody(BaseModel): """ @@ -35,11 +39,11 @@ class DataWriteBody(BaseModel): attributes: Optional[List[Attribute]] = Field(default=None, description="attributes contains the list of attributes (entity-attribute-value triples) that need to be written.") __properties: ClassVar[List[str]] = ["metadata", "tuples", "attributes"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -52,7 +56,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of DataWriteBody from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,12 +70,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of metadata @@ -80,21 +82,21 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in tuples (list) _items = [] if self.tuples: - for _item_tuples in self.tuples: - if _item_tuples: - _items.append(_item_tuples.to_dict()) + for _item in self.tuples: + if _item: + _items.append(_item.to_dict()) _dict['tuples'] = _items # override the default output from pydantic by calling `to_dict()` of each item in attributes (list) _items = [] if self.attributes: - for _item_attributes in self.attributes: - if _item_attributes: - _items.append(_item_attributes.to_dict()) + for _item in self.attributes: + if _item: + _items.append(_item.to_dict()) _dict['attributes'] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of DataWriteBody from a dict""" if obj is None: return None @@ -103,9 +105,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "metadata": DataWriteRequestMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, - "tuples": [Tuple.from_dict(_item) for _item in obj["tuples"]] if obj.get("tuples") is not None else None, - "attributes": [Attribute.from_dict(_item) for _item in obj["attributes"]] if obj.get("attributes") is not None else None + "metadata": DataWriteRequestMetadata.from_dict(obj.get("metadata")) if obj.get("metadata") is not None else None, + "tuples": [Tuple.from_dict(_item) for _item in obj.get("tuples")] if obj.get("tuples") is not None else None, + "attributes": [Attribute.from_dict(_item) for _item in obj.get("attributes")] if obj.get("attributes") is not None else None }) return _obj diff --git a/permify/models/data_write_request_metadata.py b/permify/models/data_write_request_metadata.py index 946ed55..cfd867e 100644 --- a/permify/models/data_write_request_metadata.py +++ b/permify/models/data_write_request_metadata.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class DataWriteRequestMetadata(BaseModel): """ @@ -30,11 +34,11 @@ class DataWriteRequestMetadata(BaseModel): schema_version: Optional[StrictStr] = Field(default=None, description="schema_version represents the version of the schema for the data being written.") __properties: ClassVar[List[str]] = ["schema_version"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -47,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of DataWriteRequestMetadata from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,18 +65,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of DataWriteRequestMetadata from a dict""" if obj is None: return None diff --git a/permify/models/data_write_response.py b/permify/models/data_write_response.py index bb9b855..dfe76ab 100644 --- a/permify/models/data_write_response.py +++ b/permify/models/data_write_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class DataWriteResponse(BaseModel): """ @@ -30,11 +34,11 @@ class DataWriteResponse(BaseModel): snap_token: Optional[StrictStr] = Field(default=None, description="The snap token to avoid stale cache, see more details on [Snap Tokens](../../operations/snap-tokens).") __properties: ClassVar[List[str]] = ["snap_token"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -47,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of DataWriteResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,18 +65,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of DataWriteResponse from a dict""" if obj is None: return None diff --git a/permify/models/delete_relationships_body.py b/permify/models/delete_relationships_body.py index 5d7438b..5cb6361 100644 --- a/permify/models/delete_relationships_body.py +++ b/permify/models/delete_relationships_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel from permify.models.tuple_filter import TupleFilter -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class DeleteRelationshipsBody(BaseModel): """ @@ -31,11 +34,11 @@ class DeleteRelationshipsBody(BaseModel): filter: Optional[TupleFilter] = None __properties: ClassVar[List[str]] = ["filter"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of DeleteRelationshipsBody from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,12 +65,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of filter @@ -76,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of DeleteRelationshipsBody from a dict""" if obj is None: return None @@ -85,7 +86,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "filter": TupleFilter.from_dict(obj["filter"]) if obj.get("filter") is not None else None + "filter": TupleFilter.from_dict(obj.get("filter")) if obj.get("filter") is not None else None }) return _obj diff --git a/permify/models/entity.py b/permify/models/entity.py index b53b44c..d4fda7c 100644 --- a/permify/models/entity.py +++ b/permify/models/entity.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,13 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +try: + from typing import Self +except ImportError: + from typing_extensions import Self class Entity(BaseModel): """ @@ -31,11 +34,11 @@ class Entity(BaseModel): id: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["type", "id"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of Entity from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,18 +65,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of Entity from a dict""" if obj is None: return None diff --git a/permify/models/entity_definition.py b/permify/models/entity_definition.py index 1de12d9..243f6ef 100644 --- a/permify/models/entity_definition.py +++ b/permify/models/entity_definition.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,14 +18,18 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictStr +from pydantic import Field from permify.models.attribute_definition import AttributeDefinition from permify.models.entity_definition_reference import EntityDefinitionReference from permify.models.permission_definition import PermissionDefinition from permify.models.relation_definition import RelationDefinition -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class EntityDefinition(BaseModel): """ @@ -38,11 +42,11 @@ class EntityDefinition(BaseModel): references: Optional[Dict[str, EntityDefinitionReference]] = Field(default=None, description="Map of references indicating whether a string pertains to a relation, permission, or attribute.") __properties: ClassVar[List[str]] = ["name", "relations", "permissions", "attributes", "references"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -55,7 +59,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of EntityDefinition from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,39 +73,37 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each value in relations (dict) _field_dict = {} if self.relations: - for _key_relations in self.relations: - if self.relations[_key_relations]: - _field_dict[_key_relations] = self.relations[_key_relations].to_dict() + for _key in self.relations: + if self.relations[_key]: + _field_dict[_key] = self.relations[_key].to_dict() _dict['relations'] = _field_dict # override the default output from pydantic by calling `to_dict()` of each value in permissions (dict) _field_dict = {} if self.permissions: - for _key_permissions in self.permissions: - if self.permissions[_key_permissions]: - _field_dict[_key_permissions] = self.permissions[_key_permissions].to_dict() + for _key in self.permissions: + if self.permissions[_key]: + _field_dict[_key] = self.permissions[_key].to_dict() _dict['permissions'] = _field_dict # override the default output from pydantic by calling `to_dict()` of each value in attributes (dict) _field_dict = {} if self.attributes: - for _key_attributes in self.attributes: - if self.attributes[_key_attributes]: - _field_dict[_key_attributes] = self.attributes[_key_attributes].to_dict() + for _key in self.attributes: + if self.attributes[_key]: + _field_dict[_key] = self.attributes[_key].to_dict() _dict['attributes'] = _field_dict return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of EntityDefinition from a dict""" if obj is None: return None @@ -113,19 +115,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "name": obj.get("name"), "relations": dict( (_k, RelationDefinition.from_dict(_v)) - for _k, _v in obj["relations"].items() + for _k, _v in obj.get("relations").items() ) if obj.get("relations") is not None else None, "permissions": dict( (_k, PermissionDefinition.from_dict(_v)) - for _k, _v in obj["permissions"].items() + for _k, _v in obj.get("permissions").items() ) if obj.get("permissions") is not None else None, "attributes": dict( (_k, AttributeDefinition.from_dict(_v)) - for _k, _v in obj["attributes"].items() + for _k, _v in obj.get("attributes").items() ) if obj.get("attributes") is not None else None, diff --git a/permify/models/entity_definition_reference.py b/permify/models/entity_definition_reference.py index 4a4cdb1..c347a95 100644 --- a/permify/models/entity_definition_reference.py +++ b/permify/models/entity_definition_reference.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -15,8 +15,16 @@ from __future__ import annotations import json +import pprint +import re # noqa: F401 from enum import Enum -from typing_extensions import Self + + + +try: + from typing import Self +except ImportError: + from typing_extensions import Self class EntityDefinitionReference(str, Enum): diff --git a/permify/models/entity_filter.py b/permify/models/entity_filter.py index eac4366..0f779b5 100644 --- a/permify/models/entity_filter.py +++ b/permify/models/entity_filter.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,13 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +try: + from typing import Self +except ImportError: + from typing_extensions import Self class EntityFilter(BaseModel): """ @@ -31,11 +34,11 @@ class EntityFilter(BaseModel): ids: Optional[List[StrictStr]] = None __properties: ClassVar[List[str]] = ["type", "ids"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of EntityFilter from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,18 +65,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of EntityFilter from a dict""" if obj is None: return None diff --git a/permify/models/entry.py b/permify/models/entry.py index 02fa418..5988279 100644 --- a/permify/models/entry.py +++ b/permify/models/entry.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class Entry(BaseModel): """ @@ -34,11 +38,11 @@ class Entry(BaseModel): optional_entry: Optional[StrictBool] = Field(default=None, description="Whether the key-value pair is optional.", alias="optionalEntry") __properties: ClassVar[List[str]] = ["id", "fieldKey", "mapKey", "value", "optionalEntry"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -51,7 +55,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of Entry from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,12 +69,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of map_key @@ -82,7 +84,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of Entry from a dict""" if obj is None: return None @@ -93,8 +95,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "fieldKey": obj.get("fieldKey"), - "mapKey": Expr.from_dict(obj["mapKey"]) if obj.get("mapKey") is not None else None, - "value": Expr.from_dict(obj["value"]) if obj.get("value") is not None else None, + "mapKey": Expr.from_dict(obj.get("mapKey")) if obj.get("mapKey") is not None else None, + "value": Expr.from_dict(obj.get("value")) if obj.get("value") is not None else None, "optionalEntry": obj.get("optionalEntry") }) return _obj diff --git a/permify/models/expand_leaf.py b/permify/models/expand_leaf.py index 3e2a5f4..6ea8b97 100644 --- a/permify/models/expand_leaf.py +++ b/permify/models/expand_leaf.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,13 +18,16 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel from permify.models.any import Any from permify.models.subjects import Subjects from permify.models.values import Values -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class ExpandLeaf(BaseModel): """ @@ -35,11 +38,11 @@ class ExpandLeaf(BaseModel): value: Optional[Any] = None __properties: ClassVar[List[str]] = ["subjects", "values", "value"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -52,7 +55,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of ExpandLeaf from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,12 +69,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of subjects @@ -86,7 +87,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of ExpandLeaf from a dict""" if obj is None: return None @@ -95,9 +96,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "subjects": Subjects.from_dict(obj["subjects"]) if obj.get("subjects") is not None else None, - "values": Values.from_dict(obj["values"]) if obj.get("values") is not None else None, - "value": Any.from_dict(obj["value"]) if obj.get("value") is not None else None + "subjects": Subjects.from_dict(obj.get("subjects")) if obj.get("subjects") is not None else None, + "values": Values.from_dict(obj.get("values")) if obj.get("values") is not None else None, + "value": Any.from_dict(obj.get("value")) if obj.get("value") is not None else None }) return _obj diff --git a/permify/models/expand_tree_node.py b/permify/models/expand_tree_node.py index bc56e74..5436587 100644 --- a/permify/models/expand_tree_node.py +++ b/permify/models/expand_tree_node.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel from permify.models.expand_tree_node_operation import ExpandTreeNodeOperation -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class ExpandTreeNode(BaseModel): """ @@ -32,11 +35,11 @@ class ExpandTreeNode(BaseModel): children: Optional[List[V1Expand]] = None __properties: ClassVar[List[str]] = ["operation", "children"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -49,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of ExpandTreeNode from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,25 +66,23 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in children (list) _items = [] if self.children: - for _item_children in self.children: - if _item_children: - _items.append(_item_children.to_dict()) + for _item in self.children: + if _item: + _items.append(_item.to_dict()) _dict['children'] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of ExpandTreeNode from a dict""" if obj is None: return None @@ -91,7 +92,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "operation": obj.get("operation"), - "children": [V1Expand.from_dict(_item) for _item in obj["children"]] if obj.get("children") is not None else None + "children": [V1Expand.from_dict(_item) for _item in obj.get("children")] if obj.get("children") is not None else None }) return _obj diff --git a/permify/models/expand_tree_node_operation.py b/permify/models/expand_tree_node_operation.py index 58932f9..5a2aee1 100644 --- a/permify/models/expand_tree_node_operation.py +++ b/permify/models/expand_tree_node_operation.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -15,8 +15,16 @@ from __future__ import annotations import json +import pprint +import re # noqa: F401 from enum import Enum -from typing_extensions import Self + + + +try: + from typing import Self +except ImportError: + from typing_extensions import Self class ExpandTreeNodeOperation(str, Enum): diff --git a/permify/models/expr.py b/permify/models/expr.py index 5599008..ebb8d7e 100644 --- a/permify/models/expr.py +++ b/permify/models/expr.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,12 +18,16 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictStr +from pydantic import Field from permify.models.constant import Constant from permify.models.ident import Ident -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class Expr(BaseModel): """ @@ -39,11 +43,11 @@ class Expr(BaseModel): comprehension_expr: Optional[Comprehension] = Field(default=None, alias="comprehensionExpr") __properties: ClassVar[List[str]] = ["id", "constExpr", "identExpr", "selectExpr", "callExpr", "listExpr", "structExpr", "comprehensionExpr"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -56,7 +60,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of Expr from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,12 +74,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of const_expr @@ -102,7 +104,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of Expr from a dict""" if obj is None: return None @@ -112,13 +114,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), - "constExpr": Constant.from_dict(obj["constExpr"]) if obj.get("constExpr") is not None else None, - "identExpr": Ident.from_dict(obj["identExpr"]) if obj.get("identExpr") is not None else None, - "selectExpr": Select.from_dict(obj["selectExpr"]) if obj.get("selectExpr") is not None else None, - "callExpr": ExprCall.from_dict(obj["callExpr"]) if obj.get("callExpr") is not None else None, - "listExpr": CreateList.from_dict(obj["listExpr"]) if obj.get("listExpr") is not None else None, - "structExpr": CreateStruct.from_dict(obj["structExpr"]) if obj.get("structExpr") is not None else None, - "comprehensionExpr": Comprehension.from_dict(obj["comprehensionExpr"]) if obj.get("comprehensionExpr") is not None else None + "constExpr": Constant.from_dict(obj.get("constExpr")) if obj.get("constExpr") is not None else None, + "identExpr": Ident.from_dict(obj.get("identExpr")) if obj.get("identExpr") is not None else None, + "selectExpr": Select.from_dict(obj.get("selectExpr")) if obj.get("selectExpr") is not None else None, + "callExpr": ExprCall.from_dict(obj.get("callExpr")) if obj.get("callExpr") is not None else None, + "listExpr": CreateList.from_dict(obj.get("listExpr")) if obj.get("listExpr") is not None else None, + "structExpr": CreateStruct.from_dict(obj.get("structExpr")) if obj.get("structExpr") is not None else None, + "comprehensionExpr": Comprehension.from_dict(obj.get("comprehensionExpr")) if obj.get("comprehensionExpr") is not None else None }) return _obj diff --git a/permify/models/expr_call.py b/permify/models/expr_call.py index 243d599..2660eca 100644 --- a/permify/models/expr_call.py +++ b/permify/models/expr_call.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class ExprCall(BaseModel): """ @@ -32,11 +36,11 @@ class ExprCall(BaseModel): args: Optional[List[Expr]] = Field(default=None, description="The arguments.") __properties: ClassVar[List[str]] = ["target", "function", "args"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -49,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of ExprCall from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,12 +67,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of target @@ -77,14 +79,14 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in args (list) _items = [] if self.args: - for _item_args in self.args: - if _item_args: - _items.append(_item_args.to_dict()) + for _item in self.args: + if _item: + _items.append(_item.to_dict()) _dict['args'] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of ExprCall from a dict""" if obj is None: return None @@ -93,9 +95,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "target": Expr.from_dict(obj["target"]) if obj.get("target") is not None else None, + "target": Expr.from_dict(obj.get("target")) if obj.get("target") is not None else None, "function": obj.get("function"), - "args": [Expr.from_dict(_item) for _item in obj["args"]] if obj.get("args") is not None else None + "args": [Expr.from_dict(_item) for _item in obj.get("args")] if obj.get("args") is not None else None }) return _obj diff --git a/permify/models/function_type.py b/permify/models/function_type.py index 700f39e..2571f86 100644 --- a/permify/models/function_type.py +++ b/permify/models/function_type.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class FunctionType(BaseModel): """ @@ -31,11 +35,11 @@ class FunctionType(BaseModel): arg_types: Optional[List[V1alpha1Type]] = Field(default=None, description="Argument types of the function.", alias="argTypes") __properties: ClassVar[List[str]] = ["resultType", "argTypes"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of FunctionType from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,12 +66,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of result_type @@ -76,14 +78,14 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in arg_types (list) _items = [] if self.arg_types: - for _item_arg_types in self.arg_types: - if _item_arg_types: - _items.append(_item_arg_types.to_dict()) + for _item in self.arg_types: + if _item: + _items.append(_item.to_dict()) _dict['argTypes'] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of FunctionType from a dict""" if obj is None: return None @@ -92,8 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "resultType": V1alpha1Type.from_dict(obj["resultType"]) if obj.get("resultType") is not None else None, - "argTypes": [V1alpha1Type.from_dict(_item) for _item in obj["argTypes"]] if obj.get("argTypes") is not None else None + "resultType": V1alpha1Type.from_dict(obj.get("resultType")) if obj.get("resultType") is not None else None, + "argTypes": [V1alpha1Type.from_dict(_item) for _item in obj.get("argTypes")] if obj.get("argTypes") is not None else None }) return _obj diff --git a/permify/models/health_response.py b/permify/models/health_response.py deleted file mode 100644 index 3b79cf9..0000000 --- a/permify/models/health_response.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Permify API - - Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - - The version of the OpenAPI document: v1.1.1 - Contact: hello@permify.co - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class HealthResponse(BaseModel): - """ - HealthResponse - """ # noqa: E501 - status: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["status"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of HealthResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of HealthResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "status": obj.get("status") - }) - return _obj - - diff --git a/permify/models/ident.py b/permify/models/ident.py index 95c6e78..531536c 100644 --- a/permify/models/ident.py +++ b/permify/models/ident.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class Ident(BaseModel): """ @@ -30,11 +34,11 @@ class Ident(BaseModel): name: Optional[StrictStr] = Field(default=None, description="Required. Holds a single, unqualified identifier, possibly preceded by a '.'. Qualified names are represented by the [Expr.Select][google.api.expr.v1alpha1.Expr.Select] expression.") __properties: ClassVar[List[str]] = ["name"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -47,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of Ident from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,18 +65,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of Ident from a dict""" if obj is None: return None diff --git a/permify/models/leaf.py b/permify/models/leaf.py index fd66407..072a873 100644 --- a/permify/models/leaf.py +++ b/permify/models/leaf.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,14 +18,18 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel +from pydantic import Field from permify.models.computed_attribute import ComputedAttribute from permify.models.computed_user_set import ComputedUserSet from permify.models.tuple_to_user_set import TupleToUserSet from permify.models.v1_call import V1Call -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class Leaf(BaseModel): """ @@ -37,11 +41,11 @@ class Leaf(BaseModel): call: Optional[V1Call] = None __properties: ClassVar[List[str]] = ["computedUserSet", "tupleToUserSet", "computedAttribute", "call"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -54,7 +58,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of Leaf from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -68,12 +72,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of computed_user_set @@ -91,7 +93,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of Leaf from a dict""" if obj is None: return None @@ -100,10 +102,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "computedUserSet": ComputedUserSet.from_dict(obj["computedUserSet"]) if obj.get("computedUserSet") is not None else None, - "tupleToUserSet": TupleToUserSet.from_dict(obj["tupleToUserSet"]) if obj.get("tupleToUserSet") is not None else None, - "computedAttribute": ComputedAttribute.from_dict(obj["computedAttribute"]) if obj.get("computedAttribute") is not None else None, - "call": V1Call.from_dict(obj["call"]) if obj.get("call") is not None else None + "computedUserSet": ComputedUserSet.from_dict(obj.get("computedUserSet")) if obj.get("computedUserSet") is not None else None, + "tupleToUserSet": TupleToUserSet.from_dict(obj.get("tupleToUserSet")) if obj.get("tupleToUserSet") is not None else None, + "computedAttribute": ComputedAttribute.from_dict(obj.get("computedAttribute")) if obj.get("computedAttribute") is not None else None, + "call": V1Call.from_dict(obj.get("call")) if obj.get("call") is not None else None }) return _obj diff --git a/permify/models/list_type.py b/permify/models/list_type.py index a7a4842..5da1508 100644 --- a/permify/models/list_type.py +++ b/permify/models/list_type.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class ListType(BaseModel): """ @@ -30,11 +34,11 @@ class ListType(BaseModel): elem_type: Optional[V1alpha1Type] = Field(default=None, alias="elemType") __properties: ClassVar[List[str]] = ["elemType"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -47,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of ListType from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,12 +65,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of elem_type @@ -75,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of ListType from a dict""" if obj is None: return None @@ -84,7 +86,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "elemType": V1alpha1Type.from_dict(obj["elemType"]) if obj.get("elemType") is not None else None + "elemType": V1alpha1Type.from_dict(obj.get("elemType")) if obj.get("elemType") is not None else None }) return _obj diff --git a/permify/models/lookup_entity_body.py b/permify/models/lookup_entity_body.py index fabb097..cb9282f 100644 --- a/permify/models/lookup_entity_body.py +++ b/permify/models/lookup_entity_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,14 +18,18 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import Field from permify.models.context import Context from permify.models.permission_lookup_entity_request_metadata import PermissionLookupEntityRequestMetadata from permify.models.string_array_value import StringArrayValue from permify.models.subject import Subject -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class LookupEntityBody(BaseModel): """ @@ -41,11 +45,11 @@ class LookupEntityBody(BaseModel): continuous_token: Optional[StrictStr] = Field(default=None, description="continuous_token is an optional parameter used for pagination. It should be the value received in the previous response.") __properties: ClassVar[List[str]] = ["metadata", "entity_type", "permission", "subject", "context", "scope", "page_size", "continuous_token"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -58,7 +62,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of LookupEntityBody from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,12 +76,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of metadata @@ -92,14 +94,14 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each value in scope (dict) _field_dict = {} if self.scope: - for _key_scope in self.scope: - if self.scope[_key_scope]: - _field_dict[_key_scope] = self.scope[_key_scope].to_dict() + for _key in self.scope: + if self.scope[_key]: + _field_dict[_key] = self.scope[_key].to_dict() _dict['scope'] = _field_dict return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of LookupEntityBody from a dict""" if obj is None: return None @@ -108,14 +110,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "metadata": PermissionLookupEntityRequestMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "metadata": PermissionLookupEntityRequestMetadata.from_dict(obj.get("metadata")) if obj.get("metadata") is not None else None, "entity_type": obj.get("entity_type"), "permission": obj.get("permission"), - "subject": Subject.from_dict(obj["subject"]) if obj.get("subject") is not None else None, - "context": Context.from_dict(obj["context"]) if obj.get("context") is not None else None, + "subject": Subject.from_dict(obj.get("subject")) if obj.get("subject") is not None else None, + "context": Context.from_dict(obj.get("context")) if obj.get("context") is not None else None, "scope": dict( (_k, StringArrayValue.from_dict(_v)) - for _k, _v in obj["scope"].items() + for _k, _v in obj.get("scope").items() ) if obj.get("scope") is not None else None, diff --git a/permify/models/lookup_entity_stream_body.py b/permify/models/lookup_entity_stream_body.py index 0b07c4b..ca20469 100644 --- a/permify/models/lookup_entity_stream_body.py +++ b/permify/models/lookup_entity_stream_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,14 +18,18 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import Field from permify.models.context import Context from permify.models.permission_lookup_entity_request_metadata import PermissionLookupEntityRequestMetadata from permify.models.string_array_value import StringArrayValue from permify.models.subject import Subject -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class LookupEntityStreamBody(BaseModel): """ @@ -41,11 +45,11 @@ class LookupEntityStreamBody(BaseModel): continuous_token: Optional[StrictStr] = Field(default=None, description="continuous_token is an optional parameter used for pagination. It should be the value received in the previous response.") __properties: ClassVar[List[str]] = ["metadata", "entity_type", "permission", "subject", "context", "scope", "page_size", "continuous_token"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -58,7 +62,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of LookupEntityStreamBody from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,12 +76,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of metadata @@ -92,14 +94,14 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each value in scope (dict) _field_dict = {} if self.scope: - for _key_scope in self.scope: - if self.scope[_key_scope]: - _field_dict[_key_scope] = self.scope[_key_scope].to_dict() + for _key in self.scope: + if self.scope[_key]: + _field_dict[_key] = self.scope[_key].to_dict() _dict['scope'] = _field_dict return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of LookupEntityStreamBody from a dict""" if obj is None: return None @@ -108,14 +110,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "metadata": PermissionLookupEntityRequestMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "metadata": PermissionLookupEntityRequestMetadata.from_dict(obj.get("metadata")) if obj.get("metadata") is not None else None, "entity_type": obj.get("entity_type"), "permission": obj.get("permission"), - "subject": Subject.from_dict(obj["subject"]) if obj.get("subject") is not None else None, - "context": Context.from_dict(obj["context"]) if obj.get("context") is not None else None, + "subject": Subject.from_dict(obj.get("subject")) if obj.get("subject") is not None else None, + "context": Context.from_dict(obj.get("context")) if obj.get("context") is not None else None, "scope": dict( (_k, StringArrayValue.from_dict(_v)) - for _k, _v in obj["scope"].items() + for _k, _v in obj.get("scope").items() ) if obj.get("scope") is not None else None, diff --git a/permify/models/lookup_subject_body.py b/permify/models/lookup_subject_body.py index 4bf377e..c1394cf 100644 --- a/permify/models/lookup_subject_body.py +++ b/permify/models/lookup_subject_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,14 +18,19 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import Field +from permify.models.argument import Argument from permify.models.context import Context from permify.models.entity import Entity from permify.models.permission_lookup_subject_request_metadata import PermissionLookupSubjectRequestMetadata from permify.models.relation_reference import RelationReference -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class LookupSubjectBody(BaseModel): """ @@ -36,15 +41,16 @@ class LookupSubjectBody(BaseModel): permission: Optional[StrictStr] = Field(default=None, description="Permission to be checked, can be a permission or relation. Required, and must match the pattern \"^([a-zA-Z][a-zA-Z0-9_]{1,62}[a-zA-Z0-9])$\", max 64 bytes.") subject_reference: Optional[RelationReference] = None context: Optional[Context] = None + arguments: Optional[List[Argument]] = Field(default=None, description="Additional arguments associated with this request.") page_size: Optional[StrictInt] = Field(default=None, description="page_size is the number of subjects to be returned in the response. The value should be between 1 and 100.") continuous_token: Optional[StrictStr] = Field(default=None, description="continuous_token is an optional parameter used for pagination. It should be the value received in the previous response.") - __properties: ClassVar[List[str]] = ["metadata", "entity", "permission", "subject_reference", "context", "page_size", "continuous_token"] + __properties: ClassVar[List[str]] = ["metadata", "entity", "permission", "subject_reference", "context", "arguments", "page_size", "continuous_token"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -57,7 +63,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of LookupSubjectBody from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -71,12 +77,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of metadata @@ -91,10 +95,17 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of context if self.context: _dict['context'] = self.context.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in arguments (list) + _items = [] + if self.arguments: + for _item in self.arguments: + if _item: + _items.append(_item.to_dict()) + _dict['arguments'] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of LookupSubjectBody from a dict""" if obj is None: return None @@ -103,11 +114,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "metadata": PermissionLookupSubjectRequestMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, - "entity": Entity.from_dict(obj["entity"]) if obj.get("entity") is not None else None, + "metadata": PermissionLookupSubjectRequestMetadata.from_dict(obj.get("metadata")) if obj.get("metadata") is not None else None, + "entity": Entity.from_dict(obj.get("entity")) if obj.get("entity") is not None else None, "permission": obj.get("permission"), - "subject_reference": RelationReference.from_dict(obj["subject_reference"]) if obj.get("subject_reference") is not None else None, - "context": Context.from_dict(obj["context"]) if obj.get("context") is not None else None, + "subject_reference": RelationReference.from_dict(obj.get("subject_reference")) if obj.get("subject_reference") is not None else None, + "context": Context.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "arguments": [Argument.from_dict(_item) for _item in obj.get("arguments")] if obj.get("arguments") is not None else None, "page_size": obj.get("page_size"), "continuous_token": obj.get("continuous_token") }) diff --git a/permify/models/map_type.py b/permify/models/map_type.py index cd362f5..6508855 100644 --- a/permify/models/map_type.py +++ b/permify/models/map_type.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class MapType(BaseModel): """ @@ -31,11 +35,11 @@ class MapType(BaseModel): value_type: Optional[V1alpha1Type] = Field(default=None, alias="valueType") __properties: ClassVar[List[str]] = ["keyType", "valueType"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of MapType from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,12 +66,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of key_type @@ -79,7 +81,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of MapType from a dict""" if obj is None: return None @@ -88,8 +90,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "keyType": V1alpha1Type.from_dict(obj["keyType"]) if obj.get("keyType") is not None else None, - "valueType": V1alpha1Type.from_dict(obj["valueType"]) if obj.get("valueType") is not None else None + "keyType": V1alpha1Type.from_dict(obj.get("keyType")) if obj.get("keyType") is not None else None, + "valueType": V1alpha1Type.from_dict(obj.get("valueType")) if obj.get("valueType") is not None else None }) return _obj diff --git a/permify/models/partial_write_body.py b/permify/models/partial_write_body.py index fd7f7b2..5f58e2e 100644 --- a/permify/models/partial_write_body.py +++ b/permify/models/partial_write_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,12 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel from permify.models.partials import Partials from permify.models.schema_partial_write_request_metadata import SchemaPartialWriteRequestMetadata -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class PartialWriteBody(BaseModel): """ @@ -33,11 +36,11 @@ class PartialWriteBody(BaseModel): partials: Optional[Dict[str, Partials]] = None __properties: ClassVar[List[str]] = ["metadata", "partials"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -50,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of PartialWriteBody from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,12 +67,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of metadata @@ -78,14 +79,14 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each value in partials (dict) _field_dict = {} if self.partials: - for _key_partials in self.partials: - if self.partials[_key_partials]: - _field_dict[_key_partials] = self.partials[_key_partials].to_dict() + for _key in self.partials: + if self.partials[_key]: + _field_dict[_key] = self.partials[_key].to_dict() _dict['partials'] = _field_dict return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of PartialWriteBody from a dict""" if obj is None: return None @@ -94,10 +95,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "metadata": SchemaPartialWriteRequestMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "metadata": SchemaPartialWriteRequestMetadata.from_dict(obj.get("metadata")) if obj.get("metadata") is not None else None, "partials": dict( (_k, Partials.from_dict(_v)) - for _k, _v in obj["partials"].items() + for _k, _v in obj.get("partials").items() ) if obj.get("partials") is not None else None diff --git a/permify/models/partials.py b/permify/models/partials.py index 823b7e5..b5a32f6 100644 --- a/permify/models/partials.py +++ b/permify/models/partials.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,13 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +try: + from typing import Self +except ImportError: + from typing_extensions import Self class Partials(BaseModel): """ @@ -32,11 +35,11 @@ class Partials(BaseModel): update: Optional[List[StrictStr]] = None __properties: ClassVar[List[str]] = ["write", "delete", "update"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -49,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of Partials from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,18 +66,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of Partials from a dict""" if obj is None: return None diff --git a/permify/models/permission_check_body.py b/permify/models/permission_check_body.py deleted file mode 100644 index 4dcf24e..0000000 --- a/permify/models/permission_check_body.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding: utf-8 - -""" - Permify API - - Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - - The version of the OpenAPI document: v1.1.1 - Contact: hello@permify.co - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from permify.models.argument import Argument -from permify.models.context import Context -from permify.models.entity import Entity -from permify.models.permission_check_request_metadata import PermissionCheckRequestMetadata -from permify.models.subject import Subject -from typing import Optional, Set -from typing_extensions import Self - -class PermissionCheckBody(BaseModel): - """ - PermissionCheckRequest is the request message for the Check method in the Permission service. - """ # noqa: E501 - metadata: Optional[PermissionCheckRequestMetadata] = None - entity: Optional[Entity] = None - permission: Optional[StrictStr] = Field(default=None, description="The action the user wants to perform on the resource") - subject: Optional[Subject] = None - context: Optional[Context] = None - arguments: Optional[List[Argument]] = Field(default=None, description="Additional arguments associated with this request.") - __properties: ClassVar[List[str]] = ["metadata", "entity", "permission", "subject", "context", "arguments"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PermissionCheckBody from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of metadata - if self.metadata: - _dict['metadata'] = self.metadata.to_dict() - # override the default output from pydantic by calling `to_dict()` of entity - if self.entity: - _dict['entity'] = self.entity.to_dict() - # override the default output from pydantic by calling `to_dict()` of subject - if self.subject: - _dict['subject'] = self.subject.to_dict() - # override the default output from pydantic by calling `to_dict()` of context - if self.context: - _dict['context'] = self.context.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in arguments (list) - _items = [] - if self.arguments: - for _item_arguments in self.arguments: - if _item_arguments: - _items.append(_item_arguments.to_dict()) - _dict['arguments'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PermissionCheckBody from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "metadata": PermissionCheckRequestMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, - "entity": Entity.from_dict(obj["entity"]) if obj.get("entity") is not None else None, - "permission": obj.get("permission"), - "subject": Subject.from_dict(obj["subject"]) if obj.get("subject") is not None else None, - "context": Context.from_dict(obj["context"]) if obj.get("context") is not None else None, - "arguments": [Argument.from_dict(_item) for _item in obj["arguments"]] if obj.get("arguments") is not None else None - }) - return _obj - - diff --git a/permify/models/permission_check_request_metadata.py b/permify/models/permission_check_request_metadata.py index 17a1349..135ba19 100644 --- a/permify/models/permission_check_request_metadata.py +++ b/permify/models/permission_check_request_metadata.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class PermissionCheckRequestMetadata(BaseModel): """ @@ -32,11 +36,11 @@ class PermissionCheckRequestMetadata(BaseModel): depth: Optional[StrictInt] = Field(default=None, description="Query limit when if recursive database queries got in loop") __properties: ClassVar[List[str]] = ["schema_version", "snap_token", "depth"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -49,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of PermissionCheckRequestMetadata from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,18 +67,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of PermissionCheckRequestMetadata from a dict""" if obj is None: return None diff --git a/permify/models/permission_check_response.py b/permify/models/permission_check_response.py index 99f6f70..1d0acdb 100644 --- a/permify/models/permission_check_response.py +++ b/permify/models/permission_check_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,12 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel from permify.models.check_result import CheckResult from permify.models.permission_check_response_metadata import PermissionCheckResponseMetadata -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class PermissionCheckResponse(BaseModel): """ @@ -33,11 +36,11 @@ class PermissionCheckResponse(BaseModel): metadata: Optional[PermissionCheckResponseMetadata] = None __properties: ClassVar[List[str]] = ["can", "metadata"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -50,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of PermissionCheckResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,12 +67,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of metadata @@ -78,7 +79,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of PermissionCheckResponse from a dict""" if obj is None: return None @@ -88,7 +89,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "can": obj.get("can"), - "metadata": PermissionCheckResponseMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None + "metadata": PermissionCheckResponseMetadata.from_dict(obj.get("metadata")) if obj.get("metadata") is not None else None }) return _obj diff --git a/permify/models/permission_check_response_metadata.py b/permify/models/permission_check_response_metadata.py index 606552a..d7ee3dd 100644 --- a/permify/models/permission_check_response_metadata.py +++ b/permify/models/permission_check_response_metadata.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictInt +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class PermissionCheckResponseMetadata(BaseModel): """ @@ -30,11 +34,11 @@ class PermissionCheckResponseMetadata(BaseModel): check_count: Optional[StrictInt] = Field(default=None, description="The count of the checks performed.") __properties: ClassVar[List[str]] = ["check_count"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -47,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of PermissionCheckResponseMetadata from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,18 +65,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of PermissionCheckResponseMetadata from a dict""" if obj is None: return None diff --git a/permify/models/permission_definition.py b/permify/models/permission_definition.py index a9e7247..c7e65f7 100644 --- a/permify/models/permission_definition.py +++ b/permify/models/permission_definition.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictStr +from pydantic import Field from permify.models.child import Child -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class PermissionDefinition(BaseModel): """ @@ -32,11 +36,11 @@ class PermissionDefinition(BaseModel): child: Optional[Child] = None __properties: ClassVar[List[str]] = ["name", "child"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -49,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of PermissionDefinition from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,12 +67,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of child @@ -77,7 +79,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of PermissionDefinition from a dict""" if obj is None: return None @@ -87,7 +89,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "name": obj.get("name"), - "child": Child.from_dict(obj["child"]) if obj.get("child") is not None else None + "child": Child.from_dict(obj.get("child")) if obj.get("child") is not None else None }) return _obj diff --git a/permify/models/permission_expand_body.py b/permify/models/permission_expand_body.py index bd95699..9c8807b 100644 --- a/permify/models/permission_expand_body.py +++ b/permify/models/permission_expand_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,14 +18,18 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictStr +from pydantic import Field from permify.models.argument import Argument from permify.models.context import Context from permify.models.entity import Entity from permify.models.permission_expand_request_metadata import PermissionExpandRequestMetadata -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class PermissionExpandBody(BaseModel): """ @@ -38,11 +42,11 @@ class PermissionExpandBody(BaseModel): arguments: Optional[List[Argument]] = Field(default=None, description="Additional arguments associated with this request.") __properties: ClassVar[List[str]] = ["metadata", "entity", "permission", "context", "arguments"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -55,7 +59,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of PermissionExpandBody from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,12 +73,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of metadata @@ -89,14 +91,14 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in arguments (list) _items = [] if self.arguments: - for _item_arguments in self.arguments: - if _item_arguments: - _items.append(_item_arguments.to_dict()) + for _item in self.arguments: + if _item: + _items.append(_item.to_dict()) _dict['arguments'] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of PermissionExpandBody from a dict""" if obj is None: return None @@ -105,11 +107,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "metadata": PermissionExpandRequestMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, - "entity": Entity.from_dict(obj["entity"]) if obj.get("entity") is not None else None, + "metadata": PermissionExpandRequestMetadata.from_dict(obj.get("metadata")) if obj.get("metadata") is not None else None, + "entity": Entity.from_dict(obj.get("entity")) if obj.get("entity") is not None else None, "permission": obj.get("permission"), - "context": Context.from_dict(obj["context"]) if obj.get("context") is not None else None, - "arguments": [Argument.from_dict(_item) for _item in obj["arguments"]] if obj.get("arguments") is not None else None + "context": Context.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "arguments": [Argument.from_dict(_item) for _item in obj.get("arguments")] if obj.get("arguments") is not None else None }) return _obj diff --git a/permify/models/permission_expand_request_metadata.py b/permify/models/permission_expand_request_metadata.py index 4c60c84..71e5609 100644 --- a/permify/models/permission_expand_request_metadata.py +++ b/permify/models/permission_expand_request_metadata.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class PermissionExpandRequestMetadata(BaseModel): """ @@ -31,11 +35,11 @@ class PermissionExpandRequestMetadata(BaseModel): snap_token: Optional[StrictStr] = Field(default=None, description="The snap token to avoid stale cache, see more details on [Snap Tokens](../../operations/snap-tokens).") __properties: ClassVar[List[str]] = ["schema_version", "snap_token"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of PermissionExpandRequestMetadata from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,18 +66,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of PermissionExpandRequestMetadata from a dict""" if obj is None: return None diff --git a/permify/models/permission_expand_response.py b/permify/models/permission_expand_response.py index abfcdb3..41e99fd 100644 --- a/permify/models/permission_expand_response.py +++ b/permify/models/permission_expand_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel from permify.models.v1_expand import V1Expand -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class PermissionExpandResponse(BaseModel): """ @@ -31,11 +34,11 @@ class PermissionExpandResponse(BaseModel): tree: Optional[V1Expand] = None __properties: ClassVar[List[str]] = ["tree"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of PermissionExpandResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,12 +65,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of tree @@ -76,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of PermissionExpandResponse from a dict""" if obj is None: return None @@ -85,7 +86,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "tree": V1Expand.from_dict(obj["tree"]) if obj.get("tree") is not None else None + "tree": V1Expand.from_dict(obj.get("tree")) if obj.get("tree") is not None else None }) return _obj diff --git a/permify/models/permission_lookup_entity_request_metadata.py b/permify/models/permission_lookup_entity_request_metadata.py index da3262c..0514ab2 100644 --- a/permify/models/permission_lookup_entity_request_metadata.py +++ b/permify/models/permission_lookup_entity_request_metadata.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class PermissionLookupEntityRequestMetadata(BaseModel): """ @@ -32,11 +36,11 @@ class PermissionLookupEntityRequestMetadata(BaseModel): depth: Optional[StrictInt] = Field(default=None, description="Query limit when if recursive database queries got in loop.") __properties: ClassVar[List[str]] = ["schema_version", "snap_token", "depth"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -49,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of PermissionLookupEntityRequestMetadata from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,18 +67,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of PermissionLookupEntityRequestMetadata from a dict""" if obj is None: return None diff --git a/permify/models/permission_lookup_entity_response.py b/permify/models/permission_lookup_entity_response.py index 3cd8a47..9a21e9d 100644 --- a/permify/models/permission_lookup_entity_response.py +++ b/permify/models/permission_lookup_entity_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class PermissionLookupEntityResponse(BaseModel): """ @@ -31,11 +35,11 @@ class PermissionLookupEntityResponse(BaseModel): continuous_token: Optional[StrictStr] = Field(default=None, description="continuous_token is a string that can be used to paginate and retrieve the next set of results.") __properties: ClassVar[List[str]] = ["entity_ids", "continuous_token"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of PermissionLookupEntityResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,18 +66,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of PermissionLookupEntityResponse from a dict""" if obj is None: return None diff --git a/permify/models/permission_lookup_entity_stream_response.py b/permify/models/permission_lookup_entity_stream_response.py index 0efadb2..ee8b1df 100644 --- a/permify/models/permission_lookup_entity_stream_response.py +++ b/permify/models/permission_lookup_entity_stream_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class PermissionLookupEntityStreamResponse(BaseModel): """ @@ -31,11 +35,11 @@ class PermissionLookupEntityStreamResponse(BaseModel): continuous_token: Optional[StrictStr] = Field(default=None, description="continuous_token is a string that can be used to paginate and retrieve the next set of results.") __properties: ClassVar[List[str]] = ["entity_id", "continuous_token"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of PermissionLookupEntityStreamResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,18 +66,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of PermissionLookupEntityStreamResponse from a dict""" if obj is None: return None diff --git a/permify/models/permission_lookup_subject_request_metadata.py b/permify/models/permission_lookup_subject_request_metadata.py index ff77e30..3992823 100644 --- a/permify/models/permission_lookup_subject_request_metadata.py +++ b/permify/models/permission_lookup_subject_request_metadata.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class PermissionLookupSubjectRequestMetadata(BaseModel): """ @@ -32,11 +36,11 @@ class PermissionLookupSubjectRequestMetadata(BaseModel): depth: Optional[StrictInt] = Field(default=None, description="Query limit when if recursive database queries got in loop.") __properties: ClassVar[List[str]] = ["schema_version", "snap_token", "depth"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -49,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of PermissionLookupSubjectRequestMetadata from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,18 +67,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of PermissionLookupSubjectRequestMetadata from a dict""" if obj is None: return None diff --git a/permify/models/permission_lookup_subject_response.py b/permify/models/permission_lookup_subject_response.py index 036e63c..a01b07a 100644 --- a/permify/models/permission_lookup_subject_response.py +++ b/permify/models/permission_lookup_subject_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class PermissionLookupSubjectResponse(BaseModel): """ @@ -31,11 +35,11 @@ class PermissionLookupSubjectResponse(BaseModel): continuous_token: Optional[StrictStr] = Field(default=None, description="continuous_token is a string that can be used to paginate and retrieve the next set of results.") __properties: ClassVar[List[str]] = ["subject_ids", "continuous_token"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of PermissionLookupSubjectResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,18 +66,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of PermissionLookupSubjectResponse from a dict""" if obj is None: return None diff --git a/permify/models/permission_subject_permission_request_metadata.py b/permify/models/permission_subject_permission_request_metadata.py index dd8c801..c5a9ec1 100644 --- a/permify/models/permission_subject_permission_request_metadata.py +++ b/permify/models/permission_subject_permission_request_metadata.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictBool, StrictInt, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class PermissionSubjectPermissionRequestMetadata(BaseModel): """ @@ -33,11 +37,11 @@ class PermissionSubjectPermissionRequestMetadata(BaseModel): depth: Optional[StrictInt] = Field(default=None, description="Query limit when if recursive database queries got in loop.") __properties: ClassVar[List[str]] = ["schema_version", "snap_token", "only_permission", "depth"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -50,7 +54,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of PermissionSubjectPermissionRequestMetadata from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,18 +68,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of PermissionSubjectPermissionRequestMetadata from a dict""" if obj is None: return None diff --git a/permify/models/permission_subject_permission_response.py b/permify/models/permission_subject_permission_response.py index ff0eeb0..928cc54 100644 --- a/permify/models/permission_subject_permission_response.py +++ b/permify/models/permission_subject_permission_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel +from pydantic import Field from permify.models.check_result import CheckResult -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class PermissionSubjectPermissionResponse(BaseModel): """ @@ -31,11 +35,11 @@ class PermissionSubjectPermissionResponse(BaseModel): results: Optional[Dict[str, CheckResult]] = Field(default=None, description="Map of results for each permission check.") __properties: ClassVar[List[str]] = ["results"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of PermissionSubjectPermissionResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,18 +66,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of PermissionSubjectPermissionResponse from a dict""" if obj is None: return None diff --git a/permify/models/primitive_type.py b/permify/models/primitive_type.py index 659ba89..3049b34 100644 --- a/permify/models/primitive_type.py +++ b/permify/models/primitive_type.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -15,8 +15,16 @@ from __future__ import annotations import json +import pprint +import re # noqa: F401 from enum import Enum -from typing_extensions import Self + + + +try: + from typing import Self +except ImportError: + from typing_extensions import Self class PrimitiveType(str, Enum): diff --git a/permify/models/read_attributes_body.py b/permify/models/read_attributes_body.py index f55b221..47fc535 100644 --- a/permify/models/read_attributes_body.py +++ b/permify/models/read_attributes_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,12 +18,16 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import Field from permify.models.attribute_filter import AttributeFilter from permify.models.attribute_read_request_metadata import AttributeReadRequestMetadata -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class ReadAttributesBody(BaseModel): """ @@ -35,11 +39,11 @@ class ReadAttributesBody(BaseModel): continuous_token: Optional[StrictStr] = Field(default=None, description="continuous_token is used in case of paginated reads to get the next page of results.") __properties: ClassVar[List[str]] = ["metadata", "filter", "page_size", "continuous_token"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -52,7 +56,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of ReadAttributesBody from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,12 +70,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of metadata @@ -83,7 +85,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of ReadAttributesBody from a dict""" if obj is None: return None @@ -92,8 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "metadata": AttributeReadRequestMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, - "filter": AttributeFilter.from_dict(obj["filter"]) if obj.get("filter") is not None else None, + "metadata": AttributeReadRequestMetadata.from_dict(obj.get("metadata")) if obj.get("metadata") is not None else None, + "filter": AttributeFilter.from_dict(obj.get("filter")) if obj.get("filter") is not None else None, "page_size": obj.get("page_size"), "continuous_token": obj.get("continuous_token") }) diff --git a/permify/models/read_relationships_body.py b/permify/models/read_relationships_body.py index 53152d1..3821e6f 100644 --- a/permify/models/read_relationships_body.py +++ b/permify/models/read_relationships_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,12 +18,16 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import Field from permify.models.relationship_read_request_metadata import RelationshipReadRequestMetadata from permify.models.tuple_filter import TupleFilter -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class ReadRelationshipsBody(BaseModel): """ @@ -35,11 +39,11 @@ class ReadRelationshipsBody(BaseModel): continuous_token: Optional[StrictStr] = Field(default=None, description="continuous_token is used in case of paginated reads to get the next page of results.") __properties: ClassVar[List[str]] = ["metadata", "filter", "page_size", "continuous_token"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -52,7 +56,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of ReadRelationshipsBody from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,12 +70,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of metadata @@ -83,7 +85,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of ReadRelationshipsBody from a dict""" if obj is None: return None @@ -92,8 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "metadata": RelationshipReadRequestMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, - "filter": TupleFilter.from_dict(obj["filter"]) if obj.get("filter") is not None else None, + "metadata": RelationshipReadRequestMetadata.from_dict(obj.get("metadata")) if obj.get("metadata") is not None else None, + "filter": TupleFilter.from_dict(obj.get("filter")) if obj.get("filter") is not None else None, "page_size": obj.get("page_size"), "continuous_token": obj.get("continuous_token") }) diff --git a/permify/models/relation_definition.py b/permify/models/relation_definition.py index 1e1a072..7e35a23 100644 --- a/permify/models/relation_definition.py +++ b/permify/models/relation_definition.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictStr +from pydantic import Field from permify.models.relation_reference import RelationReference -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class RelationDefinition(BaseModel): """ @@ -32,11 +36,11 @@ class RelationDefinition(BaseModel): relation_references: Optional[List[RelationReference]] = Field(default=None, description="A list of references to other relations.", alias="relationReferences") __properties: ClassVar[List[str]] = ["name", "relationReferences"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -49,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of RelationDefinition from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,25 +67,23 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in relation_references (list) _items = [] if self.relation_references: - for _item_relation_references in self.relation_references: - if _item_relation_references: - _items.append(_item_relation_references.to_dict()) + for _item in self.relation_references: + if _item: + _items.append(_item.to_dict()) _dict['relationReferences'] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of RelationDefinition from a dict""" if obj is None: return None @@ -91,7 +93,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "name": obj.get("name"), - "relationReferences": [RelationReference.from_dict(_item) for _item in obj["relationReferences"]] if obj.get("relationReferences") is not None else None + "relationReferences": [RelationReference.from_dict(_item) for _item in obj.get("relationReferences")] if obj.get("relationReferences") is not None else None }) return _obj diff --git a/permify/models/relation_reference.py b/permify/models/relation_reference.py index 25d6e29..62df091 100644 --- a/permify/models/relation_reference.py +++ b/permify/models/relation_reference.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class RelationReference(BaseModel): """ @@ -31,11 +35,11 @@ class RelationReference(BaseModel): relation: Optional[StrictStr] = Field(default=None, description="The name of the referenced relation, which follows a specific string pattern and has a maximum byte size.") __properties: ClassVar[List[str]] = ["type", "relation"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of RelationReference from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,18 +66,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of RelationReference from a dict""" if obj is None: return None diff --git a/permify/models/relationship_delete_response.py b/permify/models/relationship_delete_response.py index ee81d93..6573dff 100644 --- a/permify/models/relationship_delete_response.py +++ b/permify/models/relationship_delete_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class RelationshipDeleteResponse(BaseModel): """ @@ -30,11 +34,11 @@ class RelationshipDeleteResponse(BaseModel): snap_token: Optional[StrictStr] = Field(default=None, description="The snap token to avoid stale cache, see more details on [Snap Tokens](../../operations/snap-tokens)") __properties: ClassVar[List[str]] = ["snap_token"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -47,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of RelationshipDeleteResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,18 +65,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of RelationshipDeleteResponse from a dict""" if obj is None: return None diff --git a/permify/models/relationship_read_request_metadata.py b/permify/models/relationship_read_request_metadata.py index af86605..e7e44d4 100644 --- a/permify/models/relationship_read_request_metadata.py +++ b/permify/models/relationship_read_request_metadata.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class RelationshipReadRequestMetadata(BaseModel): """ @@ -30,11 +34,11 @@ class RelationshipReadRequestMetadata(BaseModel): snap_token: Optional[StrictStr] = Field(default=None, description="The snap token to avoid stale cache, see more details on [Snap Tokens](../../operations/snap-tokens)") __properties: ClassVar[List[str]] = ["snap_token"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -47,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of RelationshipReadRequestMetadata from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,18 +65,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of RelationshipReadRequestMetadata from a dict""" if obj is None: return None diff --git a/permify/models/relationship_read_response.py b/permify/models/relationship_read_response.py index afb29e7..a5f1c47 100644 --- a/permify/models/relationship_read_response.py +++ b/permify/models/relationship_read_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictStr +from pydantic import Field from permify.models.tuple import Tuple -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class RelationshipReadResponse(BaseModel): """ @@ -32,11 +36,11 @@ class RelationshipReadResponse(BaseModel): continuous_token: Optional[StrictStr] = Field(default=None, description="continuous_token is used in the case of paginated reads to retrieve the next page of results.") __properties: ClassVar[List[str]] = ["tuples", "continuous_token"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -49,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of RelationshipReadResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,25 +67,23 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in tuples (list) _items = [] if self.tuples: - for _item_tuples in self.tuples: - if _item_tuples: - _items.append(_item_tuples.to_dict()) + for _item in self.tuples: + if _item: + _items.append(_item.to_dict()) _dict['tuples'] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of RelationshipReadResponse from a dict""" if obj is None: return None @@ -90,7 +92,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "tuples": [Tuple.from_dict(_item) for _item in obj["tuples"]] if obj.get("tuples") is not None else None, + "tuples": [Tuple.from_dict(_item) for _item in obj.get("tuples")] if obj.get("tuples") is not None else None, "continuous_token": obj.get("continuous_token") }) return _obj diff --git a/permify/models/relationship_write_request_metadata.py b/permify/models/relationship_write_request_metadata.py index ad6ae62..7ef683b 100644 --- a/permify/models/relationship_write_request_metadata.py +++ b/permify/models/relationship_write_request_metadata.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,13 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +try: + from typing import Self +except ImportError: + from typing_extensions import Self class RelationshipWriteRequestMetadata(BaseModel): """ @@ -30,11 +33,11 @@ class RelationshipWriteRequestMetadata(BaseModel): schema_version: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["schema_version"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -47,7 +50,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of RelationshipWriteRequestMetadata from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,18 +64,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of RelationshipWriteRequestMetadata from a dict""" if obj is None: return None diff --git a/permify/models/relationship_write_response.py b/permify/models/relationship_write_response.py index cdc2117..8601d6b 100644 --- a/permify/models/relationship_write_response.py +++ b/permify/models/relationship_write_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class RelationshipWriteResponse(BaseModel): """ @@ -30,11 +34,11 @@ class RelationshipWriteResponse(BaseModel): snap_token: Optional[StrictStr] = Field(default=None, description="The snap token to avoid stale cache, see more details on [Snap Tokens](../../operations/snap-tokens)") __properties: ClassVar[List[str]] = ["snap_token"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -47,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of RelationshipWriteResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,18 +65,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of RelationshipWriteResponse from a dict""" if obj is None: return None diff --git a/permify/models/rewrite.py b/permify/models/rewrite.py index 6af104c..e4eb9af 100644 --- a/permify/models/rewrite.py +++ b/permify/models/rewrite.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel +from pydantic import Field from permify.models.rewrite_operation import RewriteOperation -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class Rewrite(BaseModel): """ @@ -32,11 +36,11 @@ class Rewrite(BaseModel): children: Optional[List[Child]] = Field(default=None, description="A list of children that are operated upon by the rewrite operation.") __properties: ClassVar[List[str]] = ["rewriteOperation", "children"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -49,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of Rewrite from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,25 +67,23 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in children (list) _items = [] if self.children: - for _item_children in self.children: - if _item_children: - _items.append(_item_children.to_dict()) + for _item in self.children: + if _item: + _items.append(_item.to_dict()) _dict['children'] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of Rewrite from a dict""" if obj is None: return None @@ -91,7 +93,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "rewriteOperation": obj.get("rewriteOperation"), - "children": [Child.from_dict(_item) for _item in obj["children"]] if obj.get("children") is not None else None + "children": [Child.from_dict(_item) for _item in obj.get("children")] if obj.get("children") is not None else None }) return _obj diff --git a/permify/models/rewrite_operation.py b/permify/models/rewrite_operation.py index 3192818..1046a89 100644 --- a/permify/models/rewrite_operation.py +++ b/permify/models/rewrite_operation.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -15,8 +15,16 @@ from __future__ import annotations import json +import pprint +import re # noqa: F401 from enum import Enum -from typing_extensions import Self + + + +try: + from typing import Self +except ImportError: + from typing_extensions import Self class RewriteOperation(str, Enum): diff --git a/permify/models/rule_definition.py b/permify/models/rule_definition.py index 8c50eae..be7da93 100644 --- a/permify/models/rule_definition.py +++ b/permify/models/rule_definition.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,12 +18,16 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictStr +from pydantic import Field from permify.models.attribute_type import AttributeType from permify.models.checked_expr import CheckedExpr -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class RuleDefinition(BaseModel): """ @@ -34,11 +38,11 @@ class RuleDefinition(BaseModel): expression: Optional[CheckedExpr] = None __properties: ClassVar[List[str]] = ["name", "arguments", "expression"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -51,7 +55,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of RuleDefinition from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,12 +69,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of expression @@ -79,7 +81,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of RuleDefinition from a dict""" if obj is None: return None @@ -90,7 +92,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "name": obj.get("name"), "arguments": dict((_k, _v) for _k, _v in obj.get("arguments").items()), - "expression": CheckedExpr.from_dict(obj["expression"]) if obj.get("expression") is not None else None + "expression": CheckedExpr.from_dict(obj.get("expression")) if obj.get("expression") is not None else None }) return _obj diff --git a/permify/models/run_bundle_body.py b/permify/models/run_bundle_body.py index b9d80c5..3f2b852 100644 --- a/permify/models/run_bundle_body.py +++ b/permify/models/run_bundle_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class RunBundleBody(BaseModel): """ @@ -31,11 +35,11 @@ class RunBundleBody(BaseModel): arguments: Optional[Dict[str, StrictStr]] = Field(default=None, description="Additional key-value pairs for execution arguments.") __properties: ClassVar[List[str]] = ["name", "arguments"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of RunBundleBody from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,18 +66,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of RunBundleBody from a dict""" if obj is None: return None diff --git a/permify/models/schema_definition.py b/permify/models/schema_definition.py index 07259ee..c45d13c 100644 --- a/permify/models/schema_definition.py +++ b/permify/models/schema_definition.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,13 +18,17 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel +from pydantic import Field from permify.models.entity_definition import EntityDefinition from permify.models.rule_definition import RuleDefinition from permify.models.schema_definition_reference import SchemaDefinitionReference -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class SchemaDefinition(BaseModel): """ @@ -35,11 +39,11 @@ class SchemaDefinition(BaseModel): references: Optional[Dict[str, SchemaDefinitionReference]] = Field(default=None, description="Map of references to signify whether a string refers to an entity or a rule.") __properties: ClassVar[List[str]] = ["entityDefinitions", "ruleDefinitions", "references"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -52,7 +56,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of SchemaDefinition from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,32 +70,30 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each value in entity_definitions (dict) _field_dict = {} if self.entity_definitions: - for _key_entity_definitions in self.entity_definitions: - if self.entity_definitions[_key_entity_definitions]: - _field_dict[_key_entity_definitions] = self.entity_definitions[_key_entity_definitions].to_dict() + for _key in self.entity_definitions: + if self.entity_definitions[_key]: + _field_dict[_key] = self.entity_definitions[_key].to_dict() _dict['entityDefinitions'] = _field_dict # override the default output from pydantic by calling `to_dict()` of each value in rule_definitions (dict) _field_dict = {} if self.rule_definitions: - for _key_rule_definitions in self.rule_definitions: - if self.rule_definitions[_key_rule_definitions]: - _field_dict[_key_rule_definitions] = self.rule_definitions[_key_rule_definitions].to_dict() + for _key in self.rule_definitions: + if self.rule_definitions[_key]: + _field_dict[_key] = self.rule_definitions[_key].to_dict() _dict['ruleDefinitions'] = _field_dict return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of SchemaDefinition from a dict""" if obj is None: return None @@ -102,13 +104,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "entityDefinitions": dict( (_k, EntityDefinition.from_dict(_v)) - for _k, _v in obj["entityDefinitions"].items() + for _k, _v in obj.get("entityDefinitions").items() ) if obj.get("entityDefinitions") is not None else None, "ruleDefinitions": dict( (_k, RuleDefinition.from_dict(_v)) - for _k, _v in obj["ruleDefinitions"].items() + for _k, _v in obj.get("ruleDefinitions").items() ) if obj.get("ruleDefinitions") is not None else None, diff --git a/permify/models/schema_definition_reference.py b/permify/models/schema_definition_reference.py index 04d9fcd..470060d 100644 --- a/permify/models/schema_definition_reference.py +++ b/permify/models/schema_definition_reference.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -15,8 +15,16 @@ from __future__ import annotations import json +import pprint +import re # noqa: F401 from enum import Enum -from typing_extensions import Self + + + +try: + from typing import Self +except ImportError: + from typing_extensions import Self class SchemaDefinitionReference(str, Enum): diff --git a/permify/models/schema_list.py b/permify/models/schema_list.py index ab72ba8..5179464 100644 --- a/permify/models/schema_list.py +++ b/permify/models/schema_list.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,13 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +try: + from typing import Self +except ImportError: + from typing_extensions import Self class SchemaList(BaseModel): """ @@ -31,11 +34,11 @@ class SchemaList(BaseModel): created_at: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["version", "created_at"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of SchemaList from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,18 +65,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of SchemaList from a dict""" if obj is None: return None diff --git a/permify/models/schema_list_body.py b/permify/models/schema_list_body.py index 8959c91..2c6249a 100644 --- a/permify/models/schema_list_body.py +++ b/permify/models/schema_list_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class SchemaListBody(BaseModel): """ @@ -31,11 +35,11 @@ class SchemaListBody(BaseModel): continuous_token: Optional[StrictStr] = Field(default=None, description="continuous_token is an optional parameter used for pagination. It should be the value received in the previous response.") __properties: ClassVar[List[str]] = ["page_size", "continuous_token"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of SchemaListBody from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,18 +66,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of SchemaListBody from a dict""" if obj is None: return None diff --git a/permify/models/schema_list_response.py b/permify/models/schema_list_response.py index 5e1e936..5a37237 100644 --- a/permify/models/schema_list_response.py +++ b/permify/models/schema_list_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictStr +from pydantic import Field from permify.models.schema_list import SchemaList -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class SchemaListResponse(BaseModel): """ @@ -33,11 +37,11 @@ class SchemaListResponse(BaseModel): continuous_token: Optional[StrictStr] = Field(default=None, description="continuous_token is a string that can be used to paginate and retrieve the next set of results.") __properties: ClassVar[List[str]] = ["head", "schemas", "continuous_token"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -50,7 +54,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of SchemaListResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,25 +68,23 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in schemas (list) _items = [] if self.schemas: - for _item_schemas in self.schemas: - if _item_schemas: - _items.append(_item_schemas.to_dict()) + for _item in self.schemas: + if _item: + _items.append(_item.to_dict()) _dict['schemas'] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of SchemaListResponse from a dict""" if obj is None: return None @@ -92,7 +94,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "head": obj.get("head"), - "schemas": [SchemaList.from_dict(_item) for _item in obj["schemas"]] if obj.get("schemas") is not None else None, + "schemas": [SchemaList.from_dict(_item) for _item in obj.get("schemas")] if obj.get("schemas") is not None else None, "continuous_token": obj.get("continuous_token") }) return _obj diff --git a/permify/models/schema_partial_write_request_metadata.py b/permify/models/schema_partial_write_request_metadata.py index b66bed3..76ba1a0 100644 --- a/permify/models/schema_partial_write_request_metadata.py +++ b/permify/models/schema_partial_write_request_metadata.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class SchemaPartialWriteRequestMetadata(BaseModel): """ @@ -30,11 +34,11 @@ class SchemaPartialWriteRequestMetadata(BaseModel): schema_version: Optional[StrictStr] = Field(default=None, description="schema_version is the string that identifies the version of the schema to be read.") __properties: ClassVar[List[str]] = ["schema_version"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -47,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of SchemaPartialWriteRequestMetadata from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,18 +65,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of SchemaPartialWriteRequestMetadata from a dict""" if obj is None: return None diff --git a/permify/models/schema_partial_write_response.py b/permify/models/schema_partial_write_response.py index d3f2347..1983bf5 100644 --- a/permify/models/schema_partial_write_response.py +++ b/permify/models/schema_partial_write_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class SchemaPartialWriteResponse(BaseModel): """ @@ -30,11 +34,11 @@ class SchemaPartialWriteResponse(BaseModel): schema_version: Optional[StrictStr] = Field(default=None, description="schema_version is the string that identifies the version of the written schema.") __properties: ClassVar[List[str]] = ["schema_version"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -47,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of SchemaPartialWriteResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,18 +65,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of SchemaPartialWriteResponse from a dict""" if obj is None: return None diff --git a/permify/models/schema_read_body.py b/permify/models/schema_read_body.py index 5f11fa7..8af60ea 100644 --- a/permify/models/schema_read_body.py +++ b/permify/models/schema_read_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel from permify.models.schema_read_request_metadata import SchemaReadRequestMetadata -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class SchemaReadBody(BaseModel): """ @@ -31,11 +34,11 @@ class SchemaReadBody(BaseModel): metadata: Optional[SchemaReadRequestMetadata] = None __properties: ClassVar[List[str]] = ["metadata"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of SchemaReadBody from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,12 +65,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of metadata @@ -76,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of SchemaReadBody from a dict""" if obj is None: return None @@ -85,7 +86,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "metadata": SchemaReadRequestMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None + "metadata": SchemaReadRequestMetadata.from_dict(obj.get("metadata")) if obj.get("metadata") is not None else None }) return _obj diff --git a/permify/models/schema_read_request_metadata.py b/permify/models/schema_read_request_metadata.py index c1ab761..aafe530 100644 --- a/permify/models/schema_read_request_metadata.py +++ b/permify/models/schema_read_request_metadata.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class SchemaReadRequestMetadata(BaseModel): """ @@ -30,11 +34,11 @@ class SchemaReadRequestMetadata(BaseModel): schema_version: Optional[StrictStr] = Field(default=None, description="schema_version is the string that identifies the version of the schema to be read.") __properties: ClassVar[List[str]] = ["schema_version"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -47,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of SchemaReadRequestMetadata from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,18 +65,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of SchemaReadRequestMetadata from a dict""" if obj is None: return None diff --git a/permify/models/schema_read_response.py b/permify/models/schema_read_response.py index e55ebdb..d44f4ea 100644 --- a/permify/models/schema_read_response.py +++ b/permify/models/schema_read_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel +from pydantic import Field from permify.models.schema_definition import SchemaDefinition -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class SchemaReadResponse(BaseModel): """ @@ -31,11 +35,11 @@ class SchemaReadResponse(BaseModel): var_schema: Optional[SchemaDefinition] = Field(default=None, alias="schema") __properties: ClassVar[List[str]] = ["schema"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of SchemaReadResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,12 +66,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of var_schema @@ -76,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of SchemaReadResponse from a dict""" if obj is None: return None @@ -85,7 +87,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "schema": SchemaDefinition.from_dict(obj["schema"]) if obj.get("schema") is not None else None + "schema": SchemaDefinition.from_dict(obj.get("schema")) if obj.get("schema") is not None else None }) return _obj diff --git a/permify/models/schema_write_body.py b/permify/models/schema_write_body.py index b6db637..db6448c 100644 --- a/permify/models/schema_write_body.py +++ b/permify/models/schema_write_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class SchemaWriteBody(BaseModel): """ @@ -30,11 +34,11 @@ class SchemaWriteBody(BaseModel): var_schema: Optional[StrictStr] = Field(default=None, description="schema is the string representation of the schema to be written.", alias="schema") __properties: ClassVar[List[str]] = ["schema"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -47,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of SchemaWriteBody from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,18 +65,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of SchemaWriteBody from a dict""" if obj is None: return None diff --git a/permify/models/schema_write_response.py b/permify/models/schema_write_response.py index bb06d7b..7f00c5e 100644 --- a/permify/models/schema_write_response.py +++ b/permify/models/schema_write_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class SchemaWriteResponse(BaseModel): """ @@ -30,11 +34,11 @@ class SchemaWriteResponse(BaseModel): schema_version: Optional[StrictStr] = Field(default=None, description="schema_version is the string that identifies the version of the written schema.") __properties: ClassVar[List[str]] = ["schema_version"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -47,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of SchemaWriteResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,18 +65,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of SchemaWriteResponse from a dict""" if obj is None: return None diff --git a/permify/models/select.py b/permify/models/select.py index 2a62740..26b0e9d 100644 --- a/permify/models/select.py +++ b/permify/models/select.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,25 +18,29 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class Select(BaseModel): """ A field selection expression. e.g. `request.auth`. """ # noqa: E501 operand: Optional[Expr] = None - var_field: Optional[StrictStr] = Field(default=None, description="Required. The name of the field to select. For example, in the select expression `request.auth`, the `auth` portion of the expression would be the `field`.", alias="field") + field: Optional[StrictStr] = Field(default=None, description="Required. The name of the field to select. For example, in the select expression `request.auth`, the `auth` portion of the expression would be the `field`.") test_only: Optional[StrictBool] = Field(default=None, description="Whether the select is to be interpreted as a field presence test. This results from the macro `has(request.auth)`.", alias="testOnly") __properties: ClassVar[List[str]] = ["operand", "field", "testOnly"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -49,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of Select from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,12 +67,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of operand @@ -77,7 +79,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of Select from a dict""" if obj is None: return None @@ -86,7 +88,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "operand": Expr.from_dict(obj["operand"]) if obj.get("operand") is not None else None, + "operand": Expr.from_dict(obj.get("operand")) if obj.get("operand") is not None else None, "field": obj.get("field"), "testOnly": obj.get("testOnly") }) diff --git a/permify/models/source_info.py b/permify/models/source_info.py index 60d32ad..5538c19 100644 --- a/permify/models/source_info.py +++ b/permify/models/source_info.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import Field from permify.models.expr import Expr -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class SourceInfo(BaseModel): """ @@ -35,11 +39,11 @@ class SourceInfo(BaseModel): macro_calls: Optional[Dict[str, Expr]] = Field(default=None, description="A map from the parse node id where a macro replacement was made to the call `Expr` that resulted in a macro expansion. For example, `has(value.field)` is a function call that is replaced by a `test_only` field selection in the AST. Likewise, the call `list.exists(e, e > 10)` translates to a comprehension expression. The key in the map corresponds to the expression id of the expanded macro, and the value is the call `Expr` that was replaced.", alias="macroCalls") __properties: ClassVar[List[str]] = ["syntaxVersion", "location", "lineOffsets", "positions", "macroCalls"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -52,7 +56,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of SourceInfo from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,25 +70,23 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each value in macro_calls (dict) _field_dict = {} if self.macro_calls: - for _key_macro_calls in self.macro_calls: - if self.macro_calls[_key_macro_calls]: - _field_dict[_key_macro_calls] = self.macro_calls[_key_macro_calls].to_dict() + for _key in self.macro_calls: + if self.macro_calls[_key]: + _field_dict[_key] = self.macro_calls[_key].to_dict() _dict['macroCalls'] = _field_dict return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of SourceInfo from a dict""" if obj is None: return None @@ -99,7 +101,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "positions": obj.get("positions"), "macroCalls": dict( (_k, Expr.from_dict(_v)) - for _k, _v in obj["macroCalls"].items() + for _k, _v in obj.get("macroCalls").items() ) if obj.get("macroCalls") is not None else None diff --git a/permify/models/status.py b/permify/models/status.py index 446ae51..8d24a75 100644 --- a/permify/models/status.py +++ b/permify/models/status.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictInt, StrictStr from permify.models.any import Any -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class Status(BaseModel): """ @@ -33,11 +36,11 @@ class Status(BaseModel): details: Optional[List[Any]] = None __properties: ClassVar[List[str]] = ["code", "message", "details"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -50,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of Status from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,25 +67,23 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in details (list) _items = [] if self.details: - for _item_details in self.details: - if _item_details: - _items.append(_item_details.to_dict()) + for _item in self.details: + if _item: + _items.append(_item.to_dict()) _dict['details'] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of Status from a dict""" if obj is None: return None @@ -93,7 +94,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "code": obj.get("code"), "message": obj.get("message"), - "details": [Any.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None + "details": [Any.from_dict(_item) for _item in obj.get("details")] if obj.get("details") is not None else None }) return _obj diff --git a/permify/models/stream_result_of_permission_lookup_entity_stream_response.py b/permify/models/stream_result_of_permission_lookup_entity_stream_response.py index 00a6e2d..40ae1d3 100644 --- a/permify/models/stream_result_of_permission_lookup_entity_stream_response.py +++ b/permify/models/stream_result_of_permission_lookup_entity_stream_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,12 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel from permify.models.permission_lookup_entity_stream_response import PermissionLookupEntityStreamResponse from permify.models.status import Status -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class StreamResultOfPermissionLookupEntityStreamResponse(BaseModel): """ @@ -33,11 +36,11 @@ class StreamResultOfPermissionLookupEntityStreamResponse(BaseModel): error: Optional[Status] = None __properties: ClassVar[List[str]] = ["result", "error"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -50,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of StreamResultOfPermissionLookupEntityStreamResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,12 +67,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of result @@ -81,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of StreamResultOfPermissionLookupEntityStreamResponse from a dict""" if obj is None: return None @@ -90,8 +91,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "result": PermissionLookupEntityStreamResponse.from_dict(obj["result"]) if obj.get("result") is not None else None, - "error": Status.from_dict(obj["error"]) if obj.get("error") is not None else None + "result": PermissionLookupEntityStreamResponse.from_dict(obj.get("result")) if obj.get("result") is not None else None, + "error": Status.from_dict(obj.get("error")) if obj.get("error") is not None else None }) return _obj diff --git a/permify/models/stream_result_of_watch_response.py b/permify/models/stream_result_of_watch_response.py index 64a1350..bc27377 100644 --- a/permify/models/stream_result_of_watch_response.py +++ b/permify/models/stream_result_of_watch_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,12 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel from permify.models.status import Status from permify.models.watch_response import WatchResponse -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class StreamResultOfWatchResponse(BaseModel): """ @@ -33,11 +36,11 @@ class StreamResultOfWatchResponse(BaseModel): error: Optional[Status] = None __properties: ClassVar[List[str]] = ["result", "error"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -50,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of StreamResultOfWatchResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,12 +67,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of result @@ -81,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of StreamResultOfWatchResponse from a dict""" if obj is None: return None @@ -90,8 +91,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "result": WatchResponse.from_dict(obj["result"]) if obj.get("result") is not None else None, - "error": Status.from_dict(obj["error"]) if obj.get("error") is not None else None + "result": WatchResponse.from_dict(obj.get("result")) if obj.get("result") is not None else None, + "error": Status.from_dict(obj.get("error")) if obj.get("error") is not None else None }) return _obj diff --git a/permify/models/string_array_value.py b/permify/models/string_array_value.py index d9d46e2..fd736f8 100644 --- a/permify/models/string_array_value.py +++ b/permify/models/string_array_value.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class StringArrayValue(BaseModel): """ @@ -30,11 +34,11 @@ class StringArrayValue(BaseModel): data: Optional[List[StrictStr]] = Field(default=None, description="The array of strings.") __properties: ClassVar[List[str]] = ["data"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -47,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of StringArrayValue from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,18 +65,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of StringArrayValue from a dict""" if obj is None: return None diff --git a/permify/models/subject.py b/permify/models/subject.py index bf5f0a8..35f5505 100644 --- a/permify/models/subject.py +++ b/permify/models/subject.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,13 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +try: + from typing import Self +except ImportError: + from typing_extensions import Self class Subject(BaseModel): """ @@ -32,11 +35,11 @@ class Subject(BaseModel): relation: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["type", "id", "relation"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -49,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of Subject from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,18 +66,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of Subject from a dict""" if obj is None: return None diff --git a/permify/models/subject_filter.py b/permify/models/subject_filter.py index d61976c..9b971ed 100644 --- a/permify/models/subject_filter.py +++ b/permify/models/subject_filter.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,13 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +try: + from typing import Self +except ImportError: + from typing_extensions import Self class SubjectFilter(BaseModel): """ @@ -32,11 +35,11 @@ class SubjectFilter(BaseModel): relation: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["type", "ids", "relation"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -49,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of SubjectFilter from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,18 +66,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of SubjectFilter from a dict""" if obj is None: return None diff --git a/permify/models/subject_permission_body.py b/permify/models/subject_permission_body.py index f27f395..69c4b48 100644 --- a/permify/models/subject_permission_body.py +++ b/permify/models/subject_permission_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,14 +18,17 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel from permify.models.context import Context from permify.models.entity import Entity from permify.models.permission_subject_permission_request_metadata import PermissionSubjectPermissionRequestMetadata from permify.models.subject import Subject -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class SubjectPermissionBody(BaseModel): """ @@ -37,11 +40,11 @@ class SubjectPermissionBody(BaseModel): context: Optional[Context] = None __properties: ClassVar[List[str]] = ["metadata", "entity", "subject", "context"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -54,7 +57,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of SubjectPermissionBody from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -68,12 +71,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of metadata @@ -91,7 +92,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of SubjectPermissionBody from a dict""" if obj is None: return None @@ -100,10 +101,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "metadata": PermissionSubjectPermissionRequestMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, - "entity": Entity.from_dict(obj["entity"]) if obj.get("entity") is not None else None, - "subject": Subject.from_dict(obj["subject"]) if obj.get("subject") is not None else None, - "context": Context.from_dict(obj["context"]) if obj.get("context") is not None else None + "metadata": PermissionSubjectPermissionRequestMetadata.from_dict(obj.get("metadata")) if obj.get("metadata") is not None else None, + "entity": Entity.from_dict(obj.get("entity")) if obj.get("entity") is not None else None, + "subject": Subject.from_dict(obj.get("subject")) if obj.get("subject") is not None else None, + "context": Context.from_dict(obj.get("context")) if obj.get("context") is not None else None }) return _obj diff --git a/permify/models/subjects.py b/permify/models/subjects.py index d76cae7..843b917 100644 --- a/permify/models/subjects.py +++ b/permify/models/subjects.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel +from pydantic import Field from permify.models.subject import Subject -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class Subjects(BaseModel): """ @@ -31,11 +35,11 @@ class Subjects(BaseModel): subjects: Optional[List[Subject]] = Field(default=None, description="A list of subjects.") __properties: ClassVar[List[str]] = ["subjects"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of Subjects from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,25 +66,23 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in subjects (list) _items = [] if self.subjects: - for _item_subjects in self.subjects: - if _item_subjects: - _items.append(_item_subjects.to_dict()) + for _item in self.subjects: + if _item: + _items.append(_item.to_dict()) _dict['subjects'] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of Subjects from a dict""" if obj is None: return None @@ -89,7 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "subjects": [Subject.from_dict(_item) for _item in obj["subjects"]] if obj.get("subjects") is not None else None + "subjects": [Subject.from_dict(_item) for _item in obj.get("subjects")] if obj.get("subjects") is not None else None }) return _obj diff --git a/permify/models/tenant.py b/permify/models/tenant.py index 18bdce7..31b6fe9 100644 --- a/permify/models/tenant.py +++ b/permify/models/tenant.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,10 +19,13 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class Tenant(BaseModel): """ @@ -33,11 +36,11 @@ class Tenant(BaseModel): created_at: Optional[datetime] = Field(default=None, description="The time at which the tenant was created.") __properties: ClassVar[List[str]] = ["id", "name", "created_at"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -50,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of Tenant from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,18 +67,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of Tenant from a dict""" if obj is None: return None diff --git a/permify/models/tenant_create_request.py b/permify/models/tenant_create_request.py index 555b914..d9d074f 100644 --- a/permify/models/tenant_create_request.py +++ b/permify/models/tenant_create_request.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class TenantCreateRequest(BaseModel): """ @@ -31,11 +35,11 @@ class TenantCreateRequest(BaseModel): name: Optional[StrictStr] = Field(default=None, description="name is the name of the tenant.") __properties: ClassVar[List[str]] = ["id", "name"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of TenantCreateRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,18 +66,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of TenantCreateRequest from a dict""" if obj is None: return None diff --git a/permify/models/tenant_create_response.py b/permify/models/tenant_create_response.py index 66a2ba9..e99d494 100644 --- a/permify/models/tenant_create_response.py +++ b/permify/models/tenant_create_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel from permify.models.tenant import Tenant -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class TenantCreateResponse(BaseModel): """ @@ -31,11 +34,11 @@ class TenantCreateResponse(BaseModel): tenant: Optional[Tenant] = None __properties: ClassVar[List[str]] = ["tenant"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of TenantCreateResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,12 +65,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of tenant @@ -76,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of TenantCreateResponse from a dict""" if obj is None: return None @@ -85,7 +86,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "tenant": Tenant.from_dict(obj["tenant"]) if obj.get("tenant") is not None else None + "tenant": Tenant.from_dict(obj.get("tenant")) if obj.get("tenant") is not None else None }) return _obj diff --git a/permify/models/tenant_delete_response.py b/permify/models/tenant_delete_response.py index 3fe70a0..ac11bc2 100644 --- a/permify/models/tenant_delete_response.py +++ b/permify/models/tenant_delete_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel from permify.models.tenant import Tenant -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class TenantDeleteResponse(BaseModel): """ @@ -31,11 +34,11 @@ class TenantDeleteResponse(BaseModel): tenant: Optional[Tenant] = None __properties: ClassVar[List[str]] = ["tenant"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of TenantDeleteResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,12 +65,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of tenant @@ -76,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of TenantDeleteResponse from a dict""" if obj is None: return None @@ -85,7 +86,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "tenant": Tenant.from_dict(obj["tenant"]) if obj.get("tenant") is not None else None + "tenant": Tenant.from_dict(obj.get("tenant")) if obj.get("tenant") is not None else None }) return _obj diff --git a/permify/models/tenant_list_request.py b/permify/models/tenant_list_request.py index 61b8797..09b27a2 100644 --- a/permify/models/tenant_list_request.py +++ b/permify/models/tenant_list_request.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class TenantListRequest(BaseModel): """ @@ -31,11 +35,11 @@ class TenantListRequest(BaseModel): continuous_token: Optional[StrictStr] = Field(default=None, description="continuous_token is an optional parameter used for pagination. It should be the value received in the previous response.") __properties: ClassVar[List[str]] = ["page_size", "continuous_token"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of TenantListRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,18 +66,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of TenantListRequest from a dict""" if obj is None: return None diff --git a/permify/models/tenant_list_response.py b/permify/models/tenant_list_response.py index ed4c43a..2c523d9 100644 --- a/permify/models/tenant_list_response.py +++ b/permify/models/tenant_list_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictStr +from pydantic import Field from permify.models.tenant import Tenant -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class TenantListResponse(BaseModel): """ @@ -32,11 +36,11 @@ class TenantListResponse(BaseModel): continuous_token: Optional[StrictStr] = Field(default=None, description="continuous_token is a string that can be used to paginate and retrieve the next set of results.") __properties: ClassVar[List[str]] = ["tenants", "continuous_token"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -49,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of TenantListResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,25 +67,23 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in tenants (list) _items = [] if self.tenants: - for _item_tenants in self.tenants: - if _item_tenants: - _items.append(_item_tenants.to_dict()) + for _item in self.tenants: + if _item: + _items.append(_item.to_dict()) _dict['tenants'] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of TenantListResponse from a dict""" if obj is None: return None @@ -90,7 +92,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "tenants": [Tenant.from_dict(_item) for _item in obj["tenants"]] if obj.get("tenants") is not None else None, + "tenants": [Tenant.from_dict(_item) for _item in obj.get("tenants")] if obj.get("tenants") is not None else None, "continuous_token": obj.get("continuous_token") }) return _obj diff --git a/permify/models/tuple.py b/permify/models/tuple.py index 8faf006..501e9ff 100644 --- a/permify/models/tuple.py +++ b/permify/models/tuple.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,12 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictStr from permify.models.entity import Entity from permify.models.subject import Subject -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class Tuple(BaseModel): """ @@ -34,11 +37,11 @@ class Tuple(BaseModel): subject: Optional[Subject] = None __properties: ClassVar[List[str]] = ["entity", "relation", "subject"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -51,7 +54,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of Tuple from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,12 +68,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of entity @@ -82,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of Tuple from a dict""" if obj is None: return None @@ -91,9 +92,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "entity": Entity.from_dict(obj["entity"]) if obj.get("entity") is not None else None, + "entity": Entity.from_dict(obj.get("entity")) if obj.get("entity") is not None else None, "relation": obj.get("relation"), - "subject": Subject.from_dict(obj["subject"]) if obj.get("subject") is not None else None + "subject": Subject.from_dict(obj.get("subject")) if obj.get("subject") is not None else None }) return _obj diff --git a/permify/models/tuple_filter.py b/permify/models/tuple_filter.py index c82571f..6ad7dc8 100644 --- a/permify/models/tuple_filter.py +++ b/permify/models/tuple_filter.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,12 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictStr from permify.models.entity_filter import EntityFilter from permify.models.subject_filter import SubjectFilter -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class TupleFilter(BaseModel): """ @@ -34,11 +37,11 @@ class TupleFilter(BaseModel): subject: Optional[SubjectFilter] = None __properties: ClassVar[List[str]] = ["entity", "relation", "subject"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -51,7 +54,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of TupleFilter from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,12 +68,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of entity @@ -82,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of TupleFilter from a dict""" if obj is None: return None @@ -91,9 +92,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "entity": EntityFilter.from_dict(obj["entity"]) if obj.get("entity") is not None else None, + "entity": EntityFilter.from_dict(obj.get("entity")) if obj.get("entity") is not None else None, "relation": obj.get("relation"), - "subject": SubjectFilter.from_dict(obj["subject"]) if obj.get("subject") is not None else None + "subject": SubjectFilter.from_dict(obj.get("subject")) if obj.get("subject") is not None else None }) return _obj diff --git a/permify/models/tuple_set.py b/permify/models/tuple_set.py index e5800c7..326a497 100644 --- a/permify/models/tuple_set.py +++ b/permify/models/tuple_set.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,13 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +try: + from typing import Self +except ImportError: + from typing_extensions import Self class TupleSet(BaseModel): """ @@ -30,11 +33,11 @@ class TupleSet(BaseModel): relation: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["relation"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -47,7 +50,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of TupleSet from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,18 +64,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of TupleSet from a dict""" if obj is None: return None diff --git a/permify/models/tuple_to_user_set.py b/permify/models/tuple_to_user_set.py index 19f15c8..a7cac15 100644 --- a/permify/models/tuple_to_user_set.py +++ b/permify/models/tuple_to_user_set.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,12 +18,16 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel +from pydantic import Field from permify.models.computed_user_set import ComputedUserSet from permify.models.tuple_set import TupleSet -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class TupleToUserSet(BaseModel): """ @@ -33,11 +37,11 @@ class TupleToUserSet(BaseModel): computed: Optional[ComputedUserSet] = None __properties: ClassVar[List[str]] = ["tupleSet", "computed"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -50,7 +54,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of TupleToUserSet from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,12 +68,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of tuple_set @@ -81,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of TupleToUserSet from a dict""" if obj is None: return None @@ -90,8 +92,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "tupleSet": TupleSet.from_dict(obj["tupleSet"]) if obj.get("tupleSet") is not None else None, - "computed": ComputedUserSet.from_dict(obj["computed"]) if obj.get("computed") is not None else None + "tupleSet": TupleSet.from_dict(obj.get("tupleSet")) if obj.get("tupleSet") is not None else None, + "computed": ComputedUserSet.from_dict(obj.get("computed")) if obj.get("computed") is not None else None }) return _obj diff --git a/permify/models/v1_call.py b/permify/models/v1_call.py index 9c3684a..9c023b8 100644 --- a/permify/models/v1_call.py +++ b/permify/models/v1_call.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictStr +from pydantic import Field from permify.models.argument import Argument -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class V1Call(BaseModel): """ @@ -32,11 +36,11 @@ class V1Call(BaseModel): arguments: Optional[List[Argument]] = None __properties: ClassVar[List[str]] = ["ruleName", "arguments"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -49,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of V1Call from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,25 +67,23 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in arguments (list) _items = [] if self.arguments: - for _item_arguments in self.arguments: - if _item_arguments: - _items.append(_item_arguments.to_dict()) + for _item in self.arguments: + if _item: + _items.append(_item.to_dict()) _dict['arguments'] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of V1Call from a dict""" if obj is None: return None @@ -91,7 +93,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "ruleName": obj.get("ruleName"), - "arguments": [Argument.from_dict(_item) for _item in obj["arguments"]] if obj.get("arguments") is not None else None + "arguments": [Argument.from_dict(_item) for _item in obj.get("arguments")] if obj.get("arguments") is not None else None }) return _obj diff --git a/permify/models/v1_expand.py b/permify/models/v1_expand.py index 24cd91b..6b6fda3 100644 --- a/permify/models/v1_expand.py +++ b/permify/models/v1_expand.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,13 +18,17 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictStr +from pydantic import Field from permify.models.argument import Argument from permify.models.entity import Entity from permify.models.expand_leaf import ExpandLeaf -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class V1Expand(BaseModel): """ @@ -37,11 +41,11 @@ class V1Expand(BaseModel): leaf: Optional[ExpandLeaf] = None __properties: ClassVar[List[str]] = ["entity", "permission", "arguments", "expand", "leaf"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -54,7 +58,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of V1Expand from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -68,12 +72,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of entity @@ -82,9 +84,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in arguments (list) _items = [] if self.arguments: - for _item_arguments in self.arguments: - if _item_arguments: - _items.append(_item_arguments.to_dict()) + for _item in self.arguments: + if _item: + _items.append(_item.to_dict()) _dict['arguments'] = _items # override the default output from pydantic by calling `to_dict()` of expand if self.expand: @@ -95,7 +97,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of V1Expand from a dict""" if obj is None: return None @@ -104,11 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "entity": Entity.from_dict(obj["entity"]) if obj.get("entity") is not None else None, + "entity": Entity.from_dict(obj.get("entity")) if obj.get("entity") is not None else None, "permission": obj.get("permission"), - "arguments": [Argument.from_dict(_item) for _item in obj["arguments"]] if obj.get("arguments") is not None else None, - "expand": ExpandTreeNode.from_dict(obj["expand"]) if obj.get("expand") is not None else None, - "leaf": ExpandLeaf.from_dict(obj["leaf"]) if obj.get("leaf") is not None else None + "arguments": [Argument.from_dict(_item) for _item in obj.get("arguments")] if obj.get("arguments") is not None else None, + "expand": ExpandTreeNode.from_dict(obj.get("expand")) if obj.get("expand") is not None else None, + "leaf": ExpandLeaf.from_dict(obj.get("leaf")) if obj.get("leaf") is not None else None }) return _obj diff --git a/permify/models/v1_operation.py b/permify/models/v1_operation.py index 9dc0a1f..274f77e 100644 --- a/permify/models/v1_operation.py +++ b/permify/models/v1_operation.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class V1Operation(BaseModel): """ @@ -33,11 +37,11 @@ class V1Operation(BaseModel): attributes_delete: Optional[List[StrictStr]] = Field(default=None, description="'attributes_delete' is a repeated string field for storing attribute keys that are to be deleted or removed.") __properties: ClassVar[List[str]] = ["relationships_write", "relationships_delete", "attributes_write", "attributes_delete"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -50,7 +54,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of V1Operation from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,18 +68,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of V1Operation from a dict""" if obj is None: return None diff --git a/permify/models/v1alpha1_reference.py b/permify/models/v1alpha1_reference.py index 750f115..d9da412 100644 --- a/permify/models/v1alpha1_reference.py +++ b/permify/models/v1alpha1_reference.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictStr +from pydantic import Field from permify.models.constant import Constant -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class V1alpha1Reference(BaseModel): """ @@ -33,11 +37,11 @@ class V1alpha1Reference(BaseModel): value: Optional[Constant] = None __properties: ClassVar[List[str]] = ["name", "overloadId", "value"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -50,7 +54,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of V1alpha1Reference from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,12 +68,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of value @@ -78,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of V1alpha1Reference from a dict""" if obj is None: return None @@ -89,7 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "name": obj.get("name"), "overloadId": obj.get("overloadId"), - "value": Constant.from_dict(obj["value"]) if obj.get("value") is not None else None + "value": Constant.from_dict(obj.get("value")) if obj.get("value") is not None else None }) return _obj diff --git a/permify/models/v1alpha1_type.py b/permify/models/v1alpha1_type.py index e12198c..1600d5d 100644 --- a/permify/models/v1alpha1_type.py +++ b/permify/models/v1alpha1_type.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,12 +18,16 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, StrictStr +from pydantic import Field from permify.models.primitive_type import PrimitiveType from permify.models.well_known_type import WellKnownType -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class V1alpha1Type(BaseModel): """ @@ -44,11 +48,11 @@ class V1alpha1Type(BaseModel): abstract_type: Optional[AbstractType] = Field(default=None, alias="abstractType") __properties: ClassVar[List[str]] = ["dyn", "null", "primitive", "wrapper", "wellKnown", "listType", "mapType", "function", "messageType", "typeParam", "type", "error", "abstractType"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -61,7 +65,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of V1alpha1Type from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -75,12 +79,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of list_type @@ -101,7 +103,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of V1alpha1Type from a dict""" if obj is None: return None @@ -115,14 +117,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "primitive": obj.get("primitive"), "wrapper": obj.get("wrapper"), "wellKnown": obj.get("wellKnown"), - "listType": ListType.from_dict(obj["listType"]) if obj.get("listType") is not None else None, - "mapType": MapType.from_dict(obj["mapType"]) if obj.get("mapType") is not None else None, - "function": FunctionType.from_dict(obj["function"]) if obj.get("function") is not None else None, + "listType": ListType.from_dict(obj.get("listType")) if obj.get("listType") is not None else None, + "mapType": MapType.from_dict(obj.get("mapType")) if obj.get("mapType") is not None else None, + "function": FunctionType.from_dict(obj.get("function")) if obj.get("function") is not None else None, "messageType": obj.get("messageType"), "typeParam": obj.get("typeParam"), - "type": V1alpha1Type.from_dict(obj["type"]) if obj.get("type") is not None else None, + "type": V1alpha1Type.from_dict(obj.get("type")) if obj.get("type") is not None else None, "error": obj.get("error"), - "abstractType": AbstractType.from_dict(obj["abstractType"]) if obj.get("abstractType") is not None else None + "abstractType": AbstractType.from_dict(obj.get("abstractType")) if obj.get("abstractType") is not None else None }) return _obj diff --git a/permify/models/values.py b/permify/models/values.py index f718d7d..fff2f1a 100644 --- a/permify/models/values.py +++ b/permify/models/values.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel from permify.models.any import Any -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class Values(BaseModel): """ @@ -31,11 +34,11 @@ class Values(BaseModel): values: Optional[Dict[str, Any]] = None __properties: ClassVar[List[str]] = ["values"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of Values from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,25 +65,23 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each value in values (dict) _field_dict = {} if self.values: - for _key_values in self.values: - if self.values[_key_values]: - _field_dict[_key_values] = self.values[_key_values].to_dict() + for _key in self.values: + if self.values[_key]: + _field_dict[_key] = self.values[_key].to_dict() _dict['values'] = _field_dict return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of Values from a dict""" if obj is None: return None @@ -91,7 +92,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "values": dict( (_k, Any.from_dict(_v)) - for _k, _v in obj["values"].items() + for _k, _v in obj.get("values").items() ) if obj.get("values") is not None else None diff --git a/permify/models/watch_body.py b/permify/models/watch_body.py index 3dea08d..df39f73 100644 --- a/permify/models/watch_body.py +++ b/permify/models/watch_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr + from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self +from pydantic import BaseModel, StrictStr +from pydantic import Field +try: + from typing import Self +except ImportError: + from typing_extensions import Self class WatchBody(BaseModel): """ @@ -30,11 +34,11 @@ class WatchBody(BaseModel): snap_token: Optional[StrictStr] = Field(default=None, description="The snap token to avoid stale cache, see more details on [Snap Tokens](../../operations/snap-tokens).") __properties: ClassVar[List[str]] = ["snap_token"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -47,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of WatchBody from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -61,18 +65,16 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of WatchBody from a dict""" if obj is None: return None diff --git a/permify/models/watch_response.py b/permify/models/watch_response.py index 753d593..ab0bf5d 100644 --- a/permify/models/watch_response.py +++ b/permify/models/watch_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,11 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel from permify.models.data_changes import DataChanges -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class WatchResponse(BaseModel): """ @@ -31,11 +34,11 @@ class WatchResponse(BaseModel): changes: Optional[DataChanges] = None __properties: ClassVar[List[str]] = ["changes"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -48,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of WatchResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -62,12 +65,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of changes @@ -76,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of WatchResponse from a dict""" if obj is None: return None @@ -85,7 +86,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "changes": DataChanges.from_dict(obj["changes"]) if obj.get("changes") is not None else None + "changes": DataChanges.from_dict(obj.get("changes")) if obj.get("changes") is not None else None }) return _obj diff --git a/permify/models/well_known_type.py b/permify/models/well_known_type.py index d2f0f42..516e40a 100644 --- a/permify/models/well_known_type.py +++ b/permify/models/well_known_type.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -15,8 +15,16 @@ from __future__ import annotations import json +import pprint +import re # noqa: F401 from enum import Enum -from typing_extensions import Self + + + +try: + from typing import Self +except ImportError: + from typing_extensions import Self class WellKnownType(str, Enum): diff --git a/permify/models/write_relationships_body.py b/permify/models/write_relationships_body.py index 50a7e5b..a153c3b 100644 --- a/permify/models/write_relationships_body.py +++ b/permify/models/write_relationships_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,12 +18,16 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field + from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel +from pydantic import Field from permify.models.relationship_write_request_metadata import RelationshipWriteRequestMetadata from permify.models.tuple import Tuple -from typing import Optional, Set -from typing_extensions import Self +try: + from typing import Self +except ImportError: + from typing_extensions import Self class WriteRelationshipsBody(BaseModel): """ @@ -33,11 +37,11 @@ class WriteRelationshipsBody(BaseModel): tuples: Optional[List[Tuple]] = Field(default=None, description="List of tuples for the request. Must have between 1 and 100 items.") __properties: ClassVar[List[str]] = ["metadata", "tuples"] - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "protected_namespaces": (), + } def to_str(self) -> str: @@ -50,7 +54,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self: """Create an instance of WriteRelationshipsBody from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,12 +68,10 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) - _dict = self.model_dump( by_alias=True, - exclude=excluded_fields, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of metadata @@ -78,14 +80,14 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in tuples (list) _items = [] if self.tuples: - for _item_tuples in self.tuples: - if _item_tuples: - _items.append(_item_tuples.to_dict()) + for _item in self.tuples: + if _item: + _items.append(_item.to_dict()) _dict['tuples'] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict) -> Self: """Create an instance of WriteRelationshipsBody from a dict""" if obj is None: return None @@ -94,8 +96,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "metadata": RelationshipWriteRequestMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, - "tuples": [Tuple.from_dict(_item) for _item in obj["tuples"]] if obj.get("tuples") is not None else None + "metadata": RelationshipWriteRequestMetadata.from_dict(obj.get("metadata")) if obj.get("metadata") is not None else None, + "tuples": [Tuple.from_dict(_item) for _item in obj.get("tuples")] if obj.get("tuples") is not None else None }) return _obj diff --git a/permify/rest.py b/permify/rest.py index bfd6e4f..a06fec9 100644 --- a/permify/rest.py +++ b/permify/rest.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v0.9.9 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -72,45 +72,56 @@ def __init__(self, configuration) -> None: else: cert_reqs = ssl.CERT_NONE - pool_args = { - "cert_reqs": cert_reqs, - "ca_certs": configuration.ssl_ca_cert, - "cert_file": configuration.cert_file, - "key_file": configuration.key_file, - } + addition_pool_args = {} if configuration.assert_hostname is not None: - pool_args['assert_hostname'] = ( + addition_pool_args['assert_hostname'] = ( configuration.assert_hostname ) if configuration.retries is not None: - pool_args['retries'] = configuration.retries + addition_pool_args['retries'] = configuration.retries if configuration.tls_server_name: - pool_args['server_hostname'] = configuration.tls_server_name + addition_pool_args['server_hostname'] = configuration.tls_server_name if configuration.socket_options is not None: - pool_args['socket_options'] = configuration.socket_options + addition_pool_args['socket_options'] = configuration.socket_options if configuration.connection_pool_maxsize is not None: - pool_args['maxsize'] = configuration.connection_pool_maxsize + addition_pool_args['maxsize'] = configuration.connection_pool_maxsize # https pool manager - self.pool_manager: urllib3.PoolManager - if configuration.proxy: if is_socks_proxy_url(configuration.proxy): from urllib3.contrib.socks import SOCKSProxyManager - pool_args["proxy_url"] = configuration.proxy - pool_args["headers"] = configuration.proxy_headers - self.pool_manager = SOCKSProxyManager(**pool_args) + self.pool_manager = SOCKSProxyManager( + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + headers=configuration.proxy_headers, + **addition_pool_args + ) else: - pool_args["proxy_url"] = configuration.proxy - pool_args["proxy_headers"] = configuration.proxy_headers - self.pool_manager = urllib3.ProxyManager(**pool_args) + self.pool_manager = urllib3.ProxyManager( + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) else: - self.pool_manager = urllib3.PoolManager(**pool_args) + self.pool_manager = urllib3.PoolManager( + cert_reqs=cert_reqs, + ca_certs=configuration.ssl_ca_cert, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) def request( self, @@ -203,8 +214,6 @@ def request( # Content-Type which generated by urllib3 will be # overwritten. del headers['Content-Type'] - # Ensures that dict objects are serialized - post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] r = self.pool_manager.request( method, url, @@ -215,13 +224,14 @@ def request( preload_content=False ) # Pass a `string` parameter directly in the body to support - # other content types than JSON when `body` argument is - # provided in serialized form. + # 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, - body=body, + body=request_body, timeout=timeout, headers=headers, preload_content=False diff --git a/pyproject.toml b/pyproject.toml index eafce5f..7ef1861 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "permify" -version = "1.0.0" +version = "1.4.2" description = "Permify API" authors = ["API Support "] license = "Apache-2.0 license" diff --git a/setup.py b/setup.py index 763cf1d..7b6fd7e 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v0.9.9 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,7 @@ from setuptools import setup, find_packages # noqa: H301 -import os + # To install the library, run the following # # python setup.py install @@ -22,7 +22,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "permify" -VERSION = os.environ.get("PACKAGE_VERSION").split('/')[-1] +VERSION = "v1.4.2" PYTHON_REQUIRES = ">=3.7" REQUIRES = [ "urllib3 >= 1.25.3, < 2.1.0", @@ -37,12 +37,12 @@ description="Permify API", author="API Support", author_email="hello@permify.co", - url="", + url="https://github.com/Permify/permify-python", keywords=["OpenAPI", "OpenAPI-Generator", "Permify API"], install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, - license="Apache-2.0 license", + license="AGPL-3.0 license", long_description_content_type='text/markdown', long_description="""\ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. diff --git a/test/test_abstract_type.py b/test/test_abstract_type.py index e88fdf9..b20b2d1 100644 --- a/test/test_abstract_type.py +++ b/test/test_abstract_type.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.abstract_type import AbstractType @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> AbstractType: """Test AbstractType - include_optional is a boolean, when False only required + 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 `AbstractType` diff --git a/test/test_any.py b/test/test_any.py index da1033d..f0b4e3c 100644 --- a/test/test_any.py +++ b/test/test_any.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.any import Any @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> Any: """Test Any - include_optional is a boolean, when False only required + 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 `Any` diff --git a/test/test_argument.py b/test/test_argument.py index b768848..965a088 100644 --- a/test/test_argument.py +++ b/test/test_argument.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.argument import Argument @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> Argument: """Test Argument - include_optional is a boolean, when False only required + 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 `Argument` diff --git a/test/test_attribute.py b/test/test_attribute.py index f8b94cc..987fc84 100644 --- a/test/test_attribute.py +++ b/test/test_attribute.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.attribute import Attribute @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> Attribute: """Test Attribute - include_optional is a boolean, when False only required + 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 `Attribute` diff --git a/test/test_attribute_definition.py b/test/test_attribute_definition.py index ea290bb..cfb5e4e 100644 --- a/test/test_attribute_definition.py +++ b/test/test_attribute_definition.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.attribute_definition import AttributeDefinition @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> AttributeDefinition: """Test AttributeDefinition - include_optional is a boolean, when False only required + 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 `AttributeDefinition` diff --git a/test/test_attribute_filter.py b/test/test_attribute_filter.py index 34f44fa..19bd29a 100644 --- a/test/test_attribute_filter.py +++ b/test/test_attribute_filter.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.attribute_filter import AttributeFilter @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> AttributeFilter: """Test AttributeFilter - include_optional is a boolean, when False only required + 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 `AttributeFilter` diff --git a/test/test_attribute_read_request_metadata.py b/test/test_attribute_read_request_metadata.py index f08acee..ac43bee 100644 --- a/test/test_attribute_read_request_metadata.py +++ b/test/test_attribute_read_request_metadata.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.attribute_read_request_metadata import AttributeReadRequestMetadata @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> AttributeReadRequestMetadata: """Test AttributeReadRequestMetadata - include_optional is a boolean, when False only required + 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 `AttributeReadRequestMetadata` diff --git a/test/test_attribute_read_response.py b/test/test_attribute_read_response.py index fa929b1..27740c9 100644 --- a/test/test_attribute_read_response.py +++ b/test/test_attribute_read_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.attribute_read_response import AttributeReadResponse @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> AttributeReadResponse: """Test AttributeReadResponse - include_optional is a boolean, when False only required + 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 `AttributeReadResponse` diff --git a/test/test_attribute_type.py b/test/test_attribute_type.py index ad4de21..0699c0b 100644 --- a/test/test_attribute_type.py +++ b/test/test_attribute_type.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.attribute_type import AttributeType diff --git a/test/test_bundle_api.py b/test/test_bundle_api.py index 01b1d7c..3e141ee 100644 --- a/test/test_bundle_api.py +++ b/test/test_bundle_api.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/test/test_bundle_delete_body.py b/test/test_bundle_delete_body.py index bcd2e81..50ed51d 100644 --- a/test/test_bundle_delete_body.py +++ b/test/test_bundle_delete_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.bundle_delete_body import BundleDeleteBody @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> BundleDeleteBody: """Test BundleDeleteBody - include_optional is a boolean, when False only required + 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 `BundleDeleteBody` diff --git a/test/test_bundle_delete_response.py b/test/test_bundle_delete_response.py index 385ce18..e87049a 100644 --- a/test/test_bundle_delete_response.py +++ b/test/test_bundle_delete_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.bundle_delete_response import BundleDeleteResponse @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> BundleDeleteResponse: """Test BundleDeleteResponse - include_optional is a boolean, when False only required + 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 `BundleDeleteResponse` diff --git a/test/test_bundle_read_body.py b/test/test_bundle_read_body.py index 8c1fe77..dbe46d5 100644 --- a/test/test_bundle_read_body.py +++ b/test/test_bundle_read_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.bundle_read_body import BundleReadBody @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> BundleReadBody: """Test BundleReadBody - include_optional is a boolean, when False only required + 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 `BundleReadBody` diff --git a/test/test_bundle_read_response.py b/test/test_bundle_read_response.py index 18f6e74..87148f7 100644 --- a/test/test_bundle_read_response.py +++ b/test/test_bundle_read_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.bundle_read_response import BundleReadResponse @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> BundleReadResponse: """Test BundleReadResponse - include_optional is a boolean, when False only required + 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 `BundleReadResponse` diff --git a/test/test_bundle_run_response.py b/test/test_bundle_run_response.py index 7d038ff..38c2126 100644 --- a/test/test_bundle_run_response.py +++ b/test/test_bundle_run_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.bundle_run_response import BundleRunResponse @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> BundleRunResponse: """Test BundleRunResponse - include_optional is a boolean, when False only required + 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 `BundleRunResponse` diff --git a/test/test_bundle_write_body.py b/test/test_bundle_write_body.py index a31e79c..32004bf 100644 --- a/test/test_bundle_write_body.py +++ b/test/test_bundle_write_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.bundle_write_body import BundleWriteBody @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> BundleWriteBody: """Test BundleWriteBody - include_optional is a boolean, when False only required + 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 `BundleWriteBody` diff --git a/test/test_bundle_write_response.py b/test/test_bundle_write_response.py index ac5f558..138817b 100644 --- a/test/test_bundle_write_response.py +++ b/test/test_bundle_write_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.bundle_write_response import BundleWriteResponse @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> BundleWriteResponse: """Test BundleWriteResponse - include_optional is a boolean, when False only required + 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 `BundleWriteResponse` diff --git a/test/test_check_body.py b/test/test_check_body.py index 059a628..2a094dd 100644 --- a/test/test_check_body.py +++ b/test/test_check_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.check_body import CheckBody @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> CheckBody: """Test CheckBody - include_optional is a boolean, when False only required + 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 `CheckBody` diff --git a/test/test_check_result.py b/test/test_check_result.py index 262521b..a180c0b 100644 --- a/test/test_check_result.py +++ b/test/test_check_result.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.check_result import CheckResult diff --git a/test/test_checked_expr.py b/test/test_checked_expr.py index 19c1402..1bc1a06 100644 --- a/test/test_checked_expr.py +++ b/test/test_checked_expr.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.checked_expr import CheckedExpr @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> CheckedExpr: """Test CheckedExpr - include_optional is a boolean, when False only required + 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 `CheckedExpr` diff --git a/test/test_child.py b/test/test_child.py index a26d71e..4c73e5e 100644 --- a/test/test_child.py +++ b/test/test_child.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.child import Child @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> Child: """Test Child - include_optional is a boolean, when False only required + 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 `Child` diff --git a/test/test_comprehension.py b/test/test_comprehension.py index 80f8085..65071f0 100644 --- a/test/test_comprehension.py +++ b/test/test_comprehension.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.comprehension import Comprehension @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> Comprehension: """Test Comprehension - include_optional is a boolean, when False only required + 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 `Comprehension` diff --git a/test/test_computed_attribute.py b/test/test_computed_attribute.py index 4838d6f..f5c88e7 100644 --- a/test/test_computed_attribute.py +++ b/test/test_computed_attribute.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.computed_attribute import ComputedAttribute @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> ComputedAttribute: """Test ComputedAttribute - include_optional is a boolean, when False only required + 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 `ComputedAttribute` diff --git a/test/test_computed_user_set.py b/test/test_computed_user_set.py index cd6a942..110f142 100644 --- a/test/test_computed_user_set.py +++ b/test/test_computed_user_set.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.computed_user_set import ComputedUserSet @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> ComputedUserSet: """Test ComputedUserSet - include_optional is a boolean, when False only required + 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 `ComputedUserSet` diff --git a/test/test_constant.py b/test/test_constant.py index bd8b8b6..f6ce683 100644 --- a/test/test_constant.py +++ b/test/test_constant.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.constant import Constant @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> Constant: """Test Constant - include_optional is a boolean, when False only required + 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 `Constant` diff --git a/test/test_context.py b/test/test_context.py index 970fd34..53f9959 100644 --- a/test/test_context.py +++ b/test/test_context.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.context import Context @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> Context: """Test Context - include_optional is a boolean, when False only required + 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 `Context` diff --git a/test/test_context_attribute.py b/test/test_context_attribute.py deleted file mode 100644 index 8da7659..0000000 --- a/test/test_context_attribute.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Permify API - - Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - - The version of the OpenAPI document: v1.0.7 - Contact: hello@permify.co - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from permify.models.context_attribute import ContextAttribute - -class TestContextAttribute(unittest.TestCase): - """ContextAttribute unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ContextAttribute: - """Test ContextAttribute - include_optional 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 `ContextAttribute` - """ - model = ContextAttribute() - if include_optional: - return ContextAttribute( - name = '' - ) - else: - return ContextAttribute( - ) - """ - - def testContextAttribute(self): - """Test ContextAttribute""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_create_list.py b/test/test_create_list.py index 265b5f5..818136a 100644 --- a/test/test_create_list.py +++ b/test/test_create_list.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.create_list import CreateList @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> CreateList: """Test CreateList - include_optional is a boolean, when False only required + 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 `CreateList` diff --git a/test/test_create_struct.py b/test/test_create_struct.py index f6a94c5..3fa5dd9 100644 --- a/test/test_create_struct.py +++ b/test/test_create_struct.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.create_struct import CreateStruct @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> CreateStruct: """Test CreateStruct - include_optional is a boolean, when False only required + 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 `CreateStruct` diff --git a/test/test_data_api.py b/test/test_data_api.py index b0def93..29ae50a 100644 --- a/test/test_data_api.py +++ b/test/test_data_api.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/test/test_data_bundle.py b/test/test_data_bundle.py index 6a6c4f6..519d58f 100644 --- a/test/test_data_bundle.py +++ b/test/test_data_bundle.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.data_bundle import DataBundle @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> DataBundle: """Test DataBundle - include_optional is a boolean, when False only required + 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 `DataBundle` diff --git a/test/test_data_change.py b/test/test_data_change.py index 879890f..abcb509 100644 --- a/test/test_data_change.py +++ b/test/test_data_change.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.data_change import DataChange @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> DataChange: """Test DataChange - include_optional is a boolean, when False only required + 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 `DataChange` diff --git a/test/test_data_change_operation.py b/test/test_data_change_operation.py index 739c590..db6b988 100644 --- a/test/test_data_change_operation.py +++ b/test/test_data_change_operation.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.data_change_operation import DataChangeOperation diff --git a/test/test_data_changes.py b/test/test_data_changes.py index 5cf8587..fa01e90 100644 --- a/test/test_data_changes.py +++ b/test/test_data_changes.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.data_changes import DataChanges @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> DataChanges: """Test DataChanges - include_optional is a boolean, when False only required + 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 `DataChanges` diff --git a/test/test_data_delete_body.py b/test/test_data_delete_body.py index 959614a..4785757 100644 --- a/test/test_data_delete_body.py +++ b/test/test_data_delete_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.data_delete_body import DataDeleteBody @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> DataDeleteBody: """Test DataDeleteBody - include_optional is a boolean, when False only required + 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 `DataDeleteBody` diff --git a/test/test_data_delete_response.py b/test/test_data_delete_response.py index 669da85..eb9fc40 100644 --- a/test/test_data_delete_response.py +++ b/test/test_data_delete_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.data_delete_response import DataDeleteResponse @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> DataDeleteResponse: """Test DataDeleteResponse - include_optional is a boolean, when False only required + 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 `DataDeleteResponse` diff --git a/test/test_data_write_body.py b/test/test_data_write_body.py index 2318767..58d5063 100644 --- a/test/test_data_write_body.py +++ b/test/test_data_write_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.data_write_body import DataWriteBody @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> DataWriteBody: """Test DataWriteBody - include_optional is a boolean, when False only required + 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 `DataWriteBody` diff --git a/test/test_data_write_request_metadata.py b/test/test_data_write_request_metadata.py index 0aaae9a..e06c660 100644 --- a/test/test_data_write_request_metadata.py +++ b/test/test_data_write_request_metadata.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.data_write_request_metadata import DataWriteRequestMetadata @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> DataWriteRequestMetadata: """Test DataWriteRequestMetadata - include_optional is a boolean, when False only required + 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 `DataWriteRequestMetadata` diff --git a/test/test_data_write_response.py b/test/test_data_write_response.py index 6c5f40e..ede66e4 100644 --- a/test/test_data_write_response.py +++ b/test/test_data_write_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.data_write_response import DataWriteResponse @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> DataWriteResponse: """Test DataWriteResponse - include_optional is a boolean, when False only required + 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 `DataWriteResponse` diff --git a/test/test_delete_relationships_body.py b/test/test_delete_relationships_body.py index 36cc6bb..315294e 100644 --- a/test/test_delete_relationships_body.py +++ b/test/test_delete_relationships_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.delete_relationships_body import DeleteRelationshipsBody @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> DeleteRelationshipsBody: """Test DeleteRelationshipsBody - include_optional is a boolean, when False only required + 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 `DeleteRelationshipsBody` diff --git a/test/test_entity.py b/test/test_entity.py index 3f34557..73609ae 100644 --- a/test/test_entity.py +++ b/test/test_entity.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.entity import Entity @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> Entity: """Test Entity - include_optional is a boolean, when False only required + 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 `Entity` diff --git a/test/test_entity_definition.py b/test/test_entity_definition.py index 951dad9..ffbcb27 100644 --- a/test/test_entity_definition.py +++ b/test/test_entity_definition.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.entity_definition import EntityDefinition @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> EntityDefinition: """Test EntityDefinition - include_optional is a boolean, when False only required + 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 `EntityDefinition` diff --git a/test/test_entity_definition_reference.py b/test/test_entity_definition_reference.py index 78d97ae..83e1c4c 100644 --- a/test/test_entity_definition_reference.py +++ b/test/test_entity_definition_reference.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.entity_definition_reference import EntityDefinitionReference diff --git a/test/test_entity_filter.py b/test/test_entity_filter.py index be2ea94..ff08496 100644 --- a/test/test_entity_filter.py +++ b/test/test_entity_filter.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.entity_filter import EntityFilter @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> EntityFilter: """Test EntityFilter - include_optional is a boolean, when False only required + 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 `EntityFilter` diff --git a/test/test_entry.py b/test/test_entry.py index 4f3f306..dab6a18 100644 --- a/test/test_entry.py +++ b/test/test_entry.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.entry import Entry @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> Entry: """Test Entry - include_optional is a boolean, when False only required + 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 `Entry` diff --git a/test/test_expand_leaf.py b/test/test_expand_leaf.py index 8cfe7e3..8eaae3d 100644 --- a/test/test_expand_leaf.py +++ b/test/test_expand_leaf.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.expand_leaf import ExpandLeaf @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> ExpandLeaf: """Test ExpandLeaf - include_optional is a boolean, when False only required + 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 `ExpandLeaf` diff --git a/test/test_expand_tree_node.py b/test/test_expand_tree_node.py index 6566d8f..a75a20e 100644 --- a/test/test_expand_tree_node.py +++ b/test/test_expand_tree_node.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.expand_tree_node import ExpandTreeNode @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> ExpandTreeNode: """Test ExpandTreeNode - include_optional is a boolean, when False only required + 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 `ExpandTreeNode` diff --git a/test/test_expand_tree_node_operation.py b/test/test_expand_tree_node_operation.py index 1f36ab7..70d2fdc 100644 --- a/test/test_expand_tree_node_operation.py +++ b/test/test_expand_tree_node_operation.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.expand_tree_node_operation import ExpandTreeNodeOperation diff --git a/test/test_expr.py b/test/test_expr.py index b509c6b..a91bc2d 100644 --- a/test/test_expr.py +++ b/test/test_expr.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.expr import Expr @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> Expr: """Test Expr - include_optional is a boolean, when False only required + 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 `Expr` diff --git a/test/test_expr_call.py b/test/test_expr_call.py index 4ab2368..70e9b68 100644 --- a/test/test_expr_call.py +++ b/test/test_expr_call.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.expr_call import ExprCall @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> ExprCall: """Test ExprCall - include_optional is a boolean, when False only required + 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 `ExprCall` diff --git a/test/test_function_type.py b/test/test_function_type.py index 067f476..f1f1f70 100644 --- a/test/test_function_type.py +++ b/test/test_function_type.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.function_type import FunctionType @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> FunctionType: """Test FunctionType - include_optional is a boolean, when False only required + 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 `FunctionType` diff --git a/test/test_health_api.py b/test/test_health_api.py deleted file mode 100644 index 325cc3f..0000000 --- a/test/test_health_api.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - Permify API - - Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - - The version of the OpenAPI document: v1.1.1 - Contact: hello@permify.co - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from permify.api.health_api import HealthApi - - -class TestHealthApi(unittest.TestCase): - """HealthApi unit test stubs""" - - def setUp(self) -> None: - self.api = HealthApi() - - def tearDown(self) -> None: - pass - - def test_health_check(self) -> None: - """Test case for health_check - - health api - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_health_response.py b/test/test_health_response.py deleted file mode 100644 index 103e1ab..0000000 --- a/test/test_health_response.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Permify API - - Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - - The version of the OpenAPI document: v1.1.1 - Contact: hello@permify.co - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from permify.models.health_response import HealthResponse - -class TestHealthResponse(unittest.TestCase): - """HealthResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> HealthResponse: - """Test HealthResponse - include_optional 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 `HealthResponse` - """ - model = HealthResponse() - if include_optional: - return HealthResponse( - status = '' - ) - else: - return HealthResponse( - ) - """ - - def testHealthResponse(self): - """Test HealthResponse""" - # 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_ident.py b/test/test_ident.py index 57c61ab..19696ac 100644 --- a/test/test_ident.py +++ b/test/test_ident.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.ident import Ident @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> Ident: """Test Ident - include_optional is a boolean, when False only required + 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 `Ident` diff --git a/test/test_leaf.py b/test/test_leaf.py index d9773fb..05a78e9 100644 --- a/test/test_leaf.py +++ b/test/test_leaf.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.leaf import Leaf @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> Leaf: """Test Leaf - include_optional is a boolean, when False only required + 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 `Leaf` diff --git a/test/test_list_type.py b/test/test_list_type.py index 5ffa33d..df2d382 100644 --- a/test/test_list_type.py +++ b/test/test_list_type.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.list_type import ListType @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> ListType: """Test ListType - include_optional is a boolean, when False only required + 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 `ListType` diff --git a/test/test_lookup_entity_body.py b/test/test_lookup_entity_body.py index 516b0c5..dae622d 100644 --- a/test/test_lookup_entity_body.py +++ b/test/test_lookup_entity_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.lookup_entity_body import LookupEntityBody @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> LookupEntityBody: """Test LookupEntityBody - include_optional is a boolean, when False only required + 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 `LookupEntityBody` diff --git a/test/test_lookup_entity_stream_body.py b/test/test_lookup_entity_stream_body.py index 40f73ab..8664f0e 100644 --- a/test/test_lookup_entity_stream_body.py +++ b/test/test_lookup_entity_stream_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.lookup_entity_stream_body import LookupEntityStreamBody @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> LookupEntityStreamBody: """Test LookupEntityStreamBody - include_optional is a boolean, when False only required + 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 `LookupEntityStreamBody` diff --git a/test/test_lookup_subject_body.py b/test/test_lookup_subject_body.py index 5368ba5..1fd56b6 100644 --- a/test/test_lookup_subject_body.py +++ b/test/test_lookup_subject_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.lookup_subject_body import LookupSubjectBody @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> LookupSubjectBody: """Test LookupSubjectBody - include_optional is a boolean, when False only required + 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 `LookupSubjectBody` @@ -67,6 +68,11 @@ def make_instance(self, include_optional) -> LookupSubjectBody: }, ) ], data = permify.models.data.data(), ), + arguments = [ + permify.models.argument.Argument( + computed_attribute = permify.models.computed_attribute.ComputedAttribute( + name = '', ), ) + ], page_size = 56, continuous_token = '' ) diff --git a/test/test_map_type.py b/test/test_map_type.py index 6816b7a..d793c2f 100644 --- a/test/test_map_type.py +++ b/test/test_map_type.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.map_type import MapType @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> MapType: """Test MapType - include_optional is a boolean, when False only required + 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 `MapType` diff --git a/test/test_partial_write_body.py b/test/test_partial_write_body.py index a9f27f0..5b7eb8f 100644 --- a/test/test_partial_write_body.py +++ b/test/test_partial_write_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.partial_write_body import PartialWriteBody @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> PartialWriteBody: """Test PartialWriteBody - include_optional is a boolean, when False only required + 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 `PartialWriteBody` diff --git a/test/test_partials.py b/test/test_partials.py index 0513a2b..86574d1 100644 --- a/test/test_partials.py +++ b/test/test_partials.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.partials import Partials @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> Partials: """Test Partials - include_optional is a boolean, when False only required + 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 `Partials` diff --git a/test/test_permission_api.py b/test/test_permission_api.py index c3afa2b..4b3ccd7 100644 --- a/test/test_permission_api.py +++ b/test/test_permission_api.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/test/test_permission_check_body.py b/test/test_permission_check_body.py deleted file mode 100644 index 0ea23ab..0000000 --- a/test/test_permission_check_body.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Permify API - - Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - - The version of the OpenAPI document: v1.1.1 - Contact: hello@permify.co - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from permify.models.permission_check_body import PermissionCheckBody - -class TestPermissionCheckBody(unittest.TestCase): - """PermissionCheckBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PermissionCheckBody: - """Test PermissionCheckBody - include_optional 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 `PermissionCheckBody` - """ - model = PermissionCheckBody() - if include_optional: - return PermissionCheckBody( - metadata = permify.models.permission_check_request_metadata.PermissionCheckRequestMetadata( - schema_version = '', - snap_token = '', - depth = 56, ), - entity = permify.models.entity.Entity( - type = '', - id = '', ), - permission = '', - subject = permify.models.subject.Subject( - type = '', - id = '', - relation = '', ), - context = permify.models.context.Context( - tuples = [ - permify.models.tuple.Tuple( - entity = permify.models.entity.Entity( - type = '', - id = '', ), - relation = '', - subject = permify.models.subject.Subject( - type = '', - id = '', - relation = '', ), ) - ], - attributes = [ - permify.models.attribute.Attribute( - attribute = '', - value = { - 'key' : None - }, ) - ], - data = permify.models.data.data(), ), - arguments = [ - permify.models.argument.Argument( - computed_attribute = permify.models.computed_attribute.ComputedAttribute( - name = '', ), ) - ] - ) - else: - return PermissionCheckBody( - ) - """ - - def testPermissionCheckBody(self): - """Test PermissionCheckBody""" - # 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_permission_check_request_metadata.py b/test/test_permission_check_request_metadata.py index a54e7b3..6835726 100644 --- a/test/test_permission_check_request_metadata.py +++ b/test/test_permission_check_request_metadata.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.permission_check_request_metadata import PermissionCheckRequestMetadata @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> PermissionCheckRequestMetadata: """Test PermissionCheckRequestMetadata - include_optional is a boolean, when False only required + 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 `PermissionCheckRequestMetadata` diff --git a/test/test_permission_check_response.py b/test/test_permission_check_response.py index 2dd4ffc..5a617cc 100644 --- a/test/test_permission_check_response.py +++ b/test/test_permission_check_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.permission_check_response import PermissionCheckResponse @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> PermissionCheckResponse: """Test PermissionCheckResponse - include_optional is a boolean, when False only required + 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 `PermissionCheckResponse` diff --git a/test/test_permission_check_response_metadata.py b/test/test_permission_check_response_metadata.py index 5900525..9038726 100644 --- a/test/test_permission_check_response_metadata.py +++ b/test/test_permission_check_response_metadata.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.permission_check_response_metadata import PermissionCheckResponseMetadata @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> PermissionCheckResponseMetadata: """Test PermissionCheckResponseMetadata - include_optional is a boolean, when False only required + 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 `PermissionCheckResponseMetadata` diff --git a/test/test_permission_definition.py b/test/test_permission_definition.py index c7a376d..26523e1 100644 --- a/test/test_permission_definition.py +++ b/test/test_permission_definition.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.permission_definition import PermissionDefinition @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> PermissionDefinition: """Test PermissionDefinition - include_optional is a boolean, when False only required + 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 `PermissionDefinition` diff --git a/test/test_permission_expand_body.py b/test/test_permission_expand_body.py index e56ad40..d9d015e 100644 --- a/test/test_permission_expand_body.py +++ b/test/test_permission_expand_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.permission_expand_body import PermissionExpandBody @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> PermissionExpandBody: """Test PermissionExpandBody - include_optional is a boolean, when False only required + 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 `PermissionExpandBody` diff --git a/test/test_permission_expand_request_metadata.py b/test/test_permission_expand_request_metadata.py index 862cf0f..75cca89 100644 --- a/test/test_permission_expand_request_metadata.py +++ b/test/test_permission_expand_request_metadata.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.permission_expand_request_metadata import PermissionExpandRequestMetadata @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> PermissionExpandRequestMetadata: """Test PermissionExpandRequestMetadata - include_optional is a boolean, when False only required + 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 `PermissionExpandRequestMetadata` diff --git a/test/test_permission_expand_response.py b/test/test_permission_expand_response.py index 3b15909..4947c49 100644 --- a/test/test_permission_expand_response.py +++ b/test/test_permission_expand_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.permission_expand_response import PermissionExpandResponse @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> PermissionExpandResponse: """Test PermissionExpandResponse - include_optional is a boolean, when False only required + 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 `PermissionExpandResponse` diff --git a/test/test_permission_lookup_entity_request_metadata.py b/test/test_permission_lookup_entity_request_metadata.py index c3cc77f..0b677e8 100644 --- a/test/test_permission_lookup_entity_request_metadata.py +++ b/test/test_permission_lookup_entity_request_metadata.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.permission_lookup_entity_request_metadata import PermissionLookupEntityRequestMetadata @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> PermissionLookupEntityRequestMetadata: """Test PermissionLookupEntityRequestMetadata - include_optional is a boolean, when False only required + 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 `PermissionLookupEntityRequestMetadata` diff --git a/test/test_permission_lookup_entity_response.py b/test/test_permission_lookup_entity_response.py index 4053699..4a19d06 100644 --- a/test/test_permission_lookup_entity_response.py +++ b/test/test_permission_lookup_entity_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.permission_lookup_entity_response import PermissionLookupEntityResponse @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> PermissionLookupEntityResponse: """Test PermissionLookupEntityResponse - include_optional is a boolean, when False only required + 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 `PermissionLookupEntityResponse` diff --git a/test/test_permission_lookup_entity_stream_response.py b/test/test_permission_lookup_entity_stream_response.py index 8b6dd69..d4f8fa8 100644 --- a/test/test_permission_lookup_entity_stream_response.py +++ b/test/test_permission_lookup_entity_stream_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.permission_lookup_entity_stream_response import PermissionLookupEntityStreamResponse @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> PermissionLookupEntityStreamResponse: """Test PermissionLookupEntityStreamResponse - include_optional is a boolean, when False only required + 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 `PermissionLookupEntityStreamResponse` diff --git a/test/test_permission_lookup_subject_request_metadata.py b/test/test_permission_lookup_subject_request_metadata.py index 84206d4..a1802fb 100644 --- a/test/test_permission_lookup_subject_request_metadata.py +++ b/test/test_permission_lookup_subject_request_metadata.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.permission_lookup_subject_request_metadata import PermissionLookupSubjectRequestMetadata @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> PermissionLookupSubjectRequestMetadata: """Test PermissionLookupSubjectRequestMetadata - include_optional is a boolean, when False only required + 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 `PermissionLookupSubjectRequestMetadata` diff --git a/test/test_permission_lookup_subject_response.py b/test/test_permission_lookup_subject_response.py index ba4c747..5830807 100644 --- a/test/test_permission_lookup_subject_response.py +++ b/test/test_permission_lookup_subject_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.permission_lookup_subject_response import PermissionLookupSubjectResponse @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> PermissionLookupSubjectResponse: """Test PermissionLookupSubjectResponse - include_optional is a boolean, when False only required + 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 `PermissionLookupSubjectResponse` diff --git a/test/test_permission_subject_permission_request_metadata.py b/test/test_permission_subject_permission_request_metadata.py index f8708cd..98ac22c 100644 --- a/test/test_permission_subject_permission_request_metadata.py +++ b/test/test_permission_subject_permission_request_metadata.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.permission_subject_permission_request_metadata import PermissionSubjectPermissionRequestMetadata @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> PermissionSubjectPermissionRequestMetadata: """Test PermissionSubjectPermissionRequestMetadata - include_optional is a boolean, when False only required + 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 `PermissionSubjectPermissionRequestMetadata` diff --git a/test/test_permission_subject_permission_response.py b/test/test_permission_subject_permission_response.py index b8959ee..e9118ea 100644 --- a/test/test_permission_subject_permission_response.py +++ b/test/test_permission_subject_permission_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.permission_subject_permission_response import PermissionSubjectPermissionResponse @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> PermissionSubjectPermissionResponse: """Test PermissionSubjectPermissionResponse - include_optional is a boolean, when False only required + 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 `PermissionSubjectPermissionResponse` diff --git a/test/test_primitive_type.py b/test/test_primitive_type.py index d40ce84..50f1221 100644 --- a/test/test_primitive_type.py +++ b/test/test_primitive_type.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.primitive_type import PrimitiveType diff --git a/test/test_read_attributes_body.py b/test/test_read_attributes_body.py index ff84ca1..ae52408 100644 --- a/test/test_read_attributes_body.py +++ b/test/test_read_attributes_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.read_attributes_body import ReadAttributesBody @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> ReadAttributesBody: """Test ReadAttributesBody - include_optional is a boolean, when False only required + 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 `ReadAttributesBody` diff --git a/test/test_read_relationships_body.py b/test/test_read_relationships_body.py index 3d79a84..9e0e688 100644 --- a/test/test_read_relationships_body.py +++ b/test/test_read_relationships_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.read_relationships_body import ReadRelationshipsBody @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> ReadRelationshipsBody: """Test ReadRelationshipsBody - include_optional is a boolean, when False only required + 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 `ReadRelationshipsBody` diff --git a/test/test_relation_definition.py b/test/test_relation_definition.py index 4c46592..c898203 100644 --- a/test/test_relation_definition.py +++ b/test/test_relation_definition.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.relation_definition import RelationDefinition @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> RelationDefinition: """Test RelationDefinition - include_optional is a boolean, when False only required + 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 `RelationDefinition` diff --git a/test/test_relation_reference.py b/test/test_relation_reference.py index 0fbff8d..4bb47b1 100644 --- a/test/test_relation_reference.py +++ b/test/test_relation_reference.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.relation_reference import RelationReference @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> RelationReference: """Test RelationReference - include_optional is a boolean, when False only required + 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 `RelationReference` diff --git a/test/test_relationship_delete_response.py b/test/test_relationship_delete_response.py index da82ca5..2986ec7 100644 --- a/test/test_relationship_delete_response.py +++ b/test/test_relationship_delete_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.relationship_delete_response import RelationshipDeleteResponse @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> RelationshipDeleteResponse: """Test RelationshipDeleteResponse - include_optional is a boolean, when False only required + 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 `RelationshipDeleteResponse` diff --git a/test/test_relationship_read_request_metadata.py b/test/test_relationship_read_request_metadata.py index cfa806c..b31e3cd 100644 --- a/test/test_relationship_read_request_metadata.py +++ b/test/test_relationship_read_request_metadata.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.relationship_read_request_metadata import RelationshipReadRequestMetadata @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> RelationshipReadRequestMetadata: """Test RelationshipReadRequestMetadata - include_optional is a boolean, when False only required + 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 `RelationshipReadRequestMetadata` diff --git a/test/test_relationship_read_response.py b/test/test_relationship_read_response.py index 3beca61..7d2413a 100644 --- a/test/test_relationship_read_response.py +++ b/test/test_relationship_read_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.relationship_read_response import RelationshipReadResponse @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> RelationshipReadResponse: """Test RelationshipReadResponse - include_optional is a boolean, when False only required + 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 `RelationshipReadResponse` diff --git a/test/test_relationship_write_request_metadata.py b/test/test_relationship_write_request_metadata.py index 5ace2ea..dcf34af 100644 --- a/test/test_relationship_write_request_metadata.py +++ b/test/test_relationship_write_request_metadata.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.relationship_write_request_metadata import RelationshipWriteRequestMetadata @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> RelationshipWriteRequestMetadata: """Test RelationshipWriteRequestMetadata - include_optional is a boolean, when False only required + 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 `RelationshipWriteRequestMetadata` diff --git a/test/test_relationship_write_response.py b/test/test_relationship_write_response.py index f40e1da..e3fa19d 100644 --- a/test/test_relationship_write_response.py +++ b/test/test_relationship_write_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.relationship_write_response import RelationshipWriteResponse @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> RelationshipWriteResponse: """Test RelationshipWriteResponse - include_optional is a boolean, when False only required + 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 `RelationshipWriteResponse` diff --git a/test/test_rewrite.py b/test/test_rewrite.py index f6dc9c2..12875df 100644 --- a/test/test_rewrite.py +++ b/test/test_rewrite.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.rewrite import Rewrite @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> Rewrite: """Test Rewrite - include_optional is a boolean, when False only required + 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 `Rewrite` diff --git a/test/test_rewrite_operation.py b/test/test_rewrite_operation.py index 4a03764..5907978 100644 --- a/test/test_rewrite_operation.py +++ b/test/test_rewrite_operation.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.rewrite_operation import RewriteOperation diff --git a/test/test_rule_definition.py b/test/test_rule_definition.py index c64d4ed..4d17b41 100644 --- a/test/test_rule_definition.py +++ b/test/test_rule_definition.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.rule_definition import RuleDefinition @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> RuleDefinition: """Test RuleDefinition - include_optional is a boolean, when False only required + include_option is a boolean, when False only required params are included, when True both required and optional params are included """ # uncomment below to create an instance of `RuleDefinition` diff --git a/test/test_run_bundle_body.py b/test/test_run_bundle_body.py index 15674d4..3fc3018 100644 --- a/test/test_run_bundle_body.py +++ b/test/test_run_bundle_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.run_bundle_body import RunBundleBody @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> RunBundleBody: """Test RunBundleBody - include_optional is a boolean, when False only required + 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 `RunBundleBody` diff --git a/test/test_schema_api.py b/test/test_schema_api.py index e1f24b6..675f8e3 100644 --- a/test/test_schema_api.py +++ b/test/test_schema_api.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/test/test_schema_definition.py b/test/test_schema_definition.py index b5057b5..79dd5d3 100644 --- a/test/test_schema_definition.py +++ b/test/test_schema_definition.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.schema_definition import SchemaDefinition @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> SchemaDefinition: """Test SchemaDefinition - include_optional is a boolean, when False only required + 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 `SchemaDefinition` diff --git a/test/test_schema_definition_reference.py b/test/test_schema_definition_reference.py index abf1067..ffab8c8 100644 --- a/test/test_schema_definition_reference.py +++ b/test/test_schema_definition_reference.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.schema_definition_reference import SchemaDefinitionReference diff --git a/test/test_schema_list.py b/test/test_schema_list.py index c818886..bb0a170 100644 --- a/test/test_schema_list.py +++ b/test/test_schema_list.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.schema_list import SchemaList @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> SchemaList: """Test SchemaList - include_optional is a boolean, when False only required + 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 `SchemaList` diff --git a/test/test_schema_list_body.py b/test/test_schema_list_body.py index 67697d2..f034153 100644 --- a/test/test_schema_list_body.py +++ b/test/test_schema_list_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.schema_list_body import SchemaListBody @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> SchemaListBody: """Test SchemaListBody - include_optional is a boolean, when False only required + 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 `SchemaListBody` diff --git a/test/test_schema_list_response.py b/test/test_schema_list_response.py index 4edc367..25b3ccd 100644 --- a/test/test_schema_list_response.py +++ b/test/test_schema_list_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.schema_list_response import SchemaListResponse @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> SchemaListResponse: """Test SchemaListResponse - include_optional is a boolean, when False only required + 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 `SchemaListResponse` diff --git a/test/test_schema_partial_write_request_metadata.py b/test/test_schema_partial_write_request_metadata.py index 37a270e..a07ce13 100644 --- a/test/test_schema_partial_write_request_metadata.py +++ b/test/test_schema_partial_write_request_metadata.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.schema_partial_write_request_metadata import SchemaPartialWriteRequestMetadata @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> SchemaPartialWriteRequestMetadata: """Test SchemaPartialWriteRequestMetadata - include_optional is a boolean, when False only required + 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 `SchemaPartialWriteRequestMetadata` diff --git a/test/test_schema_partial_write_response.py b/test/test_schema_partial_write_response.py index 6fd77e7..9fc3774 100644 --- a/test/test_schema_partial_write_response.py +++ b/test/test_schema_partial_write_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.schema_partial_write_response import SchemaPartialWriteResponse @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> SchemaPartialWriteResponse: """Test SchemaPartialWriteResponse - include_optional is a boolean, when False only required + 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 `SchemaPartialWriteResponse` diff --git a/test/test_schema_read_body.py b/test/test_schema_read_body.py index 99528f0..c1ff5d3 100644 --- a/test/test_schema_read_body.py +++ b/test/test_schema_read_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.schema_read_body import SchemaReadBody @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> SchemaReadBody: """Test SchemaReadBody - include_optional is a boolean, when False only required + 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 `SchemaReadBody` diff --git a/test/test_schema_read_request_metadata.py b/test/test_schema_read_request_metadata.py index bff3b66..8de55c7 100644 --- a/test/test_schema_read_request_metadata.py +++ b/test/test_schema_read_request_metadata.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.schema_read_request_metadata import SchemaReadRequestMetadata @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> SchemaReadRequestMetadata: """Test SchemaReadRequestMetadata - include_optional is a boolean, when False only required + 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 `SchemaReadRequestMetadata` diff --git a/test/test_schema_read_response.py b/test/test_schema_read_response.py index 721ab39..ca588ea 100644 --- a/test/test_schema_read_response.py +++ b/test/test_schema_read_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.schema_read_response import SchemaReadResponse @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> SchemaReadResponse: """Test SchemaReadResponse - include_optional is a boolean, when False only required + 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 `SchemaReadResponse` diff --git a/test/test_schema_write_body.py b/test/test_schema_write_body.py index fb9209a..ae3f2d8 100644 --- a/test/test_schema_write_body.py +++ b/test/test_schema_write_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.schema_write_body import SchemaWriteBody @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> SchemaWriteBody: """Test SchemaWriteBody - include_optional is a boolean, when False only required + 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 `SchemaWriteBody` diff --git a/test/test_schema_write_response.py b/test/test_schema_write_response.py index 8b21e67..956e8ff 100644 --- a/test/test_schema_write_response.py +++ b/test/test_schema_write_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.schema_write_response import SchemaWriteResponse @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> SchemaWriteResponse: """Test SchemaWriteResponse - include_optional is a boolean, when False only required + 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 `SchemaWriteResponse` diff --git a/test/test_select.py b/test/test_select.py index 02ff0a3..deba8c4 100644 --- a/test/test_select.py +++ b/test/test_select.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.select import Select @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> Select: """Test Select - include_optional is a boolean, when False only required + 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 `Select` @@ -91,7 +92,7 @@ def make_instance(self, include_optional) -> Select: comprehension_expr = permify.models.comprehension.Comprehension( iter_var = '', accu_var = '', ), ), - var_field = '', + field = '', test_only = True ) else: diff --git a/test/test_source_info.py b/test/test_source_info.py index 59e73d8..38e66c2 100644 --- a/test/test_source_info.py +++ b/test/test_source_info.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.source_info import SourceInfo @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> SourceInfo: """Test SourceInfo - include_optional is a boolean, when False only required + 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 `SourceInfo` diff --git a/test/test_status.py b/test/test_status.py index 7aa95b9..a2bb272 100644 --- a/test/test_status.py +++ b/test/test_status.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.status import Status @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> Status: """Test Status - include_optional is a boolean, when False only required + 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 `Status` diff --git a/test/test_stream_result_of_permission_lookup_entity_stream_response.py b/test/test_stream_result_of_permission_lookup_entity_stream_response.py index 68efd99..da22cf5 100644 --- a/test/test_stream_result_of_permission_lookup_entity_stream_response.py +++ b/test/test_stream_result_of_permission_lookup_entity_stream_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.stream_result_of_permission_lookup_entity_stream_response import StreamResultOfPermissionLookupEntityStreamResponse @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> StreamResultOfPermissionLookupEntityStreamResponse: """Test StreamResultOfPermissionLookupEntityStreamResponse - include_optional is a boolean, when False only required + 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 `StreamResultOfPermissionLookupEntityStreamResponse` diff --git a/test/test_stream_result_of_watch_response.py b/test/test_stream_result_of_watch_response.py index a46dec6..3bf6583 100644 --- a/test/test_stream_result_of_watch_response.py +++ b/test/test_stream_result_of_watch_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.stream_result_of_watch_response import StreamResultOfWatchResponse @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> StreamResultOfWatchResponse: """Test StreamResultOfWatchResponse - include_optional is a boolean, when False only required + 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 `StreamResultOfWatchResponse` diff --git a/test/test_string_array_value.py b/test/test_string_array_value.py index 4194547..de8dedd 100644 --- a/test/test_string_array_value.py +++ b/test/test_string_array_value.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.string_array_value import StringArrayValue @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> StringArrayValue: """Test StringArrayValue - include_optional is a boolean, when False only required + 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 `StringArrayValue` diff --git a/test/test_subject.py b/test/test_subject.py index 6cf4798..e238650 100644 --- a/test/test_subject.py +++ b/test/test_subject.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.subject import Subject @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> Subject: """Test Subject - include_optional is a boolean, when False only required + 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 `Subject` diff --git a/test/test_subject_filter.py b/test/test_subject_filter.py index a966525..6f695ab 100644 --- a/test/test_subject_filter.py +++ b/test/test_subject_filter.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.subject_filter import SubjectFilter @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> SubjectFilter: """Test SubjectFilter - include_optional is a boolean, when False only required + 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 `SubjectFilter` diff --git a/test/test_subject_permission_body.py b/test/test_subject_permission_body.py index b191c0e..b05781c 100644 --- a/test/test_subject_permission_body.py +++ b/test/test_subject_permission_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.subject_permission_body import SubjectPermissionBody @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> SubjectPermissionBody: """Test SubjectPermissionBody - include_optional is a boolean, when False only required + 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 `SubjectPermissionBody` diff --git a/test/test_subjects.py b/test/test_subjects.py index 3495606..40760bf 100644 --- a/test/test_subjects.py +++ b/test/test_subjects.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.subjects import Subjects @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> Subjects: """Test Subjects - include_optional is a boolean, when False only required + 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 `Subjects` diff --git a/test/test_tenancy_api.py b/test/test_tenancy_api.py index a3bc7b1..53e7b5c 100644 --- a/test/test_tenancy_api.py +++ b/test/test_tenancy_api.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/test/test_tenant.py b/test/test_tenant.py index 44f1690..b2bf386 100644 --- a/test/test_tenant.py +++ b/test/test_tenant.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.tenant import Tenant @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> Tenant: """Test Tenant - include_optional is a boolean, when False only required + 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 `Tenant` diff --git a/test/test_tenant_create_request.py b/test/test_tenant_create_request.py index 4d2462a..d8fa5ce 100644 --- a/test/test_tenant_create_request.py +++ b/test/test_tenant_create_request.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.tenant_create_request import TenantCreateRequest @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> TenantCreateRequest: """Test TenantCreateRequest - include_optional is a boolean, when False only required + 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 `TenantCreateRequest` diff --git a/test/test_tenant_create_response.py b/test/test_tenant_create_response.py index fe3fe7d..d5f5515 100644 --- a/test/test_tenant_create_response.py +++ b/test/test_tenant_create_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.tenant_create_response import TenantCreateResponse @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> TenantCreateResponse: """Test TenantCreateResponse - include_optional is a boolean, when False only required + 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 `TenantCreateResponse` diff --git a/test/test_tenant_delete_response.py b/test/test_tenant_delete_response.py index 8df7b78..d024f9a 100644 --- a/test/test_tenant_delete_response.py +++ b/test/test_tenant_delete_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.tenant_delete_response import TenantDeleteResponse @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> TenantDeleteResponse: """Test TenantDeleteResponse - include_optional is a boolean, when False only required + 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 `TenantDeleteResponse` diff --git a/test/test_tenant_list_request.py b/test/test_tenant_list_request.py index b86b58c..66cd8ee 100644 --- a/test/test_tenant_list_request.py +++ b/test/test_tenant_list_request.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.tenant_list_request import TenantListRequest @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> TenantListRequest: """Test TenantListRequest - include_optional is a boolean, when False only required + 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 `TenantListRequest` diff --git a/test/test_tenant_list_response.py b/test/test_tenant_list_response.py index 4b245aa..f4b2f97 100644 --- a/test/test_tenant_list_response.py +++ b/test/test_tenant_list_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.tenant_list_response import TenantListResponse @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> TenantListResponse: """Test TenantListResponse - include_optional is a boolean, when False only required + 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 `TenantListResponse` diff --git a/test/test_tuple.py b/test/test_tuple.py index d6c2a39..2eff6e9 100644 --- a/test/test_tuple.py +++ b/test/test_tuple.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.tuple import Tuple @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> Tuple: """Test Tuple - include_optional is a boolean, when False only required + 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 `Tuple` diff --git a/test/test_tuple_filter.py b/test/test_tuple_filter.py index 8957ce6..4cff532 100644 --- a/test/test_tuple_filter.py +++ b/test/test_tuple_filter.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.tuple_filter import TupleFilter @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> TupleFilter: """Test TupleFilter - include_optional is a boolean, when False only required + 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 `TupleFilter` diff --git a/test/test_tuple_set.py b/test/test_tuple_set.py index 7978087..52bfaf5 100644 --- a/test/test_tuple_set.py +++ b/test/test_tuple_set.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.tuple_set import TupleSet @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> TupleSet: """Test TupleSet - include_optional is a boolean, when False only required + 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 `TupleSet` diff --git a/test/test_tuple_to_user_set.py b/test/test_tuple_to_user_set.py index ca32a96..7925849 100644 --- a/test/test_tuple_to_user_set.py +++ b/test/test_tuple_to_user_set.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.tuple_to_user_set import TupleToUserSet @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> TupleToUserSet: """Test TupleToUserSet - include_optional is a boolean, when False only required + 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 `TupleToUserSet` diff --git a/test/test_v1_call.py b/test/test_v1_call.py index 8fc11fc..783949e 100644 --- a/test/test_v1_call.py +++ b/test/test_v1_call.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.v1_call import V1Call @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> V1Call: """Test V1Call - include_optional is a boolean, when False only required + 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 `V1Call` diff --git a/test/test_v1_expand.py b/test/test_v1_expand.py index 486b6c6..b093c27 100644 --- a/test/test_v1_expand.py +++ b/test/test_v1_expand.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.v1_expand import V1Expand @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> V1Expand: """Test V1Expand - include_optional is a boolean, when False only required + 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 `V1Expand` diff --git a/test/test_v1_operation.py b/test/test_v1_operation.py index 9432809..e7c17d3 100644 --- a/test/test_v1_operation.py +++ b/test/test_v1_operation.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.v1_operation import V1Operation @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> V1Operation: """Test V1Operation - include_optional is a boolean, when False only required + 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 `V1Operation` diff --git a/test/test_v1alpha1_reference.py b/test/test_v1alpha1_reference.py index 3f70c22..0f7554f 100644 --- a/test/test_v1alpha1_reference.py +++ b/test/test_v1alpha1_reference.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.v1alpha1_reference import V1alpha1Reference @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> V1alpha1Reference: """Test V1alpha1Reference - include_optional is a boolean, when False only required + 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 `V1alpha1Reference` diff --git a/test/test_v1alpha1_type.py b/test/test_v1alpha1_type.py index 30ab00e..6c997fe 100644 --- a/test/test_v1alpha1_type.py +++ b/test/test_v1alpha1_type.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.v1alpha1_type import V1alpha1Type @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> V1alpha1Type: """Test V1alpha1Type - include_optional is a boolean, when False only required + 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 `V1alpha1Type` diff --git a/test/test_values.py b/test/test_values.py index 2ceb5f2..cb6e11f 100644 --- a/test/test_values.py +++ b/test/test_values.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.values import Values @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> Values: """Test Values - include_optional is a boolean, when False only required + 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 `Values` diff --git a/test/test_watch_api.py b/test/test_watch_api.py index 787f073..ebf5ba1 100644 --- a/test/test_watch_api.py +++ b/test/test_watch_api.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/test/test_watch_body.py b/test/test_watch_body.py index f561352..5088fbf 100644 --- a/test/test_watch_body.py +++ b/test/test_watch_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.watch_body import WatchBody @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> WatchBody: """Test WatchBody - include_optional is a boolean, when False only required + 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 `WatchBody` diff --git a/test/test_watch_response.py b/test/test_watch_response.py index 3898006..aa8e216 100644 --- a/test/test_watch_response.py +++ b/test/test_watch_response.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.watch_response import WatchResponse @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> WatchResponse: """Test WatchResponse - include_optional is a boolean, when False only required + 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 `WatchResponse` diff --git a/test/test_well_known_type.py b/test/test_well_known_type.py index cc23b84..3bae932 100644 --- a/test/test_well_known_type.py +++ b/test/test_well_known_type.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.well_known_type import WellKnownType diff --git a/test/test_write_relationships_body.py b/test/test_write_relationships_body.py index 091eaee..8cb98b5 100644 --- a/test/test_write_relationships_body.py +++ b/test/test_write_relationships_body.py @@ -5,7 +5,7 @@ Permify is an open source authorization service for creating fine-grained and scalable authorization systems. - The version of the OpenAPI document: v1.1.3 + The version of the OpenAPI document: v1.4.2 Contact: hello@permify.co Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,6 +14,7 @@ import unittest +import datetime from permify.models.write_relationships_body import WriteRelationshipsBody @@ -28,7 +29,7 @@ def tearDown(self): def make_instance(self, include_optional) -> WriteRelationshipsBody: """Test WriteRelationshipsBody - include_optional is a boolean, when False only required + 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 `WriteRelationshipsBody`