mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-10-23 20:23:00 +00:00
client: regenerate from hanzo-inc/cloud@b9a5b7ab54 (8.5.717)
Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
+11
@@ -13,6 +13,7 @@ pkg/hanzoai/cloud/api/authz_api.py
|
||||
pkg/hanzoai/cloud/api/auto_api.py
|
||||
pkg/hanzoai/cloud/api/base_api.py
|
||||
pkg/hanzoai/cloud/api/benchmark_api.py
|
||||
pkg/hanzoai/cloud/api/beta_api.py
|
||||
pkg/hanzoai/cloud/api/billing_api.py
|
||||
pkg/hanzoai/cloud/api/blueprint_api.py
|
||||
pkg/hanzoai/cloud/api/books_api.py
|
||||
@@ -392,6 +393,9 @@ pkg/hanzoai/cloud/models/benchmark_put_claims_in.py
|
||||
pkg/hanzoai/cloud/models/benchmark_put_claims_out.py
|
||||
pkg/hanzoai/cloud/models/benchmark_run_point.py
|
||||
pkg/hanzoai/cloud/models/benchmark_suite.py
|
||||
pkg/hanzoai/cloud/models/beta_beta_application.py
|
||||
pkg/hanzoai/cloud/models/beta_beta_apply.py
|
||||
pkg/hanzoai/cloud/models/beta_beta_status.py
|
||||
pkg/hanzoai/cloud/models/billing_accounts.py
|
||||
pkg/hanzoai/cloud/models/billing_accounts_total.py
|
||||
pkg/hanzoai/cloud/models/billing_alert.py
|
||||
@@ -3128,6 +3132,13 @@ pkg/hanzoai/cloud/models/webhook_endpoint.py
|
||||
pkg/hanzoai/cloud/models/webhook_endpoint_list.py
|
||||
pkg/hanzoai/cloud/models/webhook_test_result.py
|
||||
pkg/hanzoai/cloud/models/webhook_update_endpoint_in.py
|
||||
pkg/hanzoai/cloud/models/websearch_search_engine.py
|
||||
pkg/hanzoai/cloud/models/websearch_search_engine_key.py
|
||||
pkg/hanzoai/cloud/models/websearch_search_engine_keyed.py
|
||||
pkg/hanzoai/cloud/models/websearch_search_engine_option.py
|
||||
pkg/hanzoai/cloud/models/websearch_search_engine_options.py
|
||||
pkg/hanzoai/cloud/models/websearch_search_engines.py
|
||||
pkg/hanzoai/cloud/models/websearch_search_engines_set.py
|
||||
pkg/hanzoai/cloud/models/websearch_web_engine.py
|
||||
pkg/hanzoai/cloud/models/websearch_web_result.py
|
||||
pkg/hanzoai/cloud/models/websearch_web_search_query.py
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
ref=1d19c5f527eff7913c85108fc1a87631da58d2a9
|
||||
sha256=1d999b3d2cbef418629de7301ba5cddc6bca63f1c32600863534e8a245e69dce
|
||||
ref=b9a5b7ab540218b32fcdd2abf35b70d3e5ad706e
|
||||
sha256=bbd05b7947a83e752ccef718d5b3a7618f83d6e08c4c1e764945eb3899b11190
|
||||
repo=hanzo-inc/cloud
|
||||
path=openapi.yaml
|
||||
|
||||
@@ -31,6 +31,7 @@ __all__ = [
|
||||
"AutoApi",
|
||||
"BaseApi",
|
||||
"BenchmarkApi",
|
||||
"BetaApi",
|
||||
"BillingApi",
|
||||
"BlueprintApi",
|
||||
"BooksApi",
|
||||
@@ -414,6 +415,9 @@ __all__ = [
|
||||
"BenchmarkPutClaimsOut",
|
||||
"BenchmarkRunPoint",
|
||||
"BenchmarkSuite",
|
||||
"BetaBetaApplication",
|
||||
"BetaBetaApply",
|
||||
"BetaBetaStatus",
|
||||
"BillingAccounts",
|
||||
"BillingAccountsTotal",
|
||||
"BillingAlert",
|
||||
@@ -3150,6 +3154,13 @@ __all__ = [
|
||||
"WebhookEndpointList",
|
||||
"WebhookTestResult",
|
||||
"WebhookUpdateEndpointIn",
|
||||
"WebsearchSearchEngine",
|
||||
"WebsearchSearchEngineKey",
|
||||
"WebsearchSearchEngineKeyed",
|
||||
"WebsearchSearchEngineOption",
|
||||
"WebsearchSearchEngineOptions",
|
||||
"WebsearchSearchEngines",
|
||||
"WebsearchSearchEnginesSet",
|
||||
"WebsearchWebEngine",
|
||||
"WebsearchWebResult",
|
||||
"WebsearchWebSearchQuery",
|
||||
@@ -3182,6 +3193,7 @@ from hanzoai.cloud.api.authz_api import AuthzApi as AuthzApi
|
||||
from hanzoai.cloud.api.auto_api import AutoApi as AutoApi
|
||||
from hanzoai.cloud.api.base_api import BaseApi as BaseApi
|
||||
from hanzoai.cloud.api.benchmark_api import BenchmarkApi as BenchmarkApi
|
||||
from hanzoai.cloud.api.beta_api import BetaApi as BetaApi
|
||||
from hanzoai.cloud.api.billing_api import BillingApi as BillingApi
|
||||
from hanzoai.cloud.api.blueprint_api import BlueprintApi as BlueprintApi
|
||||
from hanzoai.cloud.api.books_api import BooksApi as BooksApi
|
||||
@@ -3569,6 +3581,9 @@ from hanzoai.cloud.models.benchmark_put_claims_in import BenchmarkPutClaimsIn as
|
||||
from hanzoai.cloud.models.benchmark_put_claims_out import BenchmarkPutClaimsOut as BenchmarkPutClaimsOut
|
||||
from hanzoai.cloud.models.benchmark_run_point import BenchmarkRunPoint as BenchmarkRunPoint
|
||||
from hanzoai.cloud.models.benchmark_suite import BenchmarkSuite as BenchmarkSuite
|
||||
from hanzoai.cloud.models.beta_beta_application import BetaBetaApplication as BetaBetaApplication
|
||||
from hanzoai.cloud.models.beta_beta_apply import BetaBetaApply as BetaBetaApply
|
||||
from hanzoai.cloud.models.beta_beta_status import BetaBetaStatus as BetaBetaStatus
|
||||
from hanzoai.cloud.models.billing_accounts import BillingAccounts as BillingAccounts
|
||||
from hanzoai.cloud.models.billing_accounts_total import BillingAccountsTotal as BillingAccountsTotal
|
||||
from hanzoai.cloud.models.billing_alert import BillingAlert as BillingAlert
|
||||
@@ -6305,6 +6320,13 @@ from hanzoai.cloud.models.webhook_endpoint import WebhookEndpoint as WebhookEndp
|
||||
from hanzoai.cloud.models.webhook_endpoint_list import WebhookEndpointList as WebhookEndpointList
|
||||
from hanzoai.cloud.models.webhook_test_result import WebhookTestResult as WebhookTestResult
|
||||
from hanzoai.cloud.models.webhook_update_endpoint_in import WebhookUpdateEndpointIn as WebhookUpdateEndpointIn
|
||||
from hanzoai.cloud.models.websearch_search_engine import WebsearchSearchEngine as WebsearchSearchEngine
|
||||
from hanzoai.cloud.models.websearch_search_engine_key import WebsearchSearchEngineKey as WebsearchSearchEngineKey
|
||||
from hanzoai.cloud.models.websearch_search_engine_keyed import WebsearchSearchEngineKeyed as WebsearchSearchEngineKeyed
|
||||
from hanzoai.cloud.models.websearch_search_engine_option import WebsearchSearchEngineOption as WebsearchSearchEngineOption
|
||||
from hanzoai.cloud.models.websearch_search_engine_options import WebsearchSearchEngineOptions as WebsearchSearchEngineOptions
|
||||
from hanzoai.cloud.models.websearch_search_engines import WebsearchSearchEngines as WebsearchSearchEngines
|
||||
from hanzoai.cloud.models.websearch_search_engines_set import WebsearchSearchEnginesSet as WebsearchSearchEnginesSet
|
||||
from hanzoai.cloud.models.websearch_web_engine import WebsearchWebEngine as WebsearchWebEngine
|
||||
from hanzoai.cloud.models.websearch_web_result import WebsearchWebResult as WebsearchWebResult
|
||||
from hanzoai.cloud.models.websearch_web_search_query import WebsearchWebSearchQuery as WebsearchWebSearchQuery
|
||||
|
||||
@@ -14,6 +14,7 @@ from hanzoai.cloud.api.authz_api import AuthzApi
|
||||
from hanzoai.cloud.api.auto_api import AutoApi
|
||||
from hanzoai.cloud.api.base_api import BaseApi
|
||||
from hanzoai.cloud.api.benchmark_api import BenchmarkApi
|
||||
from hanzoai.cloud.api.beta_api import BetaApi
|
||||
from hanzoai.cloud.api.billing_api import BillingApi
|
||||
from hanzoai.cloud.api.blueprint_api import BlueprintApi
|
||||
from hanzoai.cloud.api.books_api import BooksApi
|
||||
|
||||
@@ -0,0 +1,563 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
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 hanzoai.cloud.models.beta_beta_application import BetaBetaApplication
|
||||
from hanzoai.cloud.models.beta_beta_apply import BetaBetaApply
|
||||
from hanzoai.cloud.models.beta_beta_status import BetaBetaStatus
|
||||
|
||||
from hanzoai.cloud.api_client import ApiClient, RequestSerialized
|
||||
from hanzoai.cloud.api_response import ApiResponse
|
||||
from hanzoai.cloud.rest import RESTResponseType
|
||||
|
||||
|
||||
class BetaApi:
|
||||
"""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 get_beta(
|
||||
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,
|
||||
) -> BetaBetaStatus:
|
||||
"""Answers where the caller stands with the beta program in the org they act in: their own application, if they filed one, and whether they may apply now and why.
|
||||
|
||||
Answers where the caller stands with the beta program in the org they act in: their own application, if they filed one, and whether they may apply now and why. Eligibility is judged here from billing, never from anything the caller sends: the org must be on a plan at $100 a month or more (a Max plan, a catalog plan priced there, or enterprise) or hold $100 of paid and granted credit, and the caller must own or administer it. The shared sign-up organization never applies. `granted` says whether the org already holds the program's grant, which is what turns betas on; a declined application may be followed by a new one.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._get_beta_serialize(
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "BetaBetaStatus",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_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 get_beta_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[BetaBetaStatus]:
|
||||
"""Answers where the caller stands with the beta program in the org they act in: their own application, if they filed one, and whether they may apply now and why.
|
||||
|
||||
Answers where the caller stands with the beta program in the org they act in: their own application, if they filed one, and whether they may apply now and why. Eligibility is judged here from billing, never from anything the caller sends: the org must be on a plan at $100 a month or more (a Max plan, a catalog plan priced there, or enterprise) or hold $100 of paid and granted credit, and the caller must own or administer it. The shared sign-up organization never applies. `granted` says whether the org already holds the program's grant, which is what turns betas on; a declined application may be followed by a new one.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._get_beta_serialize(
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "BetaBetaStatus",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_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 get_beta_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:
|
||||
"""Answers where the caller stands with the beta program in the org they act in: their own application, if they filed one, and whether they may apply now and why.
|
||||
|
||||
Answers where the caller stands with the beta program in the org they act in: their own application, if they filed one, and whether they may apply now and why. Eligibility is judged here from billing, never from anything the caller sends: the org must be on a plan at $100 a month or more (a Max plan, a catalog plan priced there, or enterprise) or hold $100 of paid and granted credit, and the caller must own or administer it. The shared sign-up organization never applies. `granted` says whether the org already holds the program's grant, which is what turns betas on; a declined application may be followed by a new one.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._get_beta_serialize(
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "BetaBetaStatus",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _get_beta_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',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
# authentication setting
|
||||
_auth_settings: List[str] = [
|
||||
'bearer'
|
||||
]
|
||||
|
||||
return self.api_client.param_serialize(
|
||||
method='GET',
|
||||
resource_path='/v1/beta',
|
||||
path_params=_path_params,
|
||||
query_params=_query_params,
|
||||
header_params=_header_params,
|
||||
body=_body_params,
|
||||
post_params=_form_params,
|
||||
files=_files,
|
||||
auth_settings=_auth_settings,
|
||||
collection_formats=_collection_formats,
|
||||
_host=_host,
|
||||
_request_auth=_request_auth
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@validate_call
|
||||
def post_beta_apply(
|
||||
self,
|
||||
beta_beta_apply: BetaBetaApply,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Tuple[
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Annotated[StrictFloat, Field(gt=0)]
|
||||
]
|
||||
] = None,
|
||||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> BetaBetaApplication:
|
||||
"""Files the caller's application to the beta program, for the org they act in.
|
||||
|
||||
Files the caller's application to the beta program, for the org they act in. The body is the answers alone; the person, their email and the organization come from the validated principal and X-Org-Id. It is refused unless the caller owns or administers that organization and it stands at the floor — a plan at $100 a month or more, or $100 of paid and granted credit — and never in the shared sign-up organization; when billing cannot say, it is 503 and worth retrying. One application at a time per person and organization: a repeat while one is pending, or approved and still granted, answers 200 with it and changes nothing, so a second tab or a retry cannot file twice; after a decline or a revoked grant, a new filing is a new application (201). A body larger than 128 KiB is 413; an unknown field or answer, or an answer that breaks its question's rule, is 400 naming it.
|
||||
|
||||
:param beta_beta_apply: (required)
|
||||
:type beta_beta_apply: BetaBetaApply
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._post_beta_apply_serialize(
|
||||
beta_beta_apply=beta_beta_apply,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "BetaBetaApplication",
|
||||
'201': "BetaBetaApplication",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_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 post_beta_apply_with_http_info(
|
||||
self,
|
||||
beta_beta_apply: BetaBetaApply,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Tuple[
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Annotated[StrictFloat, Field(gt=0)]
|
||||
]
|
||||
] = None,
|
||||
_request_auth: Optional[Dict[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[BetaBetaApplication]:
|
||||
"""Files the caller's application to the beta program, for the org they act in.
|
||||
|
||||
Files the caller's application to the beta program, for the org they act in. The body is the answers alone; the person, their email and the organization come from the validated principal and X-Org-Id. It is refused unless the caller owns or administers that organization and it stands at the floor — a plan at $100 a month or more, or $100 of paid and granted credit — and never in the shared sign-up organization; when billing cannot say, it is 503 and worth retrying. One application at a time per person and organization: a repeat while one is pending, or approved and still granted, answers 200 with it and changes nothing, so a second tab or a retry cannot file twice; after a decline or a revoked grant, a new filing is a new application (201). A body larger than 128 KiB is 413; an unknown field or answer, or an answer that breaks its question's rule, is 400 naming it.
|
||||
|
||||
:param beta_beta_apply: (required)
|
||||
:type beta_beta_apply: BetaBetaApply
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._post_beta_apply_serialize(
|
||||
beta_beta_apply=beta_beta_apply,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "BetaBetaApplication",
|
||||
'201': "BetaBetaApplication",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_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 post_beta_apply_without_preload_content(
|
||||
self,
|
||||
beta_beta_apply: BetaBetaApply,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Tuple[
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Annotated[StrictFloat, Field(gt=0)]
|
||||
]
|
||||
] = None,
|
||||
_request_auth: Optional[Dict[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:
|
||||
"""Files the caller's application to the beta program, for the org they act in.
|
||||
|
||||
Files the caller's application to the beta program, for the org they act in. The body is the answers alone; the person, their email and the organization come from the validated principal and X-Org-Id. It is refused unless the caller owns or administers that organization and it stands at the floor — a plan at $100 a month or more, or $100 of paid and granted credit — and never in the shared sign-up organization; when billing cannot say, it is 503 and worth retrying. One application at a time per person and organization: a repeat while one is pending, or approved and still granted, answers 200 with it and changes nothing, so a second tab or a retry cannot file twice; after a decline or a revoked grant, a new filing is a new application (201). A body larger than 128 KiB is 413; an unknown field or answer, or an answer that breaks its question's rule, is 400 naming it.
|
||||
|
||||
:param beta_beta_apply: (required)
|
||||
:type beta_beta_apply: BetaBetaApply
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._post_beta_apply_serialize(
|
||||
beta_beta_apply=beta_beta_apply,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "BetaBetaApplication",
|
||||
'201': "BetaBetaApplication",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _post_beta_apply_serialize(
|
||||
self,
|
||||
beta_beta_apply,
|
||||
_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
|
||||
if beta_beta_apply is not None:
|
||||
_body_params = beta_beta_apply
|
||||
|
||||
|
||||
# set the HTTP header `Accept`
|
||||
if 'Accept' not in _header_params:
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
|
||||
# set the HTTP header `Content-Type`
|
||||
if _content_type:
|
||||
_header_params['Content-Type'] = _content_type
|
||||
else:
|
||||
_default_content_type = (
|
||||
self.api_client.select_header_content_type(
|
||||
[
|
||||
'application/json'
|
||||
]
|
||||
)
|
||||
)
|
||||
if _default_content_type is not None:
|
||||
_header_params['Content-Type'] = _default_content_type
|
||||
|
||||
# authentication setting
|
||||
_auth_settings: List[str] = [
|
||||
'bearer'
|
||||
]
|
||||
|
||||
return self.api_client.param_serialize(
|
||||
method='POST',
|
||||
resource_path='/v1/beta/apply',
|
||||
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
|
||||
)
|
||||
|
||||
|
||||
@@ -6506,7 +6506,7 @@ class PricingApi:
|
||||
) -> PricingUserEnablementItem:
|
||||
"""Opts the caller's OWN org into a beta item.
|
||||
|
||||
Opts the caller's OWN org into a beta item. The org is the caller's validated one, so this can never target another org, and the registry refuses anything not in beta — so it can neither re-open an item an operator turned off nor touch one that is already generally available. Requires a signed-in caller with an org.
|
||||
Opts the caller's OWN org into a beta item. The org is the caller's validated one, so this can never target another org, and the registry refuses anything not in beta — so it can neither re-open an item an operator turned off nor touch one that is already generally available. The org must be entitled to betas — it holds the beta program's grant, from an approved application or an operator — or the opt-in is 403; when the program cannot be asked it is 503, and worth retrying. Requires a signed-in owner or admin of the org (403 for a member).
|
||||
|
||||
:param pricing_enablement_opt_ref: (required)
|
||||
:type pricing_enablement_opt_ref: PricingEnablementOptRef
|
||||
@@ -6573,7 +6573,7 @@ class PricingApi:
|
||||
) -> ApiResponse[PricingUserEnablementItem]:
|
||||
"""Opts the caller's OWN org into a beta item.
|
||||
|
||||
Opts the caller's OWN org into a beta item. The org is the caller's validated one, so this can never target another org, and the registry refuses anything not in beta — so it can neither re-open an item an operator turned off nor touch one that is already generally available. Requires a signed-in caller with an org.
|
||||
Opts the caller's OWN org into a beta item. The org is the caller's validated one, so this can never target another org, and the registry refuses anything not in beta — so it can neither re-open an item an operator turned off nor touch one that is already generally available. The org must be entitled to betas — it holds the beta program's grant, from an approved application or an operator — or the opt-in is 403; when the program cannot be asked it is 503, and worth retrying. Requires a signed-in owner or admin of the org (403 for a member).
|
||||
|
||||
:param pricing_enablement_opt_ref: (required)
|
||||
:type pricing_enablement_opt_ref: PricingEnablementOptRef
|
||||
@@ -6640,7 +6640,7 @@ class PricingApi:
|
||||
) -> RESTResponseType:
|
||||
"""Opts the caller's OWN org into a beta item.
|
||||
|
||||
Opts the caller's OWN org into a beta item. The org is the caller's validated one, so this can never target another org, and the registry refuses anything not in beta — so it can neither re-open an item an operator turned off nor touch one that is already generally available. Requires a signed-in caller with an org.
|
||||
Opts the caller's OWN org into a beta item. The org is the caller's validated one, so this can never target another org, and the registry refuses anything not in beta — so it can neither re-open an item an operator turned off nor touch one that is already generally available. The org must be entitled to betas — it holds the beta program's grant, from an approved application or an operator — or the opt-in is 403; when the program cannot be asked it is 503, and worth retrying. Requires a signed-in owner or admin of the org (403 for a member).
|
||||
|
||||
:param pricing_enablement_opt_ref: (required)
|
||||
:type pricing_enablement_opt_ref: PricingEnablementOptRef
|
||||
@@ -6781,7 +6781,7 @@ class PricingApi:
|
||||
) -> PricingUserEnablementItem:
|
||||
"""Removes the caller's OWN org from a beta item's grant list, the reverse of OptIntoBeta and idempotent.
|
||||
|
||||
Removes the caller's OWN org from a beta item's grant list, the reverse of OptIntoBeta and idempotent. The org is the caller's validated one, so this can never revoke another org's grant. Requires a signed-in caller with an org.
|
||||
Removes the caller's OWN org from a beta item's grant list, the reverse of OptIntoBeta and idempotent. The org is the caller's validated one, so this can never revoke another org's grant. Requires a signed-in owner or admin of the org (403 for a member).
|
||||
|
||||
:param pricing_enablement_opt_ref: (required)
|
||||
:type pricing_enablement_opt_ref: PricingEnablementOptRef
|
||||
@@ -6848,7 +6848,7 @@ class PricingApi:
|
||||
) -> ApiResponse[PricingUserEnablementItem]:
|
||||
"""Removes the caller's OWN org from a beta item's grant list, the reverse of OptIntoBeta and idempotent.
|
||||
|
||||
Removes the caller's OWN org from a beta item's grant list, the reverse of OptIntoBeta and idempotent. The org is the caller's validated one, so this can never revoke another org's grant. Requires a signed-in caller with an org.
|
||||
Removes the caller's OWN org from a beta item's grant list, the reverse of OptIntoBeta and idempotent. The org is the caller's validated one, so this can never revoke another org's grant. Requires a signed-in owner or admin of the org (403 for a member).
|
||||
|
||||
:param pricing_enablement_opt_ref: (required)
|
||||
:type pricing_enablement_opt_ref: PricingEnablementOptRef
|
||||
@@ -6915,7 +6915,7 @@ class PricingApi:
|
||||
) -> RESTResponseType:
|
||||
"""Removes the caller's OWN org from a beta item's grant list, the reverse of OptIntoBeta and idempotent.
|
||||
|
||||
Removes the caller's OWN org from a beta item's grant list, the reverse of OptIntoBeta and idempotent. The org is the caller's validated one, so this can never revoke another org's grant. Requires a signed-in caller with an org.
|
||||
Removes the caller's OWN org from a beta item's grant list, the reverse of OptIntoBeta and idempotent. The org is the caller's validated one, so this can never revoke another org's grant. Requires a signed-in owner or admin of the org (403 for a member).
|
||||
|
||||
:param pricing_enablement_opt_ref: (required)
|
||||
:type pricing_enablement_opt_ref: PricingEnablementOptRef
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -276,6 +276,9 @@ from hanzoai.cloud.models.benchmark_put_claims_in import BenchmarkPutClaimsIn
|
||||
from hanzoai.cloud.models.benchmark_put_claims_out import BenchmarkPutClaimsOut
|
||||
from hanzoai.cloud.models.benchmark_run_point import BenchmarkRunPoint
|
||||
from hanzoai.cloud.models.benchmark_suite import BenchmarkSuite
|
||||
from hanzoai.cloud.models.beta_beta_application import BetaBetaApplication
|
||||
from hanzoai.cloud.models.beta_beta_apply import BetaBetaApply
|
||||
from hanzoai.cloud.models.beta_beta_status import BetaBetaStatus
|
||||
from hanzoai.cloud.models.billing_accounts import BillingAccounts
|
||||
from hanzoai.cloud.models.billing_accounts_total import BillingAccountsTotal
|
||||
from hanzoai.cloud.models.billing_alert import BillingAlert
|
||||
@@ -3012,6 +3015,13 @@ from hanzoai.cloud.models.webhook_endpoint import WebhookEndpoint
|
||||
from hanzoai.cloud.models.webhook_endpoint_list import WebhookEndpointList
|
||||
from hanzoai.cloud.models.webhook_test_result import WebhookTestResult
|
||||
from hanzoai.cloud.models.webhook_update_endpoint_in import WebhookUpdateEndpointIn
|
||||
from hanzoai.cloud.models.websearch_search_engine import WebsearchSearchEngine
|
||||
from hanzoai.cloud.models.websearch_search_engine_key import WebsearchSearchEngineKey
|
||||
from hanzoai.cloud.models.websearch_search_engine_keyed import WebsearchSearchEngineKeyed
|
||||
from hanzoai.cloud.models.websearch_search_engine_option import WebsearchSearchEngineOption
|
||||
from hanzoai.cloud.models.websearch_search_engine_options import WebsearchSearchEngineOptions
|
||||
from hanzoai.cloud.models.websearch_search_engines import WebsearchSearchEngines
|
||||
from hanzoai.cloud.models.websearch_search_engines_set import WebsearchSearchEnginesSet
|
||||
from hanzoai.cloud.models.websearch_web_engine import WebsearchWebEngine
|
||||
from hanzoai.cloud.models.websearch_web_result import WebsearchWebResult
|
||||
from hanzoai.cloud.models.websearch_web_search_query import WebsearchWebSearchQuery
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
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 typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class BetaBetaApplication(BaseModel):
|
||||
"""
|
||||
BetaBetaApplication
|
||||
""" # noqa: E501
|
||||
created: Optional[StrictStr] = Field(default=None, description="Created is when it was filed, RFC 3339.")
|
||||
decided: Optional[StrictStr] = Field(default=None, description="Decided is when an operator decided it, RFC 3339; absent while pending.")
|
||||
id: Optional[StrictStr] = Field(default=None, description="ID names the application.")
|
||||
status: Optional[StrictStr] = Field(default=None, description="Status is \"pending\" until an operator decides, then \"approved\" or \"declined\".")
|
||||
__properties: ClassVar[List[str]] = ["created", "decided", "id", "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 BetaBetaApplication 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 BetaBetaApplication from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"created": obj.get("created"),
|
||||
"decided": obj.get("decided"),
|
||||
"id": obj.get("id"),
|
||||
"status": obj.get("status")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
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
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class BetaBetaApply(BaseModel):
|
||||
"""
|
||||
BetaBetaApply
|
||||
""" # noqa: E501
|
||||
answers: Optional[Dict[str, Any]] = Field(default=None, description="Answers are the form's answers, by question id: text for a question, true or false for an acknowledgement. Every required question is answered and every required acknowledgement is true; a question the form does not ask is refused.")
|
||||
__properties: ClassVar[List[str]] = ["answers"]
|
||||
|
||||
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 BetaBetaApply 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 BetaBetaApply from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"answers": obj.get("answers")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
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, StrictBool, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.beta_beta_application import BetaBetaApplication
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class BetaBetaStatus(BaseModel):
|
||||
"""
|
||||
BetaBetaStatus
|
||||
""" # noqa: E501
|
||||
application: Optional[BetaBetaApplication] = Field(default=None, description="Application is the caller's newest application in this org, whatever its status, or null when they have filed none.")
|
||||
credit: Optional[StrictInt] = Field(default=None, description="Credit is the org's cash plus granted credit, in cents, never counting the credit line; null when the ledger could not be read.")
|
||||
eligible: Optional[StrictBool] = Field(default=None, description="Eligible is whether the caller may apply now: true when they own or administer the org and it stands at the floor by plan or by funds, false when it does not, and null when nothing read qualifies and a billing read failed, so the answer is not known yet.")
|
||||
granted: Optional[StrictBool] = Field(default=None, description="Granted is whether the org holds the beta program's grant now — from an approved application or an operator — which is what lets it turn betas on.")
|
||||
org: Optional[StrictStr] = Field(default=None, description="Org is the organization judged: the one the caller acts in (X-Org-Id).")
|
||||
plan: Optional[StrictBool] = Field(default=None, description="Plan is whether the org's plan or an active subscription stands at $100 a month or more; null when billing could not say.")
|
||||
reason: Optional[StrictStr] = Field(default=None, description="Reason says, in one sentence, why the caller may or may not apply.")
|
||||
__properties: ClassVar[List[str]] = ["application", "credit", "eligible", "granted", "org", "plan", "reason"]
|
||||
|
||||
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 BetaBetaStatus 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 application
|
||||
if self.application:
|
||||
_dict['application'] = self.application.to_dict()
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of BetaBetaStatus from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"application": BetaBetaApplication.from_dict(obj["application"]) if obj.get("application") is not None else None,
|
||||
"credit": obj.get("credit"),
|
||||
"eligible": obj.get("eligible"),
|
||||
"granted": obj.get("granted"),
|
||||
"org": obj.get("org"),
|
||||
"plan": obj.get("plan"),
|
||||
"reason": obj.get("reason")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ class PricingUserEnablementItem(BaseModel):
|
||||
"""
|
||||
PricingUserEnablementItem
|
||||
""" # noqa: E501
|
||||
can_opt_in: Optional[StrictBool] = Field(default=None, description="CanOptIn is whether POST /v1/pricing/enablement/optin would do anything here: the item is in beta and this org is not on its list yet. False for a caller with no validated org, who has no org to enrol.", alias="canOptIn")
|
||||
can_opt_in: Optional[StrictBool] = Field(default=None, description="CanOptIn is whether POST /v1/pricing/enablement/optin would do anything here: the item is in beta, this org is not on its list yet, and the org is entitled to betas (it holds the beta program's grant). False for a caller with no validated org, who has no org to enrol.", alias="canOptIn")
|
||||
effective: Optional[StrictBool] = Field(default=None, description="Effective is whether the caller's org may use the item right now, which is the field to branch on: true for any ga item, for a beta this org holds, and never for an off one.")
|
||||
id: Optional[StrictStr] = Field(default=None, description="ID is the item within that namespace — a model id, a provider name, or a feature key.")
|
||||
kind: Optional[StrictStr] = Field(default=None, description="Kind is the namespace the id lives in: \"model\", \"provider\" or \"feature\".")
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
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, StrictBool, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.websearch_search_engine_option import WebsearchSearchEngineOption
|
||||
from hanzoai.cloud.models.websearch_search_engine_options import WebsearchSearchEngineOptions
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class WebsearchSearchEngine(BaseModel):
|
||||
"""
|
||||
WebsearchSearchEngine
|
||||
""" # noqa: E501
|
||||
accepts_key: Optional[StrictBool] = Field(default=None, description="AcceptsKey is whether the engine takes an API key at all.", alias="acceptsKey")
|
||||
available: Optional[StrictBool] = Field(default=None, description="Available is whether the engine answers from this cluster as things stand: it needs no key there (bing, ddg), or its key is held. Mojeek's keyless page still runs as a fallback but does not count, because it does not answer from this cluster's egress.")
|
||||
enabled: Optional[StrictBool] = Field(default=None, description="Enabled is whether searches run it.")
|
||||
keyed: Optional[StrictBool] = Field(default=None, description="Keyed is whether the platform holds a key for it in KMS. The key itself is never returned by any operation.")
|
||||
name: Optional[StrictStr] = Field(default=None, description="Name is the engine: `mojeek`, `bing`, `brave` or `ddg`.")
|
||||
needs_key: Optional[StrictBool] = Field(default=None, description="NeedsKey is whether the engine answers only with a key.", alias="needsKey")
|
||||
options: Optional[WebsearchSearchEngineOptions] = Field(default=None, description="Options are the values the engine is asked with, defaults filled in.")
|
||||
order: Optional[StrictInt] = Field(default=None, description="Order is its place among the enabled engines, from 1; 0 when disabled.")
|
||||
supports: Optional[List[WebsearchSearchEngineOption]] = Field(default=None, description="Supports lists the options the engine reads, with each one's bounds.")
|
||||
__properties: ClassVar[List[str]] = ["acceptsKey", "available", "enabled", "keyed", "name", "needsKey", "options", "order", "supports"]
|
||||
|
||||
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 WebsearchSearchEngine 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 options
|
||||
if self.options:
|
||||
_dict['options'] = self.options.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in supports (list)
|
||||
_items = []
|
||||
if self.supports:
|
||||
for _item_supports in self.supports:
|
||||
if _item_supports:
|
||||
_items.append(_item_supports.to_dict())
|
||||
_dict['supports'] = _items
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of WebsearchSearchEngine from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"acceptsKey": obj.get("acceptsKey"),
|
||||
"available": obj.get("available"),
|
||||
"enabled": obj.get("enabled"),
|
||||
"keyed": obj.get("keyed"),
|
||||
"name": obj.get("name"),
|
||||
"needsKey": obj.get("needsKey"),
|
||||
"options": WebsearchSearchEngineOptions.from_dict(obj["options"]) if obj.get("options") is not None else None,
|
||||
"order": obj.get("order"),
|
||||
"supports": [WebsearchSearchEngineOption.from_dict(_item) for _item in obj["supports"]] if obj.get("supports") is not None else None
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
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 typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class WebsearchSearchEngineKey(BaseModel):
|
||||
"""
|
||||
WebsearchSearchEngineKey
|
||||
""" # noqa: E501
|
||||
key: Optional[StrictStr] = Field(default=None, description="Key is the API key. Sealed in KMS and never returned, logged or echoed. Never read from the query string.")
|
||||
name: Optional[StrictStr] = Field(default=None, description="Name is the engine, from the path.")
|
||||
__properties: ClassVar[List[str]] = ["key", "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 WebsearchSearchEngineKey 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 WebsearchSearchEngineKey from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"key": obj.get("key"),
|
||||
"name": obj.get("name")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
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, StrictBool, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class WebsearchSearchEngineKeyed(BaseModel):
|
||||
"""
|
||||
WebsearchSearchEngineKeyed
|
||||
""" # noqa: E501
|
||||
keyed: Optional[StrictBool] = Field(default=None, description="Keyed is whether a key is now held.")
|
||||
name: Optional[StrictStr] = Field(default=None, description="Name is the engine.")
|
||||
__properties: ClassVar[List[str]] = ["keyed", "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 WebsearchSearchEngineKeyed 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 WebsearchSearchEngineKeyed from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"keyed": obj.get("keyed"),
|
||||
"name": obj.get("name")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
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, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class WebsearchSearchEngineOption(BaseModel):
|
||||
"""
|
||||
WebsearchSearchEngineOption
|
||||
""" # noqa: E501
|
||||
default: Optional[StrictInt] = Field(default=None, description="Default is the count used when none is set. Absent for a text option, whose default is unset.")
|
||||
max: Optional[StrictInt] = Field(default=None, description="Max is the most count the engine accepts. Absent for a text option.")
|
||||
min: Optional[StrictInt] = Field(default=None, description="Min is the least count the engine accepts. Absent for a text option.")
|
||||
name: Optional[StrictStr] = Field(default=None, description="Name is the option: `count`, `language` or `region`.")
|
||||
param: Optional[StrictStr] = Field(default=None, description="Param is the engine's own query parameter the option sets, such as `t` or `rb` for Mojeek.")
|
||||
__properties: ClassVar[List[str]] = ["default", "max", "min", "name", "param"]
|
||||
|
||||
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 WebsearchSearchEngineOption 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 WebsearchSearchEngineOption from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"default": obj.get("default"),
|
||||
"max": obj.get("max"),
|
||||
"min": obj.get("min"),
|
||||
"name": obj.get("name"),
|
||||
"param": obj.get("param")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
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, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class WebsearchSearchEngineOptions(BaseModel):
|
||||
"""
|
||||
WebsearchSearchEngineOptions
|
||||
""" # noqa: E501
|
||||
count: Optional[StrictInt] = Field(default=None, description="Count is how many hits the engine is asked for per search. 0 or absent on a write means the engine's default; a read reports the value in force.")
|
||||
language: Optional[StrictStr] = Field(default=None, description="Language is the default language the engine is asked in, as a tag like `en` or `en-US`. A search that names its own language overrides it.")
|
||||
region: Optional[StrictStr] = Field(default=None, description="Region is a two-letter country code the engine favours, like `GB`. Stored upper case.")
|
||||
__properties: ClassVar[List[str]] = ["count", "language", "region"]
|
||||
|
||||
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 WebsearchSearchEngineOptions 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 WebsearchSearchEngineOptions from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"count": obj.get("count"),
|
||||
"language": obj.get("language"),
|
||||
"region": obj.get("region")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
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, StrictBool
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from hanzoai.cloud.models.websearch_search_engine import WebsearchSearchEngine
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class WebsearchSearchEngines(BaseModel):
|
||||
"""
|
||||
WebsearchSearchEngines
|
||||
""" # noqa: E501
|
||||
engines: Optional[List[WebsearchSearchEngine]] = Field(default=None, description="Engines are the enabled engines in the order they run, then the rest by name.")
|
||||
saved: Optional[StrictBool] = Field(default=None, description="Saved is whether a setting is stored. False means the default is in force: Mojeek alone when its key is held, else bing, ddg and Mojeek.")
|
||||
__properties: ClassVar[List[str]] = ["engines", "saved"]
|
||||
|
||||
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 WebsearchSearchEngines 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 each item in engines (list)
|
||||
_items = []
|
||||
if self.engines:
|
||||
for _item_engines in self.engines:
|
||||
if _item_engines:
|
||||
_items.append(_item_engines.to_dict())
|
||||
_dict['engines'] = _items
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of WebsearchSearchEngines from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"engines": [WebsearchSearchEngine.from_dict(_item) for _item in obj["engines"]] if obj.get("engines") is not None else None,
|
||||
"saved": obj.get("saved")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Hanzo Cloud API
|
||||
|
||||
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
||||
|
||||
The version of the OpenAPI document: v1
|
||||
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 hanzoai.cloud.models.websearch_search_engine_options import WebsearchSearchEngineOptions
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class WebsearchSearchEnginesSet(BaseModel):
|
||||
"""
|
||||
WebsearchSearchEnginesSet
|
||||
""" # noqa: E501
|
||||
enabled: Optional[List[StrictStr]] = Field(default=None, description="Enabled are the engines searches run, in order. At least one, each a registered engine named once, and at least one of them must be available.")
|
||||
options: Optional[Dict[str, WebsearchSearchEngineOptions]] = Field(default=None, description="Options are each engine's values, by engine name — for any registered engine, enabled or not. An engine or a field left out takes its default: the setting replaces the stored one whole.")
|
||||
__properties: ClassVar[List[str]] = ["enabled", "options"]
|
||||
|
||||
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 WebsearchSearchEnginesSet 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 each value in options (dict)
|
||||
_field_dict = {}
|
||||
if self.options:
|
||||
for _key_options in self.options:
|
||||
if self.options[_key_options]:
|
||||
_field_dict[_key_options] = self.options[_key_options].to_dict()
|
||||
_dict['options'] = _field_dict
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of WebsearchSearchEnginesSet from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"enabled": obj.get("enabled"),
|
||||
"options": dict(
|
||||
(_k, WebsearchSearchEngineOptions.from_dict(_v))
|
||||
for _k, _v in obj["options"].items()
|
||||
)
|
||||
if obj.get("options") is not None
|
||||
else None
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "hanzoai"
|
||||
version = "8.5.714"
|
||||
version = "8.5.717"
|
||||
description = "The official Python library for the Hanzo API"
|
||||
dynamic = ["readme"]
|
||||
license = "Apache-2.0"
|
||||
|
||||
Reference in New Issue
Block a user