mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-10-23 20:23:00 +00:00
6486 lines
270 KiB
Python
6486 lines
270 KiB
Python
# 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 pydantic import Field, StrictStr
|
||
from typing import Any, Dict
|
||
from typing_extensions import Annotated
|
||
from hanzoai.cloud.models.pricing_card import PricingCard
|
||
from hanzoai.cloud.models.pricing_enablement_board import PricingEnablementBoard
|
||
from hanzoai.cloud.models.pricing_pricing_health import PricingPricingHealth
|
||
from hanzoai.cloud.models.pricing_pricing_model_list import PricingPricingModelList
|
||
from hanzoai.cloud.models.pricing_pricing_plan_list import PricingPricingPlanList
|
||
from hanzoai.cloud.models.pricing_pricing_preset_list import PricingPricingPresetList
|
||
from hanzoai.cloud.models.pricing_pricing_provider_list import PricingPricingProviderList
|
||
from hanzoai.cloud.models.pricing_pricing_region_list import PricingPricingRegionList
|
||
from hanzoai.cloud.models.pricing_pricing_tier_list import PricingPricingTierList
|
||
from hanzoai.cloud.models.pricing_pricing_tool_list import PricingPricingToolList
|
||
|
||
from hanzoai.cloud.api_client import ApiClient, RequestSerialized
|
||
from hanzoai.cloud.api_response import ApiResponse
|
||
from hanzoai.cloud.rest import RESTResponseType
|
||
|
||
|
||
class PricingApi:
|
||
"""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_pricing(
|
||
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,
|
||
) -> Dict[str, object]:
|
||
"""Returns the whole pricing catalog in one document: Zen and third-party models, providers, model families, the free-model list, plan and infrastructure pricing.
|
||
|
||
Returns the whole pricing catalog in one document: Zen and third-party models, providers, model families, the free-model list, plan and infrastructure pricing. Every model and provider it names is filtered to what the caller's org may see — the same gate the leaf routes apply, so this can never be an un-gated second source for what they hide.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "Dict[str, object]",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_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[Dict[str, object]]:
|
||
"""Returns the whole pricing catalog in one document: Zen and third-party models, providers, model families, the free-model list, plan and infrastructure pricing.
|
||
|
||
Returns the whole pricing catalog in one document: Zen and third-party models, providers, model families, the free-model list, plan and infrastructure pricing. Every model and provider it names is filtered to what the caller's org may see — the same gate the leaf routes apply, so this can never be an un-gated second source for what they hide.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "Dict[str, object]",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_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:
|
||
"""Returns the whole pricing catalog in one document: Zen and third-party models, providers, model families, the free-model list, plan and infrastructure pricing.
|
||
|
||
Returns the whole pricing catalog in one document: Zen and third-party models, providers, model families, the free-model list, plan and infrastructure pricing. Every model and provider it names is filtered to what the caller's org may see — the same gate the leaf routes apply, so this can never be an un-gated second source for what they hide.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "Dict[str, object]",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_param,
|
||
_request_timeout=_request_timeout
|
||
)
|
||
return response_data.response
|
||
|
||
|
||
def _get_pricing_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/pricing',
|
||
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 get_pricing_base(
|
||
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,
|
||
) -> PricingPricingPlanList:
|
||
"""Returns the Hanzo Base plans — the managed-instance tiers, each with its monthly and annual price, storage and request allowances and feature list.
|
||
|
||
Returns the Hanzo Base plans — the managed-instance tiers, each with its monthly and annual price, storage and request allowances and feature list.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_base_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingPlanList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_base_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[PricingPricingPlanList]:
|
||
"""Returns the Hanzo Base plans — the managed-instance tiers, each with its monthly and annual price, storage and request allowances and feature list.
|
||
|
||
Returns the Hanzo Base plans — the managed-instance tiers, each with its monthly and annual price, storage and request allowances and feature list.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_base_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingPlanList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_base_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:
|
||
"""Returns the Hanzo Base plans — the managed-instance tiers, each with its monthly and annual price, storage and request allowances and feature list.
|
||
|
||
Returns the Hanzo Base plans — the managed-instance tiers, each with its monthly and annual price, storage and request allowances and feature list.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_base_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingPlanList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_param,
|
||
_request_timeout=_request_timeout
|
||
)
|
||
return response_data.response
|
||
|
||
|
||
def _get_pricing_base_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/pricing/base',
|
||
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 get_pricing_blockchain(
|
||
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,
|
||
) -> PricingPricingPlanList:
|
||
"""Returns the blockchain access plans — the RPC and node tiers, each with its monthly price, compute-unit allowance and feature list.
|
||
|
||
Returns the blockchain access plans — the RPC and node tiers, each with its monthly price, compute-unit allowance and feature list.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_blockchain_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingPlanList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_blockchain_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[PricingPricingPlanList]:
|
||
"""Returns the blockchain access plans — the RPC and node tiers, each with its monthly price, compute-unit allowance and feature list.
|
||
|
||
Returns the blockchain access plans — the RPC and node tiers, each with its monthly price, compute-unit allowance and feature list.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_blockchain_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingPlanList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_blockchain_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:
|
||
"""Returns the blockchain access plans — the RPC and node tiers, each with its monthly price, compute-unit allowance and feature list.
|
||
|
||
Returns the blockchain access plans — the RPC and node tiers, each with its monthly price, compute-unit allowance and feature list.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_blockchain_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingPlanList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_param,
|
||
_request_timeout=_request_timeout
|
||
)
|
||
return response_data.response
|
||
|
||
|
||
def _get_pricing_blockchain_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/pricing/blockchain',
|
||
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 get_pricing_cloud(
|
||
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,
|
||
) -> Dict[str, object]:
|
||
"""Returns the public cloud section of the catalog in one document: its instance plans, its regions and its block-storage prices.
|
||
|
||
Returns the public cloud section of the catalog in one document: its instance plans, its regions and its block-storage prices. The section's internal half — the provider costs Hanzo pays and the plan-to- provider routing table — is stripped before it is served, so this is what a customer may see and nothing more.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_cloud_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "Dict[str, object]",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_cloud_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[Dict[str, object]]:
|
||
"""Returns the public cloud section of the catalog in one document: its instance plans, its regions and its block-storage prices.
|
||
|
||
Returns the public cloud section of the catalog in one document: its instance plans, its regions and its block-storage prices. The section's internal half — the provider costs Hanzo pays and the plan-to- provider routing table — is stripped before it is served, so this is what a customer may see and nothing more.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_cloud_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "Dict[str, object]",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_cloud_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:
|
||
"""Returns the public cloud section of the catalog in one document: its instance plans, its regions and its block-storage prices.
|
||
|
||
Returns the public cloud section of the catalog in one document: its instance plans, its regions and its block-storage prices. The section's internal half — the provider costs Hanzo pays and the plan-to- provider routing table — is stripped before it is served, so this is what a customer may see and nothing more.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_cloud_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "Dict[str, object]",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_param,
|
||
_request_timeout=_request_timeout
|
||
)
|
||
return response_data.response
|
||
|
||
|
||
def _get_pricing_cloud_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/pricing/cloud',
|
||
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 get_pricing_cloud_plans(
|
||
self,
|
||
_request_timeout: Union[
|
||
None,
|
||
Annotated[StrictFloat, Field(gt=0)],
|
||
Tuple[
|
||
Annotated[StrictFloat, Field(gt=0)],
|
||
Annotated[StrictFloat, Field(gt=0)]
|
||
]
|
||
] = None,
|
||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||
_content_type: Optional[StrictStr] = None,
|
||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||
) -> PricingPricingPlanList:
|
||
"""Returns just the cloud instance plans — each with its vCPU, memory, disk, CPU type, VM allowance, feature list and monthly and hourly price.
|
||
|
||
Returns just the cloud instance plans — each with its vCPU, memory, disk, CPU type, VM allowance, feature list and monthly and hourly price. It is the plans of the cloud section on their own.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_cloud_plans_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingPlanList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_cloud_plans_with_http_info(
|
||
self,
|
||
_request_timeout: Union[
|
||
None,
|
||
Annotated[StrictFloat, Field(gt=0)],
|
||
Tuple[
|
||
Annotated[StrictFloat, Field(gt=0)],
|
||
Annotated[StrictFloat, Field(gt=0)]
|
||
]
|
||
] = None,
|
||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||
_content_type: Optional[StrictStr] = None,
|
||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||
) -> ApiResponse[PricingPricingPlanList]:
|
||
"""Returns just the cloud instance plans — each with its vCPU, memory, disk, CPU type, VM allowance, feature list and monthly and hourly price.
|
||
|
||
Returns just the cloud instance plans — each with its vCPU, memory, disk, CPU type, VM allowance, feature list and monthly and hourly price. It is the plans of the cloud section on their own.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_cloud_plans_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingPlanList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_cloud_plans_without_preload_content(
|
||
self,
|
||
_request_timeout: Union[
|
||
None,
|
||
Annotated[StrictFloat, Field(gt=0)],
|
||
Tuple[
|
||
Annotated[StrictFloat, Field(gt=0)],
|
||
Annotated[StrictFloat, Field(gt=0)]
|
||
]
|
||
] = None,
|
||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||
_content_type: Optional[StrictStr] = None,
|
||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||
) -> RESTResponseType:
|
||
"""Returns just the cloud instance plans — each with its vCPU, memory, disk, CPU type, VM allowance, feature list and monthly and hourly price.
|
||
|
||
Returns just the cloud instance plans — each with its vCPU, memory, disk, CPU type, VM allowance, feature list and monthly and hourly price. It is the plans of the cloud section on their own.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_cloud_plans_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingPlanList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_param,
|
||
_request_timeout=_request_timeout
|
||
)
|
||
return response_data.response
|
||
|
||
|
||
def _get_pricing_cloud_plans_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/pricing/cloud/plans',
|
||
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 get_pricing_cloud_regions(
|
||
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,
|
||
) -> PricingPricingRegionList:
|
||
"""Returns the regions a cloud instance can be placed in, each with its id, display name and physical location.
|
||
|
||
Returns the regions a cloud instance can be placed in, each with its id, display name and physical location. It is the regions of the cloud section on their own.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_cloud_regions_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingRegionList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_cloud_regions_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[PricingPricingRegionList]:
|
||
"""Returns the regions a cloud instance can be placed in, each with its id, display name and physical location.
|
||
|
||
Returns the regions a cloud instance can be placed in, each with its id, display name and physical location. It is the regions of the cloud section on their own.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_cloud_regions_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingRegionList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_cloud_regions_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:
|
||
"""Returns the regions a cloud instance can be placed in, each with its id, display name and physical location.
|
||
|
||
Returns the regions a cloud instance can be placed in, each with its id, display name and physical location. It is the regions of the cloud section on their own.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_cloud_regions_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingRegionList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_param,
|
||
_request_timeout=_request_timeout
|
||
)
|
||
return response_data.response
|
||
|
||
|
||
def _get_pricing_cloud_regions_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/pricing/cloud/regions',
|
||
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 get_pricing_cloud_storage(
|
||
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,
|
||
) -> Dict[str, object]:
|
||
"""Returns the block-storage prices of the cloud section: the per-GB monthly rate and the volume size bounds a caller may ask for.
|
||
|
||
Returns the block-storage prices of the cloud section: the per-GB monthly rate and the volume size bounds a caller may ask for.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_cloud_storage_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "Dict[str, object]",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_cloud_storage_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[Dict[str, object]]:
|
||
"""Returns the block-storage prices of the cloud section: the per-GB monthly rate and the volume size bounds a caller may ask for.
|
||
|
||
Returns the block-storage prices of the cloud section: the per-GB monthly rate and the volume size bounds a caller may ask for.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_cloud_storage_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "Dict[str, object]",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_cloud_storage_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:
|
||
"""Returns the block-storage prices of the cloud section: the per-GB monthly rate and the volume size bounds a caller may ask for.
|
||
|
||
Returns the block-storage prices of the cloud section: the per-GB monthly rate and the volume size bounds a caller may ask for.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_cloud_storage_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "Dict[str, object]",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_param,
|
||
_request_timeout=_request_timeout
|
||
)
|
||
return response_data.response
|
||
|
||
|
||
def _get_pricing_cloud_storage_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/pricing/cloud/storage',
|
||
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 get_pricing_compute(
|
||
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,
|
||
) -> Dict[str, object]:
|
||
"""Returns the compute section of the catalog: the cloud provider and region the prices are quoted for, the monthly markup applied to them, the full instance-size tier list and the named presets.
|
||
|
||
Returns the compute section of the catalog: the cloud provider and region the prices are quoted for, the monthly markup applied to them, the full instance-size tier list and the named presets. It is the whole section as the pricing source records it, un-gated — no model or provider identity appears in it.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_compute_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "Dict[str, object]",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_compute_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[Dict[str, object]]:
|
||
"""Returns the compute section of the catalog: the cloud provider and region the prices are quoted for, the monthly markup applied to them, the full instance-size tier list and the named presets.
|
||
|
||
Returns the compute section of the catalog: the cloud provider and region the prices are quoted for, the monthly markup applied to them, the full instance-size tier list and the named presets. It is the whole section as the pricing source records it, un-gated — no model or provider identity appears in it.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_compute_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "Dict[str, object]",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_compute_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:
|
||
"""Returns the compute section of the catalog: the cloud provider and region the prices are quoted for, the monthly markup applied to them, the full instance-size tier list and the named presets.
|
||
|
||
Returns the compute section of the catalog: the cloud provider and region the prices are quoted for, the monthly markup applied to them, the full instance-size tier list and the named presets. It is the whole section as the pricing source records it, un-gated — no model or provider identity appears in it.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_compute_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "Dict[str, object]",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_param,
|
||
_request_timeout=_request_timeout
|
||
)
|
||
return response_data.response
|
||
|
||
|
||
def _get_pricing_compute_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/pricing/compute',
|
||
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 get_pricing_compute_presets(
|
||
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,
|
||
) -> PricingPricingPresetList:
|
||
"""Returns just the named compute sizes — the short, human-labelled list (\"Starter\", \"Pro\") a size picker renders, each carrying its provider slug, vCPU, memory, disk and price.
|
||
|
||
Returns just the named compute sizes — the short, human-labelled list (\"Starter\", \"Pro\") a size picker renders, each carrying its provider slug, vCPU, memory, disk and price. It is the presets of the compute section on their own, for a caller that does not need the full tier table.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_compute_presets_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingPresetList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_compute_presets_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[PricingPricingPresetList]:
|
||
"""Returns just the named compute sizes — the short, human-labelled list (\"Starter\", \"Pro\") a size picker renders, each carrying its provider slug, vCPU, memory, disk and price.
|
||
|
||
Returns just the named compute sizes — the short, human-labelled list (\"Starter\", \"Pro\") a size picker renders, each carrying its provider slug, vCPU, memory, disk and price. It is the presets of the compute section on their own, for a caller that does not need the full tier table.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_compute_presets_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingPresetList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_compute_presets_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:
|
||
"""Returns just the named compute sizes — the short, human-labelled list (\"Starter\", \"Pro\") a size picker renders, each carrying its provider slug, vCPU, memory, disk and price.
|
||
|
||
Returns just the named compute sizes — the short, human-labelled list (\"Starter\", \"Pro\") a size picker renders, each carrying its provider slug, vCPU, memory, disk and price. It is the presets of the compute section on their own, for a caller that does not need the full tier table.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_compute_presets_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingPresetList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_param,
|
||
_request_timeout=_request_timeout
|
||
)
|
||
return response_data.response
|
||
|
||
|
||
def _get_pricing_compute_presets_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/pricing/compute/presets',
|
||
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 get_pricing_datastore(
|
||
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,
|
||
) -> Dict[str, object]:
|
||
"""Returns the Hanzo Datastore rate card: the tier list, the per-GB storage and egress usage rates, the annual discount and the trial.
|
||
|
||
Returns the Hanzo Datastore rate card: the tier list, the per-GB storage and egress usage rates, the annual discount and the trial. It is the section as authored, un-gated — no provider identity appears in it. The route was missing while the data existed, so this 404d and every visitor to hanzo.ai's Infrastructure tab was told pricing was \"temporarily unavailable\".
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_datastore_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "Dict[str, object]",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_datastore_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[Dict[str, object]]:
|
||
"""Returns the Hanzo Datastore rate card: the tier list, the per-GB storage and egress usage rates, the annual discount and the trial.
|
||
|
||
Returns the Hanzo Datastore rate card: the tier list, the per-GB storage and egress usage rates, the annual discount and the trial. It is the section as authored, un-gated — no provider identity appears in it. The route was missing while the data existed, so this 404d and every visitor to hanzo.ai's Infrastructure tab was told pricing was \"temporarily unavailable\".
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_datastore_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "Dict[str, object]",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_datastore_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:
|
||
"""Returns the Hanzo Datastore rate card: the tier list, the per-GB storage and egress usage rates, the annual discount and the trial.
|
||
|
||
Returns the Hanzo Datastore rate card: the tier list, the per-GB storage and egress usage rates, the annual discount and the trial. It is the section as authored, un-gated — no provider identity appears in it. The route was missing while the data existed, so this 404d and every visitor to hanzo.ai's Infrastructure tab was told pricing was \"temporarily unavailable\".
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_datastore_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "Dict[str, object]",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_param,
|
||
_request_timeout=_request_timeout
|
||
)
|
||
return response_data.response
|
||
|
||
|
||
def _get_pricing_datastore_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/pricing/datastore',
|
||
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 get_pricing_enablement(
|
||
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,
|
||
) -> PricingEnablementBoard:
|
||
"""Returns what the caller can actually use: every managed item with its global state and whether it is effective for this caller — a beta item is, while the platform's `beta` switch is on for it.
|
||
|
||
Returns what the caller can actually use: every managed item with its global state and whether it is effective for this caller — a beta item is, while the platform's `beta` switch is on for it. Read-only and safe for any caller: one without a validated principal sees the generally-available items, never another org's view.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_enablement_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingEnablementBoard",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_enablement_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[PricingEnablementBoard]:
|
||
"""Returns what the caller can actually use: every managed item with its global state and whether it is effective for this caller — a beta item is, while the platform's `beta` switch is on for it.
|
||
|
||
Returns what the caller can actually use: every managed item with its global state and whether it is effective for this caller — a beta item is, while the platform's `beta` switch is on for it. Read-only and safe for any caller: one without a validated principal sees the generally-available items, never another org's view.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_enablement_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingEnablementBoard",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_enablement_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:
|
||
"""Returns what the caller can actually use: every managed item with its global state and whether it is effective for this caller — a beta item is, while the platform's `beta` switch is on for it.
|
||
|
||
Returns what the caller can actually use: every managed item with its global state and whether it is effective for this caller — a beta item is, while the platform's `beta` switch is on for it. Read-only and safe for any caller: one without a validated principal sees the generally-available items, never another org's view.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_enablement_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingEnablementBoard",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_param,
|
||
_request_timeout=_request_timeout
|
||
)
|
||
return response_data.response
|
||
|
||
|
||
def _get_pricing_enablement_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/pricing/enablement',
|
||
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 get_pricing_featured(
|
||
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,
|
||
) -> PricingPricingModelList:
|
||
"""Returns the models the catalog highlights, filtered to what the caller's org may see.
|
||
|
||
Returns the models the catalog highlights, filtered to what the caller's org may see. It is the same catalog as ListModels narrowed to entries the pricing source marks featured.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_featured_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingModelList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_featured_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[PricingPricingModelList]:
|
||
"""Returns the models the catalog highlights, filtered to what the caller's org may see.
|
||
|
||
Returns the models the catalog highlights, filtered to what the caller's org may see. It is the same catalog as ListModels narrowed to entries the pricing source marks featured.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_featured_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingModelList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_featured_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:
|
||
"""Returns the models the catalog highlights, filtered to what the caller's org may see.
|
||
|
||
Returns the models the catalog highlights, filtered to what the caller's org may see. It is the same catalog as ListModels narrowed to entries the pricing source marks featured.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_featured_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingModelList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_param,
|
||
_request_timeout=_request_timeout
|
||
)
|
||
return response_data.response
|
||
|
||
|
||
def _get_pricing_featured_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/pricing/featured',
|
||
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 get_pricing_free(
|
||
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,
|
||
) -> PricingPricingModelList:
|
||
"""Returns the models that cost nothing to call, filtered to what the caller's org may see.
|
||
|
||
Returns the models that cost nothing to call, filtered to what the caller's org may see. It is the same catalog as ListModels narrowed to entries the pricing source marks free.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_free_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingModelList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_free_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[PricingPricingModelList]:
|
||
"""Returns the models that cost nothing to call, filtered to what the caller's org may see.
|
||
|
||
Returns the models that cost nothing to call, filtered to what the caller's org may see. It is the same catalog as ListModels narrowed to entries the pricing source marks free.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_free_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingModelList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_free_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:
|
||
"""Returns the models that cost nothing to call, filtered to what the caller's org may see.
|
||
|
||
Returns the models that cost nothing to call, filtered to what the caller's org may see. It is the same catalog as ListModels narrowed to entries the pricing source marks free.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_free_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingModelList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_param,
|
||
_request_timeout=_request_timeout
|
||
)
|
||
return response_data.response
|
||
|
||
|
||
def _get_pricing_free_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/pricing/free',
|
||
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 get_pricing_gpu(
|
||
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,
|
||
) -> PricingPricingTierList:
|
||
"""ListGPUTiers returns the rentable GPU configurations, each with its accelerator count and model, VRAM, vCPU, host memory and hourly price.
|
||
|
||
ListGPUTiers returns the rentable GPU configurations, each with its accelerator count and model, VRAM, vCPU, host memory and hourly price.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_gpu_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingTierList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_gpu_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[PricingPricingTierList]:
|
||
"""ListGPUTiers returns the rentable GPU configurations, each with its accelerator count and model, VRAM, vCPU, host memory and hourly price.
|
||
|
||
ListGPUTiers returns the rentable GPU configurations, each with its accelerator count and model, VRAM, vCPU, host memory and hourly price.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_gpu_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingTierList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_gpu_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:
|
||
"""ListGPUTiers returns the rentable GPU configurations, each with its accelerator count and model, VRAM, vCPU, host memory and hourly price.
|
||
|
||
ListGPUTiers returns the rentable GPU configurations, each with its accelerator count and model, VRAM, vCPU, host memory and hourly price.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_gpu_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingTierList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_param,
|
||
_request_timeout=_request_timeout
|
||
)
|
||
return response_data.response
|
||
|
||
|
||
def _get_pricing_gpu_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/pricing/gpu',
|
||
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 get_pricing_health(
|
||
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,
|
||
) -> PricingPricingHealth:
|
||
"""Reports that the pricing subsystem is mounted and serving.
|
||
|
||
Reports that the pricing subsystem is mounted and serving. It answers from the process itself and consults neither the catalog bundle nor the enablement store, so it stays \"ok\" while either is degraded.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_health_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingHealth",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_health_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[PricingPricingHealth]:
|
||
"""Reports that the pricing subsystem is mounted and serving.
|
||
|
||
Reports that the pricing subsystem is mounted and serving. It answers from the process itself and consults neither the catalog bundle nor the enablement store, so it stays \"ok\" while either is degraded.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_health_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingHealth",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_health_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:
|
||
"""Reports that the pricing subsystem is mounted and serving.
|
||
|
||
Reports that the pricing subsystem is mounted and serving. It answers from the process itself and consults neither the catalog bundle nor the enablement store, so it stays \"ok\" while either is degraded.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_health_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingHealth",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_param,
|
||
_request_timeout=_request_timeout
|
||
)
|
||
return response_data.response
|
||
|
||
|
||
def _get_pricing_health_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/pricing/health',
|
||
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 get_pricing_iam(
|
||
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,
|
||
) -> PricingPricingPlanList:
|
||
"""ListIAMPlans returns the identity plans — the Hanzo IAM tiers, each with its monthly and annual price, monthly-active-user allowance and feature list.
|
||
|
||
ListIAMPlans returns the identity plans — the Hanzo IAM tiers, each with its monthly and annual price, monthly-active-user allowance and feature list.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_iam_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingPlanList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_iam_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[PricingPricingPlanList]:
|
||
"""ListIAMPlans returns the identity plans — the Hanzo IAM tiers, each with its monthly and annual price, monthly-active-user allowance and feature list.
|
||
|
||
ListIAMPlans returns the identity plans — the Hanzo IAM tiers, each with its monthly and annual price, monthly-active-user allowance and feature list.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_iam_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingPlanList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_iam_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:
|
||
"""ListIAMPlans returns the identity plans — the Hanzo IAM tiers, each with its monthly and annual price, monthly-active-user allowance and feature list.
|
||
|
||
ListIAMPlans returns the identity plans — the Hanzo IAM tiers, each with its monthly and annual price, monthly-active-user allowance and feature list.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_iam_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingPlanList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_param,
|
||
_request_timeout=_request_timeout
|
||
)
|
||
return response_data.response
|
||
|
||
|
||
def _get_pricing_iam_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/pricing/iam',
|
||
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 get_pricing_model_by_name(
|
||
self,
|
||
name: Annotated[StrictStr, Field(description="Name is the model's name or its slugged id (\"zen4\", \"acme/some-model-1\"), matched case-insensitively. It comes from the path: the URL is the addressing authority.")],
|
||
_request_timeout: Union[
|
||
None,
|
||
Annotated[StrictFloat, Field(gt=0)],
|
||
Tuple[
|
||
Annotated[StrictFloat, Field(gt=0)],
|
||
Annotated[StrictFloat, Field(gt=0)]
|
||
]
|
||
] = None,
|
||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||
_content_type: Optional[StrictStr] = None,
|
||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||
) -> Dict[str, object]:
|
||
"""Returns one model's catalog entry — its pricing, context window and capabilities as the pricing source records them.
|
||
|
||
Returns one model's catalog entry — its pricing, context window and capabilities as the pricing source records them. A model hidden for the caller's org answers the same 404 an unknown name does, so a disabled model gets no existence oracle.
|
||
|
||
:param name: Name is the model's name or its slugged id (\"zen4\", \"acme/some-model-1\"), matched case-insensitively. It comes from the path: the URL is the addressing authority. (required)
|
||
:type name: str
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores the host_index
|
||
in the spec for a single request.
|
||
:type _host_index: int, optional
|
||
:return: Returns the result object.
|
||
""" # noqa: E501
|
||
|
||
_param = self._get_pricing_model_by_name_serialize(
|
||
name=name,
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "Dict[str, object]",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_model_by_name_with_http_info(
|
||
self,
|
||
name: Annotated[StrictStr, Field(description="Name is the model's name or its slugged id (\"zen4\", \"acme/some-model-1\"), matched case-insensitively. It comes from the path: the URL is the addressing authority.")],
|
||
_request_timeout: Union[
|
||
None,
|
||
Annotated[StrictFloat, Field(gt=0)],
|
||
Tuple[
|
||
Annotated[StrictFloat, Field(gt=0)],
|
||
Annotated[StrictFloat, Field(gt=0)]
|
||
]
|
||
] = None,
|
||
_request_auth: Optional[Dict[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[Dict[str, object]]:
|
||
"""Returns one model's catalog entry — its pricing, context window and capabilities as the pricing source records them.
|
||
|
||
Returns one model's catalog entry — its pricing, context window and capabilities as the pricing source records them. A model hidden for the caller's org answers the same 404 an unknown name does, so a disabled model gets no existence oracle.
|
||
|
||
:param name: Name is the model's name or its slugged id (\"zen4\", \"acme/some-model-1\"), matched case-insensitively. It comes from the path: the URL is the addressing authority. (required)
|
||
:type name: str
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores the host_index
|
||
in the spec for a single request.
|
||
:type _host_index: int, optional
|
||
:return: Returns the result object.
|
||
""" # noqa: E501
|
||
|
||
_param = self._get_pricing_model_by_name_serialize(
|
||
name=name,
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "Dict[str, object]",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_model_by_name_without_preload_content(
|
||
self,
|
||
name: Annotated[StrictStr, Field(description="Name is the model's name or its slugged id (\"zen4\", \"acme/some-model-1\"), matched case-insensitively. It comes from the path: the URL is the addressing authority.")],
|
||
_request_timeout: Union[
|
||
None,
|
||
Annotated[StrictFloat, Field(gt=0)],
|
||
Tuple[
|
||
Annotated[StrictFloat, Field(gt=0)],
|
||
Annotated[StrictFloat, Field(gt=0)]
|
||
]
|
||
] = None,
|
||
_request_auth: Optional[Dict[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:
|
||
"""Returns one model's catalog entry — its pricing, context window and capabilities as the pricing source records them.
|
||
|
||
Returns one model's catalog entry — its pricing, context window and capabilities as the pricing source records them. A model hidden for the caller's org answers the same 404 an unknown name does, so a disabled model gets no existence oracle.
|
||
|
||
:param name: Name is the model's name or its slugged id (\"zen4\", \"acme/some-model-1\"), matched case-insensitively. It comes from the path: the URL is the addressing authority. (required)
|
||
:type name: str
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores the host_index
|
||
in the spec for a single request.
|
||
:type _host_index: int, optional
|
||
:return: Returns the result object.
|
||
""" # noqa: E501
|
||
|
||
_param = self._get_pricing_model_by_name_serialize(
|
||
name=name,
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "Dict[str, object]",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_param,
|
||
_request_timeout=_request_timeout
|
||
)
|
||
return response_data.response
|
||
|
||
|
||
def _get_pricing_model_by_name_serialize(
|
||
self,
|
||
name,
|
||
_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
|
||
if name is not None:
|
||
_path_params['name'] = name
|
||
# 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/pricing/model/{name}',
|
||
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 get_pricing_models(
|
||
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,
|
||
) -> PricingPricingModelList:
|
||
"""Returns the whole model catalog — every model the gateway serves, Zen and third-party alike — filtered to what the caller may see.
|
||
|
||
Returns the whole model catalog — every model the gateway serves, Zen and third-party alike — filtered to what the caller may see. A model an admin has disabled is absent; one in beta appears only for a caller the platform's `beta` switch is on for. A SuperAdmin sees every model, each annotated with its enablement state.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_models_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingModelList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_models_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[PricingPricingModelList]:
|
||
"""Returns the whole model catalog — every model the gateway serves, Zen and third-party alike — filtered to what the caller may see.
|
||
|
||
Returns the whole model catalog — every model the gateway serves, Zen and third-party alike — filtered to what the caller may see. A model an admin has disabled is absent; one in beta appears only for a caller the platform's `beta` switch is on for. A SuperAdmin sees every model, each annotated with its enablement state.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_models_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingModelList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_models_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:
|
||
"""Returns the whole model catalog — every model the gateway serves, Zen and third-party alike — filtered to what the caller may see.
|
||
|
||
Returns the whole model catalog — every model the gateway serves, Zen and third-party alike — filtered to what the caller may see. A model an admin has disabled is absent; one in beta appears only for a caller the platform's `beta` switch is on for. A SuperAdmin sees every model, each annotated with its enablement state.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_models_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingModelList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_param,
|
||
_request_timeout=_request_timeout
|
||
)
|
||
return response_data.response
|
||
|
||
|
||
def _get_pricing_models_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/pricing/models',
|
||
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 get_pricing_paas(
|
||
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,
|
||
) -> PricingPricingPlanList:
|
||
"""ListPaaSPlans returns the application-hosting plans — the deploy-and-host tiers, each with its monthly and annual price, app and memory allowances and feature list.
|
||
|
||
ListPaaSPlans returns the application-hosting plans — the deploy-and-host tiers, each with its monthly and annual price, app and memory allowances and feature list.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_paas_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingPlanList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_paas_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[PricingPricingPlanList]:
|
||
"""ListPaaSPlans returns the application-hosting plans — the deploy-and-host tiers, each with its monthly and annual price, app and memory allowances and feature list.
|
||
|
||
ListPaaSPlans returns the application-hosting plans — the deploy-and-host tiers, each with its monthly and annual price, app and memory allowances and feature list.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_paas_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingPlanList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_paas_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:
|
||
"""ListPaaSPlans returns the application-hosting plans — the deploy-and-host tiers, each with its monthly and annual price, app and memory allowances and feature list.
|
||
|
||
ListPaaSPlans returns the application-hosting plans — the deploy-and-host tiers, each with its monthly and annual price, app and memory allowances and feature list.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_paas_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingPlanList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_param,
|
||
_request_timeout=_request_timeout
|
||
)
|
||
return response_data.response
|
||
|
||
|
||
def _get_pricing_paas_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/pricing/paas',
|
||
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 get_pricing_policy(
|
||
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,
|
||
) -> Dict[str, object]:
|
||
"""Returns the pricing policy document: the revenue-sharing terms (the idle-resale share and the open-source share, each with its percentage and who is eligible) and the commitments Hanzo makes about how it bills — no hidden fees, no egress charges, no surprise bills.
|
||
|
||
Returns the pricing policy document: the revenue-sharing terms (the idle-resale share and the open-source share, each with its percentage and who is eligible) and the commitments Hanzo makes about how it bills — no hidden fees, no egress charges, no surprise bills.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_policy_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "Dict[str, object]",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_policy_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[Dict[str, object]]:
|
||
"""Returns the pricing policy document: the revenue-sharing terms (the idle-resale share and the open-source share, each with its percentage and who is eligible) and the commitments Hanzo makes about how it bills — no hidden fees, no egress charges, no surprise bills.
|
||
|
||
Returns the pricing policy document: the revenue-sharing terms (the idle-resale share and the open-source share, each with its percentage and who is eligible) and the commitments Hanzo makes about how it bills — no hidden fees, no egress charges, no surprise bills.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_policy_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "Dict[str, object]",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_policy_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:
|
||
"""Returns the pricing policy document: the revenue-sharing terms (the idle-resale share and the open-source share, each with its percentage and who is eligible) and the commitments Hanzo makes about how it bills — no hidden fees, no egress charges, no surprise bills.
|
||
|
||
Returns the pricing policy document: the revenue-sharing terms (the idle-resale share and the open-source share, each with its percentage and who is eligible) and the commitments Hanzo makes about how it bills — no hidden fees, no egress charges, no surprise bills.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_policy_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "Dict[str, object]",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_param,
|
||
_request_timeout=_request_timeout
|
||
)
|
||
return response_data.response
|
||
|
||
|
||
def _get_pricing_policy_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/pricing/policy',
|
||
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 get_pricing_providers(
|
||
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,
|
||
) -> PricingPricingProviderList:
|
||
"""Returns the model providers the catalog knows, each with its info object, filtered to what the caller's org may see.
|
||
|
||
Returns the model providers the catalog knows, each with its info object, filtered to what the caller's org may see. A provider an admin has disabled is absent — and so are its models everywhere else on this surface, because a provider's state cascades to what it serves.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_providers_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingProviderList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_providers_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[PricingPricingProviderList]:
|
||
"""Returns the model providers the catalog knows, each with its info object, filtered to what the caller's org may see.
|
||
|
||
Returns the model providers the catalog knows, each with its info object, filtered to what the caller's org may see. A provider an admin has disabled is absent — and so are its models everywhere else on this surface, because a provider's state cascades to what it serves.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_providers_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingProviderList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_providers_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:
|
||
"""Returns the model providers the catalog knows, each with its info object, filtered to what the caller's org may see.
|
||
|
||
Returns the model providers the catalog knows, each with its info object, filtered to what the caller's org may see. A provider an admin has disabled is absent — and so are its models everywhere else on this surface, because a provider's state cascades to what it serves.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_providers_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingProviderList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_param,
|
||
_request_timeout=_request_timeout
|
||
)
|
||
return response_data.response
|
||
|
||
|
||
def _get_pricing_providers_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/pricing/providers',
|
||
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 get_pricing_services(
|
||
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,
|
||
) -> Dict[str, object]:
|
||
"""Returns the managed-service rate cards — Search, Crawl, Vector, Console and Managed Services — each with its own tiers, and some with usage rates or a comparison table.
|
||
|
||
Returns the managed-service rate cards — Search, Crawl, Vector, Console and Managed Services — each with its own tiers, and some with usage rates or a comparison table. It is the section as authored, un-gated. These are DISPLAY rate cards: what a product costs, not what a plan grants. No entitlement or limit fields ride here, so nothing can bill off them.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_services_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "Dict[str, object]",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_services_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[Dict[str, object]]:
|
||
"""Returns the managed-service rate cards — Search, Crawl, Vector, Console and Managed Services — each with its own tiers, and some with usage rates or a comparison table.
|
||
|
||
Returns the managed-service rate cards — Search, Crawl, Vector, Console and Managed Services — each with its own tiers, and some with usage rates or a comparison table. It is the section as authored, un-gated. These are DISPLAY rate cards: what a product costs, not what a plan grants. No entitlement or limit fields ride here, so nothing can bill off them.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_services_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "Dict[str, object]",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_services_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:
|
||
"""Returns the managed-service rate cards — Search, Crawl, Vector, Console and Managed Services — each with its own tiers, and some with usage rates or a comparison table.
|
||
|
||
Returns the managed-service rate cards — Search, Crawl, Vector, Console and Managed Services — each with its own tiers, and some with usage rates or a comparison table. It is the section as authored, un-gated. These are DISPLAY rate cards: what a product costs, not what a plan grants. No entitlement or limit fields ride here, so nothing can bill off them.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_services_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "Dict[str, object]",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_param,
|
||
_request_timeout=_request_timeout
|
||
)
|
||
return response_data.response
|
||
|
||
|
||
def _get_pricing_services_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/pricing/services',
|
||
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 get_pricing_subscriptions(
|
||
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,
|
||
) -> PricingPricingPlanList:
|
||
"""Returns the API subscription plans — the account-level tiers a customer subscribes to, each with its monthly and annual price, included credit, rate limits and feature list.
|
||
|
||
Returns the API subscription plans — the account-level tiers a customer subscribes to, each with its monthly and annual price, included credit, rate limits and feature list.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_subscriptions_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingPlanList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_subscriptions_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[PricingPricingPlanList]:
|
||
"""Returns the API subscription plans — the account-level tiers a customer subscribes to, each with its monthly and annual price, included credit, rate limits and feature list.
|
||
|
||
Returns the API subscription plans — the account-level tiers a customer subscribes to, each with its monthly and annual price, included credit, rate limits and feature list.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_subscriptions_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingPlanList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_subscriptions_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:
|
||
"""Returns the API subscription plans — the account-level tiers a customer subscribes to, each with its monthly and annual price, included credit, rate limits and feature list.
|
||
|
||
Returns the API subscription plans — the account-level tiers a customer subscribes to, each with its monthly and annual price, included credit, rate limits and feature list.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_subscriptions_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingPlanList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_param,
|
||
_request_timeout=_request_timeout
|
||
)
|
||
return response_data.response
|
||
|
||
|
||
def _get_pricing_subscriptions_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/pricing/subscriptions',
|
||
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 get_pricing_summary(
|
||
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,
|
||
) -> Dict[str, object]:
|
||
"""Returns the catalog's headline statistics — model counts by family and the provider directory.
|
||
|
||
Returns the catalog's headline statistics — model counts by family and the provider directory. The provider sub-object is filtered to what the caller's org may see, so a disabled provider's name never leaks; the aggregate counts are the catalog's own, over everything it holds.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_summary_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "Dict[str, object]",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_summary_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[Dict[str, object]]:
|
||
"""Returns the catalog's headline statistics — model counts by family and the provider directory.
|
||
|
||
Returns the catalog's headline statistics — model counts by family and the provider directory. The provider sub-object is filtered to what the caller's org may see, so a disabled provider's name never leaks; the aggregate counts are the catalog's own, over everything it holds.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_summary_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "Dict[str, object]",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_summary_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:
|
||
"""Returns the catalog's headline statistics — model counts by family and the provider directory.
|
||
|
||
Returns the catalog's headline statistics — model counts by family and the provider directory. The provider sub-object is filtered to what the caller's org may see, so a disabled provider's name never leaks; the aggregate counts are the catalog's own, over everything it holds.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_summary_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "Dict[str, object]",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_param,
|
||
_request_timeout=_request_timeout
|
||
)
|
||
return response_data.response
|
||
|
||
|
||
def _get_pricing_summary_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/pricing/summary',
|
||
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 get_pricing_tariff(
|
||
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,
|
||
) -> PricingCard:
|
||
"""Returns the platform's rate card: what a bill is made of, what each part costs, and the completion windows a request may ask for.
|
||
|
||
Returns the platform's rate card: what a bill is made of, what each part costs, and the completion windows a request may ask for. FOUR COMPONENTS, and every charge is one of them — model inference, computer, web tools and media generation. Two are quoted before they run, so an agent is refused before it breaches its budget; two are booked from what they used, because neither a provider's charge nor a render's cost is knowable in advance. EVERY AMOUNT IS INTEGER MICRO-USD (1 USD = 1,000,000), stated once in `unit`, and each rate says what one unit of it is in `per`. The compute rates are per HOUR because that is the unit a span is priced in — rate × seconds / 3600 — and because a GiB-second is four and a half micro-USD, which no integer holds. The rates are the ones the ledger books: each is resolved through the same authority the metering path reads, falling back to the same compiled floor. A rate of zero is a price and not an absence — a paused computer, a computer's creation, the interfaces and a seat all cost nothing by design.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_tariff_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingCard",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_tariff_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[PricingCard]:
|
||
"""Returns the platform's rate card: what a bill is made of, what each part costs, and the completion windows a request may ask for.
|
||
|
||
Returns the platform's rate card: what a bill is made of, what each part costs, and the completion windows a request may ask for. FOUR COMPONENTS, and every charge is one of them — model inference, computer, web tools and media generation. Two are quoted before they run, so an agent is refused before it breaches its budget; two are booked from what they used, because neither a provider's charge nor a render's cost is knowable in advance. EVERY AMOUNT IS INTEGER MICRO-USD (1 USD = 1,000,000), stated once in `unit`, and each rate says what one unit of it is in `per`. The compute rates are per HOUR because that is the unit a span is priced in — rate × seconds / 3600 — and because a GiB-second is four and a half micro-USD, which no integer holds. The rates are the ones the ledger books: each is resolved through the same authority the metering path reads, falling back to the same compiled floor. A rate of zero is a price and not an absence — a paused computer, a computer's creation, the interfaces and a seat all cost nothing by design.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_tariff_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingCard",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_tariff_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:
|
||
"""Returns the platform's rate card: what a bill is made of, what each part costs, and the completion windows a request may ask for.
|
||
|
||
Returns the platform's rate card: what a bill is made of, what each part costs, and the completion windows a request may ask for. FOUR COMPONENTS, and every charge is one of them — model inference, computer, web tools and media generation. Two are quoted before they run, so an agent is refused before it breaches its budget; two are booked from what they used, because neither a provider's charge nor a render's cost is knowable in advance. EVERY AMOUNT IS INTEGER MICRO-USD (1 USD = 1,000,000), stated once in `unit`, and each rate says what one unit of it is in `per`. The compute rates are per HOUR because that is the unit a span is priced in — rate × seconds / 3600 — and because a GiB-second is four and a half micro-USD, which no integer holds. The rates are the ones the ledger books: each is resolved through the same authority the metering path reads, falling back to the same compiled floor. A rate of zero is a price and not an absence — a paused computer, a computer's creation, the interfaces and a seat all cost nothing by design.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_tariff_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingCard",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_param,
|
||
_request_timeout=_request_timeout
|
||
)
|
||
return response_data.response
|
||
|
||
|
||
def _get_pricing_tariff_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/pricing/tariff',
|
||
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 get_pricing_tools(
|
||
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,
|
||
) -> PricingPricingToolList:
|
||
"""Returns the per-use tool prices — web search, web fetch, code interpreter, file storage, image generation, speech-to-text and text-to-speech — each with the unit it is billed by and its price in that unit.
|
||
|
||
Returns the per-use tool prices — web search, web fetch, code interpreter, file storage, image generation, speech-to-text and text-to-speech — each with the unit it is billed by and its price in that unit. The two WEB rows are priced from the rate card rather than from the catalog, because those are the rows the platform charges by the call and a published number that is also a charged one has exactly one home (see tariff.go). Read them as integer micro-USD at /v1/pricing/tariff; the decimal here is the display this list has always carried.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_tools_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingToolList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_tools_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[PricingPricingToolList]:
|
||
"""Returns the per-use tool prices — web search, web fetch, code interpreter, file storage, image generation, speech-to-text and text-to-speech — each with the unit it is billed by and its price in that unit.
|
||
|
||
Returns the per-use tool prices — web search, web fetch, code interpreter, file storage, image generation, speech-to-text and text-to-speech — each with the unit it is billed by and its price in that unit. The two WEB rows are priced from the rate card rather than from the catalog, because those are the rows the platform charges by the call and a published number that is also a charged one has exactly one home (see tariff.go). Read them as integer micro-USD at /v1/pricing/tariff; the decimal here is the display this list has always carried.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_tools_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingToolList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_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_pricing_tools_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:
|
||
"""Returns the per-use tool prices — web search, web fetch, code interpreter, file storage, image generation, speech-to-text and text-to-speech — each with the unit it is billed by and its price in that unit.
|
||
|
||
Returns the per-use tool prices — web search, web fetch, code interpreter, file storage, image generation, speech-to-text and text-to-speech — each with the unit it is billed by and its price in that unit. The two WEB rows are priced from the rate card rather than from the catalog, because those are the rows the platform charges by the call and a published number that is also a charged one has exactly one home (see tariff.go). Read them as integer micro-USD at /v1/pricing/tariff; the decimal here is the display this list has always carried.
|
||
|
||
:param _request_timeout: timeout setting for this request. If one
|
||
number provided, it will be total request
|
||
timeout. It can also be a pair (tuple) of
|
||
(connection, read) timeouts.
|
||
:type _request_timeout: int, tuple(int, int), optional
|
||
:param _request_auth: set to override the auth_settings for an a single
|
||
request; this effectively ignores the
|
||
authentication in the spec for a single request.
|
||
:type _request_auth: dict, optional
|
||
:param _content_type: force content-type for the request.
|
||
:type _content_type: str, Optional
|
||
:param _headers: set to override the headers for a single
|
||
request; this effectively ignores the headers
|
||
in the spec for a single request.
|
||
:type _headers: dict, optional
|
||
:param _host_index: set to override the host_index for a single
|
||
request; this effectively ignores 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_pricing_tools_serialize(
|
||
_request_auth=_request_auth,
|
||
_content_type=_content_type,
|
||
_headers=_headers,
|
||
_host_index=_host_index
|
||
)
|
||
|
||
_response_types_map: Dict[str, Optional[str]] = {
|
||
'200': "PricingPricingToolList",
|
||
}
|
||
response_data = self.api_client.call_api(
|
||
*_param,
|
||
_request_timeout=_request_timeout
|
||
)
|
||
return response_data.response
|
||
|
||
|
||
def _get_pricing_tools_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/pricing/tools',
|
||
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
|
||
)
|
||
|
||
|