qcs_api_client 0.27.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- qcs_api_client/__init__.py +1 -0
- qcs_api_client/api/__init__.py +1 -0
- qcs_api_client/api/account/__init__.py +1 -0
- qcs_api_client/api/account/activate_user.py +155 -0
- qcs_api_client/api/account/add_group_user.py +156 -0
- qcs_api_client/api/account/dismiss_viewer_announcement.py +145 -0
- qcs_api_client/api/account/get_group_balance.py +149 -0
- qcs_api_client/api/account/get_group_billing_customer.py +145 -0
- qcs_api_client/api/account/get_group_upcoming_billing_invoice.py +145 -0
- qcs_api_client/api/account/get_user_balance.py +149 -0
- qcs_api_client/api/account/get_user_billing_customer.py +145 -0
- qcs_api_client/api/account/get_user_event_billing_price.py +170 -0
- qcs_api_client/api/account/get_user_upcoming_billing_invoice.py +145 -0
- qcs_api_client/api/account/get_viewer_user_onboarding_completed.py +124 -0
- qcs_api_client/api/account/list_group_billing_invoice_lines.py +189 -0
- qcs_api_client/api/account/list_group_billing_invoices.py +177 -0
- qcs_api_client/api/account/list_group_upcoming_billing_invoice_lines.py +177 -0
- qcs_api_client/api/account/list_group_users.py +185 -0
- qcs_api_client/api/account/list_user_billing_invoice_lines.py +189 -0
- qcs_api_client/api/account/list_user_billing_invoices.py +177 -0
- qcs_api_client/api/account/list_user_groups.py +181 -0
- qcs_api_client/api/account/list_user_upcoming_billing_invoice_lines.py +177 -0
- qcs_api_client/api/account/list_viewer_announcements.py +178 -0
- qcs_api_client/api/account/put_viewer_user_onboarding_completed.py +150 -0
- qcs_api_client/api/account/remove_group_user.py +158 -0
- qcs_api_client/api/account/update_viewer_user_profile.py +150 -0
- qcs_api_client/api/authentication/__init__.py +1 -0
- qcs_api_client/api/authentication/auth_email_password_reset_token.py +153 -0
- qcs_api_client/api/authentication/auth_get_user.py +128 -0
- qcs_api_client/api/authentication/auth_reset_password.py +152 -0
- qcs_api_client/api/authentication/auth_reset_password_with_token.py +154 -0
- qcs_api_client/api/client_applications/__init__.py +1 -0
- qcs_api_client/api/client_applications/check_client_application.py +154 -0
- qcs_api_client/api/client_applications/get_client_application.py +151 -0
- qcs_api_client/api/client_applications/list_client_applications.py +129 -0
- qcs_api_client/api/default/__init__.py +1 -0
- qcs_api_client/api/default/get_health.py +123 -0
- qcs_api_client/api/default/health_check.py +124 -0
- qcs_api_client/api/default/health_check_deprecated.py +126 -0
- qcs_api_client/api/endpoints/__init__.py +1 -0
- qcs_api_client/api/endpoints/create_endpoint.py +157 -0
- qcs_api_client/api/endpoints/delete_endpoint.py +148 -0
- qcs_api_client/api/endpoints/get_default_endpoint.py +154 -0
- qcs_api_client/api/endpoints/get_endpoint.py +150 -0
- qcs_api_client/api/endpoints/list_endpoints.py +182 -0
- qcs_api_client/api/endpoints/restart_endpoint.py +168 -0
- qcs_api_client/api/engagements/__init__.py +1 -0
- qcs_api_client/api/engagements/create_engagement.py +196 -0
- qcs_api_client/api/quantum_processors/__init__.py +1 -0
- qcs_api_client/api/quantum_processors/get_instruction_set_architecture.py +144 -0
- qcs_api_client/api/quantum_processors/get_quantum_processor.py +148 -0
- qcs_api_client/api/quantum_processors/get_quantum_processor_accessors.py +150 -0
- qcs_api_client/api/quantum_processors/list_instruction_set_architectures.py +164 -0
- qcs_api_client/api/quantum_processors/list_quantum_processors.py +170 -0
- qcs_api_client/api/reservations/__init__.py +1 -0
- qcs_api_client/api/reservations/create_reservation.py +200 -0
- qcs_api_client/api/reservations/delete_reservation.py +149 -0
- qcs_api_client/api/reservations/find_available_reservations.py +211 -0
- qcs_api_client/api/reservations/get_quantum_processor_calendar.py +149 -0
- qcs_api_client/api/reservations/get_reservation.py +149 -0
- qcs_api_client/api/reservations/list_group_reservations.py +309 -0
- qcs_api_client/api/reservations/list_reservations.py +335 -0
- qcs_api_client/client/__init__.py +12 -0
- qcs_api_client/client/auth.py +78 -0
- qcs_api_client/client/client.py +48 -0
- qcs_api_client/errors.py +16 -0
- qcs_api_client/models/__init__.py +185 -0
- qcs_api_client/models/account_balance.py +72 -0
- qcs_api_client/models/account_type.py +9 -0
- qcs_api_client/models/activate_user_request.py +93 -0
- qcs_api_client/models/add_group_user_request.py +95 -0
- qcs_api_client/models/announcement.py +97 -0
- qcs_api_client/models/announcements_response.py +93 -0
- qcs_api_client/models/architecture.py +134 -0
- qcs_api_client/models/auth_email_password_reset_token_request.py +69 -0
- qcs_api_client/models/auth_reset_password_request.py +77 -0
- qcs_api_client/models/auth_reset_password_with_token_request.py +78 -0
- qcs_api_client/models/available_reservation.py +104 -0
- qcs_api_client/models/billing_customer.py +78 -0
- qcs_api_client/models/billing_invoice.py +130 -0
- qcs_api_client/models/billing_invoice_line.py +165 -0
- qcs_api_client/models/billing_invoice_line_line_item_type.py +9 -0
- qcs_api_client/models/billing_invoice_line_metadata.py +55 -0
- qcs_api_client/models/billing_invoice_status.py +12 -0
- qcs_api_client/models/billing_price.py +234 -0
- qcs_api_client/models/billing_price_object.py +8 -0
- qcs_api_client/models/billing_price_price_type.py +9 -0
- qcs_api_client/models/billing_price_recurrence.py +124 -0
- qcs_api_client/models/billing_price_recurrence_aggregate_usage.py +11 -0
- qcs_api_client/models/billing_price_recurrence_interval.py +11 -0
- qcs_api_client/models/billing_price_recurrence_usage_type.py +9 -0
- qcs_api_client/models/billing_price_scheme.py +9 -0
- qcs_api_client/models/billing_price_tiers_mode.py +9 -0
- qcs_api_client/models/billing_product.py +109 -0
- qcs_api_client/models/billing_product_object.py +8 -0
- qcs_api_client/models/billing_upcoming_invoice.py +122 -0
- qcs_api_client/models/characteristic.py +125 -0
- qcs_api_client/models/check_client_application_request.py +77 -0
- qcs_api_client/models/check_client_application_response.py +85 -0
- qcs_api_client/models/checksum_description.py +78 -0
- qcs_api_client/models/checksum_description_type.py +8 -0
- qcs_api_client/models/client_application.py +130 -0
- qcs_api_client/models/client_applications_download_link.py +100 -0
- qcs_api_client/models/code.py +17 -0
- qcs_api_client/models/create_endpoint_parameters.py +93 -0
- qcs_api_client/models/create_engagement_request.py +116 -0
- qcs_api_client/models/create_reservation_request.py +124 -0
- qcs_api_client/models/dictionary.py +55 -0
- qcs_api_client/models/edge.py +78 -0
- qcs_api_client/models/endpoint.py +140 -0
- qcs_api_client/models/endpoint_addresses.py +77 -0
- qcs_api_client/models/engagement_credentials.py +87 -0
- qcs_api_client/models/engagement_with_credentials.py +169 -0
- qcs_api_client/models/error.py +112 -0
- qcs_api_client/models/event_billing_price_rate.py +107 -0
- qcs_api_client/models/family.py +11 -0
- qcs_api_client/models/find_available_reservations_response.py +92 -0
- qcs_api_client/models/get_account_event_billing_price_request.py +81 -0
- qcs_api_client/models/group.py +112 -0
- qcs_api_client/models/health.py +69 -0
- qcs_api_client/models/instruction_set_architecture.py +142 -0
- qcs_api_client/models/invite_user_request.py +87 -0
- qcs_api_client/models/list_account_billing_invoice_lines_response.py +92 -0
- qcs_api_client/models/list_account_billing_invoices_response.py +92 -0
- qcs_api_client/models/list_client_applications_response.py +83 -0
- qcs_api_client/models/list_endpoints_response.py +93 -0
- qcs_api_client/models/list_group_reservations_show_deleted.py +9 -0
- qcs_api_client/models/list_group_users_response.py +92 -0
- qcs_api_client/models/list_groups_response.py +92 -0
- qcs_api_client/models/list_instruction_set_architecture_response.py +94 -0
- qcs_api_client/models/list_quantum_processor_accessors_response.py +92 -0
- qcs_api_client/models/list_quantum_processors_response.py +92 -0
- qcs_api_client/models/list_reservations_response.py +91 -0
- qcs_api_client/models/list_reservations_show_deleted.py +9 -0
- qcs_api_client/models/node.py +76 -0
- qcs_api_client/models/nomad_job_datacenters.py +10 -0
- qcs_api_client/models/operation.py +138 -0
- qcs_api_client/models/operation_site.py +93 -0
- qcs_api_client/models/parameter.py +70 -0
- qcs_api_client/models/product.py +10 -0
- qcs_api_client/models/quantum_processor.py +70 -0
- qcs_api_client/models/quantum_processor_accessor.py +112 -0
- qcs_api_client/models/quantum_processor_accessor_type.py +9 -0
- qcs_api_client/models/quantum_processor_calendar.py +69 -0
- qcs_api_client/models/remove_group_user_request.py +95 -0
- qcs_api_client/models/reservation.py +218 -0
- qcs_api_client/models/restart_endpoint_request.py +67 -0
- qcs_api_client/models/tier.py +113 -0
- qcs_api_client/models/update_viewer_user_profile_request.py +85 -0
- qcs_api_client/models/user.py +110 -0
- qcs_api_client/models/user_credentials.py +75 -0
- qcs_api_client/models/user_credentials_password.py +69 -0
- qcs_api_client/models/user_profile.py +93 -0
- qcs_api_client/models/validation_error.py +89 -0
- qcs_api_client/models/validation_error_in.py +11 -0
- qcs_api_client/models/validation_location.py +11 -0
- qcs_api_client/models/viewer_user_onboarding_completed.py +69 -0
- qcs_api_client/operations/__init__.py +8 -0
- qcs_api_client/operations/asyncio/__init__.py +121 -0
- qcs_api_client/operations/asyncio_from_dict/__init__.py +139 -0
- qcs_api_client/operations/sync/__init__.py +117 -0
- qcs_api_client/operations/sync_from_dict/__init__.py +133 -0
- qcs_api_client/py.typed +1 -0
- qcs_api_client/types.py +74 -0
- qcs_api_client/util/__init__.py +0 -0
- qcs_api_client/util/errors.py +32 -0
- qcs_api_client/util/retry.py +26 -0
- qcs_api_client/util/serialization.py +5 -0
- qcs_api_client-0.27.3.dist-info/METADATA +101 -0
- qcs_api_client-0.27.3.dist-info/RECORD +172 -0
- qcs_api_client-0.27.3.dist-info/WHEEL +4 -0
- qcs_api_client-0.27.3.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
from typing import Any
|
|
2
|
+
from urllib.parse import quote
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
from tenacity import retry
|
|
6
|
+
|
|
7
|
+
from ...models.error import Error
|
|
8
|
+
from ...models.list_account_billing_invoices_response import ListAccountBillingInvoicesResponse
|
|
9
|
+
from ...types import UNSET, Response, Unset
|
|
10
|
+
from ...util.errors import QCSHTTPStatusError
|
|
11
|
+
from ...util.retry import DEFAULT_RETRY_ARGUMENTS
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
group_name: str,
|
|
16
|
+
*,
|
|
17
|
+
page_token: str | Unset = UNSET,
|
|
18
|
+
page_size: int | Unset = UNSET,
|
|
19
|
+
) -> dict[str, Any]:
|
|
20
|
+
|
|
21
|
+
params: dict[str, Any] = {}
|
|
22
|
+
|
|
23
|
+
params["pageToken"] = page_token
|
|
24
|
+
|
|
25
|
+
params["pageSize"] = page_size
|
|
26
|
+
|
|
27
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
28
|
+
|
|
29
|
+
_kwargs: dict[str, Any] = {
|
|
30
|
+
"method": "get",
|
|
31
|
+
"url": "/v1/groups/{group_name}/billingInvoices".format(
|
|
32
|
+
group_name=quote(str(group_name), safe=""),
|
|
33
|
+
),
|
|
34
|
+
"params": params,
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return _kwargs
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def _parse_response(*, response: httpx.Response) -> Error | ListAccountBillingInvoicesResponse | None:
|
|
41
|
+
if response.status_code == 200:
|
|
42
|
+
response_200 = ListAccountBillingInvoicesResponse.from_dict(response.json())
|
|
43
|
+
|
|
44
|
+
return response_200
|
|
45
|
+
|
|
46
|
+
raise QCSHTTPStatusError(
|
|
47
|
+
message=f"Unexpected response: status code {response.status_code}",
|
|
48
|
+
response=response,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def _build_response(*, response: httpx.Response) -> Response[Error | ListAccountBillingInvoicesResponse]:
|
|
53
|
+
"""Construct the Response class from the raw ``httpx.Response``."""
|
|
54
|
+
return Response.build_from_httpx_response(response=response, parse_function=_parse_response)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
@retry(**DEFAULT_RETRY_ARGUMENTS)
|
|
58
|
+
def sync(
|
|
59
|
+
group_name: str,
|
|
60
|
+
*,
|
|
61
|
+
client: httpx.Client,
|
|
62
|
+
page_token: str | Unset = UNSET,
|
|
63
|
+
page_size: int | Unset = UNSET,
|
|
64
|
+
httpx_request_kwargs: dict[str, Any] | None = None,
|
|
65
|
+
) -> Response[Error | ListAccountBillingInvoicesResponse]:
|
|
66
|
+
"""Retrieve billing invoices for a QCS group account.
|
|
67
|
+
|
|
68
|
+
Args:
|
|
69
|
+
group_name (str):
|
|
70
|
+
page_token (str | Unset):
|
|
71
|
+
page_size (int | Unset):
|
|
72
|
+
|
|
73
|
+
Raises:
|
|
74
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
75
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
76
|
+
|
|
77
|
+
Returns:
|
|
78
|
+
Response[Error | ListAccountBillingInvoicesResponse]
|
|
79
|
+
"""
|
|
80
|
+
|
|
81
|
+
httpx_request_kwargs = httpx_request_kwargs or {}
|
|
82
|
+
|
|
83
|
+
kwargs = _get_kwargs(
|
|
84
|
+
group_name=group_name,
|
|
85
|
+
page_token=page_token,
|
|
86
|
+
page_size=page_size,
|
|
87
|
+
)
|
|
88
|
+
kwargs.update(httpx_request_kwargs)
|
|
89
|
+
response = client.request(
|
|
90
|
+
**kwargs,
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
return _build_response(response=response)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
@retry(**DEFAULT_RETRY_ARGUMENTS)
|
|
97
|
+
def sync_from_dict(
|
|
98
|
+
group_name: str,
|
|
99
|
+
*,
|
|
100
|
+
client: httpx.Client,
|
|
101
|
+
page_token: str | Unset = UNSET,
|
|
102
|
+
page_size: int | Unset = UNSET,
|
|
103
|
+
httpx_request_kwargs: dict[str, Any] | None = None,
|
|
104
|
+
) -> Response[Error | ListAccountBillingInvoicesResponse]:
|
|
105
|
+
httpx_request_kwargs = httpx_request_kwargs or {}
|
|
106
|
+
|
|
107
|
+
kwargs = _get_kwargs(
|
|
108
|
+
group_name=group_name,
|
|
109
|
+
client=client,
|
|
110
|
+
page_token=page_token,
|
|
111
|
+
page_size=page_size,
|
|
112
|
+
)
|
|
113
|
+
kwargs.update(httpx_request_kwargs)
|
|
114
|
+
response = client.request(
|
|
115
|
+
**kwargs,
|
|
116
|
+
)
|
|
117
|
+
return _build_response(response=response)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
@retry(**DEFAULT_RETRY_ARGUMENTS)
|
|
121
|
+
async def asyncio(
|
|
122
|
+
group_name: str,
|
|
123
|
+
*,
|
|
124
|
+
client: httpx.AsyncClient,
|
|
125
|
+
page_token: str | Unset = UNSET,
|
|
126
|
+
page_size: int | Unset = UNSET,
|
|
127
|
+
httpx_request_kwargs: dict[str, Any] | None = None,
|
|
128
|
+
) -> Response[Error | ListAccountBillingInvoicesResponse]:
|
|
129
|
+
"""Retrieve billing invoices for a QCS group account.
|
|
130
|
+
|
|
131
|
+
Args:
|
|
132
|
+
group_name (str):
|
|
133
|
+
page_token (str | Unset):
|
|
134
|
+
page_size (int | Unset):
|
|
135
|
+
|
|
136
|
+
Raises:
|
|
137
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
138
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
139
|
+
|
|
140
|
+
Returns:
|
|
141
|
+
Response[Error | ListAccountBillingInvoicesResponse]
|
|
142
|
+
"""
|
|
143
|
+
|
|
144
|
+
httpx_request_kwargs = httpx_request_kwargs or {}
|
|
145
|
+
kwargs = _get_kwargs(
|
|
146
|
+
group_name=group_name,
|
|
147
|
+
page_token=page_token,
|
|
148
|
+
page_size=page_size,
|
|
149
|
+
)
|
|
150
|
+
kwargs.update(httpx_request_kwargs)
|
|
151
|
+
response = await client.request(**kwargs)
|
|
152
|
+
return _build_response(response=response)
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
@retry(**DEFAULT_RETRY_ARGUMENTS)
|
|
156
|
+
async def asyncio_from_dict(
|
|
157
|
+
group_name: str,
|
|
158
|
+
*,
|
|
159
|
+
client: httpx.AsyncClient,
|
|
160
|
+
page_token: str | Unset = UNSET,
|
|
161
|
+
page_size: int | Unset = UNSET,
|
|
162
|
+
httpx_request_kwargs: dict[str, Any] | None = None,
|
|
163
|
+
) -> Response[Error | ListAccountBillingInvoicesResponse]:
|
|
164
|
+
httpx_request_kwargs = httpx_request_kwargs or {}
|
|
165
|
+
|
|
166
|
+
kwargs = _get_kwargs(
|
|
167
|
+
group_name=group_name,
|
|
168
|
+
client=client,
|
|
169
|
+
page_token=page_token,
|
|
170
|
+
page_size=page_size,
|
|
171
|
+
)
|
|
172
|
+
kwargs.update(httpx_request_kwargs)
|
|
173
|
+
response = await client.request(
|
|
174
|
+
**kwargs,
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
return _build_response(response=response)
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
from typing import Any
|
|
2
|
+
from urllib.parse import quote
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
from tenacity import retry
|
|
6
|
+
|
|
7
|
+
from ...models.error import Error
|
|
8
|
+
from ...models.list_account_billing_invoice_lines_response import ListAccountBillingInvoiceLinesResponse
|
|
9
|
+
from ...types import UNSET, Response, Unset
|
|
10
|
+
from ...util.errors import QCSHTTPStatusError
|
|
11
|
+
from ...util.retry import DEFAULT_RETRY_ARGUMENTS
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
group_name: str,
|
|
16
|
+
*,
|
|
17
|
+
page_token: str | Unset = UNSET,
|
|
18
|
+
page_size: int | Unset = UNSET,
|
|
19
|
+
) -> dict[str, Any]:
|
|
20
|
+
|
|
21
|
+
params: dict[str, Any] = {}
|
|
22
|
+
|
|
23
|
+
params["pageToken"] = page_token
|
|
24
|
+
|
|
25
|
+
params["pageSize"] = page_size
|
|
26
|
+
|
|
27
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
28
|
+
|
|
29
|
+
_kwargs: dict[str, Any] = {
|
|
30
|
+
"method": "get",
|
|
31
|
+
"url": "/v1/groups/{group_name}/billingInvoices:listUpcomingLines".format(
|
|
32
|
+
group_name=quote(str(group_name), safe=""),
|
|
33
|
+
),
|
|
34
|
+
"params": params,
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return _kwargs
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def _parse_response(*, response: httpx.Response) -> Error | ListAccountBillingInvoiceLinesResponse | None:
|
|
41
|
+
if response.status_code == 200:
|
|
42
|
+
response_200 = ListAccountBillingInvoiceLinesResponse.from_dict(response.json())
|
|
43
|
+
|
|
44
|
+
return response_200
|
|
45
|
+
|
|
46
|
+
raise QCSHTTPStatusError(
|
|
47
|
+
message=f"Unexpected response: status code {response.status_code}",
|
|
48
|
+
response=response,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def _build_response(*, response: httpx.Response) -> Response[Error | ListAccountBillingInvoiceLinesResponse]:
|
|
53
|
+
"""Construct the Response class from the raw ``httpx.Response``."""
|
|
54
|
+
return Response.build_from_httpx_response(response=response, parse_function=_parse_response)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
@retry(**DEFAULT_RETRY_ARGUMENTS)
|
|
58
|
+
def sync(
|
|
59
|
+
group_name: str,
|
|
60
|
+
*,
|
|
61
|
+
client: httpx.Client,
|
|
62
|
+
page_token: str | Unset = UNSET,
|
|
63
|
+
page_size: int | Unset = UNSET,
|
|
64
|
+
httpx_request_kwargs: dict[str, Any] | None = None,
|
|
65
|
+
) -> Response[Error | ListAccountBillingInvoiceLinesResponse]:
|
|
66
|
+
"""List invoice lines for QCS group billing customer upcoming invoice.
|
|
67
|
+
|
|
68
|
+
Args:
|
|
69
|
+
group_name (str):
|
|
70
|
+
page_token (str | Unset):
|
|
71
|
+
page_size (int | Unset):
|
|
72
|
+
|
|
73
|
+
Raises:
|
|
74
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
75
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
76
|
+
|
|
77
|
+
Returns:
|
|
78
|
+
Response[Error | ListAccountBillingInvoiceLinesResponse]
|
|
79
|
+
"""
|
|
80
|
+
|
|
81
|
+
httpx_request_kwargs = httpx_request_kwargs or {}
|
|
82
|
+
|
|
83
|
+
kwargs = _get_kwargs(
|
|
84
|
+
group_name=group_name,
|
|
85
|
+
page_token=page_token,
|
|
86
|
+
page_size=page_size,
|
|
87
|
+
)
|
|
88
|
+
kwargs.update(httpx_request_kwargs)
|
|
89
|
+
response = client.request(
|
|
90
|
+
**kwargs,
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
return _build_response(response=response)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
@retry(**DEFAULT_RETRY_ARGUMENTS)
|
|
97
|
+
def sync_from_dict(
|
|
98
|
+
group_name: str,
|
|
99
|
+
*,
|
|
100
|
+
client: httpx.Client,
|
|
101
|
+
page_token: str | Unset = UNSET,
|
|
102
|
+
page_size: int | Unset = UNSET,
|
|
103
|
+
httpx_request_kwargs: dict[str, Any] | None = None,
|
|
104
|
+
) -> Response[Error | ListAccountBillingInvoiceLinesResponse]:
|
|
105
|
+
httpx_request_kwargs = httpx_request_kwargs or {}
|
|
106
|
+
|
|
107
|
+
kwargs = _get_kwargs(
|
|
108
|
+
group_name=group_name,
|
|
109
|
+
client=client,
|
|
110
|
+
page_token=page_token,
|
|
111
|
+
page_size=page_size,
|
|
112
|
+
)
|
|
113
|
+
kwargs.update(httpx_request_kwargs)
|
|
114
|
+
response = client.request(
|
|
115
|
+
**kwargs,
|
|
116
|
+
)
|
|
117
|
+
return _build_response(response=response)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
@retry(**DEFAULT_RETRY_ARGUMENTS)
|
|
121
|
+
async def asyncio(
|
|
122
|
+
group_name: str,
|
|
123
|
+
*,
|
|
124
|
+
client: httpx.AsyncClient,
|
|
125
|
+
page_token: str | Unset = UNSET,
|
|
126
|
+
page_size: int | Unset = UNSET,
|
|
127
|
+
httpx_request_kwargs: dict[str, Any] | None = None,
|
|
128
|
+
) -> Response[Error | ListAccountBillingInvoiceLinesResponse]:
|
|
129
|
+
"""List invoice lines for QCS group billing customer upcoming invoice.
|
|
130
|
+
|
|
131
|
+
Args:
|
|
132
|
+
group_name (str):
|
|
133
|
+
page_token (str | Unset):
|
|
134
|
+
page_size (int | Unset):
|
|
135
|
+
|
|
136
|
+
Raises:
|
|
137
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
138
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
139
|
+
|
|
140
|
+
Returns:
|
|
141
|
+
Response[Error | ListAccountBillingInvoiceLinesResponse]
|
|
142
|
+
"""
|
|
143
|
+
|
|
144
|
+
httpx_request_kwargs = httpx_request_kwargs or {}
|
|
145
|
+
kwargs = _get_kwargs(
|
|
146
|
+
group_name=group_name,
|
|
147
|
+
page_token=page_token,
|
|
148
|
+
page_size=page_size,
|
|
149
|
+
)
|
|
150
|
+
kwargs.update(httpx_request_kwargs)
|
|
151
|
+
response = await client.request(**kwargs)
|
|
152
|
+
return _build_response(response=response)
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
@retry(**DEFAULT_RETRY_ARGUMENTS)
|
|
156
|
+
async def asyncio_from_dict(
|
|
157
|
+
group_name: str,
|
|
158
|
+
*,
|
|
159
|
+
client: httpx.AsyncClient,
|
|
160
|
+
page_token: str | Unset = UNSET,
|
|
161
|
+
page_size: int | Unset = UNSET,
|
|
162
|
+
httpx_request_kwargs: dict[str, Any] | None = None,
|
|
163
|
+
) -> Response[Error | ListAccountBillingInvoiceLinesResponse]:
|
|
164
|
+
httpx_request_kwargs = httpx_request_kwargs or {}
|
|
165
|
+
|
|
166
|
+
kwargs = _get_kwargs(
|
|
167
|
+
group_name=group_name,
|
|
168
|
+
client=client,
|
|
169
|
+
page_token=page_token,
|
|
170
|
+
page_size=page_size,
|
|
171
|
+
)
|
|
172
|
+
kwargs.update(httpx_request_kwargs)
|
|
173
|
+
response = await client.request(
|
|
174
|
+
**kwargs,
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
return _build_response(response=response)
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
from typing import Any
|
|
2
|
+
from urllib.parse import quote
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
from tenacity import retry
|
|
6
|
+
|
|
7
|
+
from ...models.error import Error
|
|
8
|
+
from ...models.list_group_users_response import ListGroupUsersResponse
|
|
9
|
+
from ...types import UNSET, Response, Unset
|
|
10
|
+
from ...util.errors import QCSHTTPStatusError
|
|
11
|
+
from ...util.retry import DEFAULT_RETRY_ARGUMENTS
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
group_name: str,
|
|
16
|
+
*,
|
|
17
|
+
page_size: int | Unset = UNSET,
|
|
18
|
+
page_token: str | Unset = UNSET,
|
|
19
|
+
) -> dict[str, Any]:
|
|
20
|
+
|
|
21
|
+
params: dict[str, Any] = {}
|
|
22
|
+
|
|
23
|
+
params["pageSize"] = page_size
|
|
24
|
+
|
|
25
|
+
params["pageToken"] = page_token
|
|
26
|
+
|
|
27
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
28
|
+
|
|
29
|
+
_kwargs: dict[str, Any] = {
|
|
30
|
+
"method": "get",
|
|
31
|
+
"url": "/v1/groups/{group_name}/users".format(
|
|
32
|
+
group_name=quote(str(group_name), safe=""),
|
|
33
|
+
),
|
|
34
|
+
"params": params,
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return _kwargs
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def _parse_response(*, response: httpx.Response) -> Error | ListGroupUsersResponse | None:
|
|
41
|
+
if response.status_code == 200:
|
|
42
|
+
response_200 = ListGroupUsersResponse.from_dict(response.json())
|
|
43
|
+
|
|
44
|
+
return response_200
|
|
45
|
+
|
|
46
|
+
raise QCSHTTPStatusError(
|
|
47
|
+
message=f"Unexpected response: status code {response.status_code}",
|
|
48
|
+
response=response,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def _build_response(*, response: httpx.Response) -> Response[Error | ListGroupUsersResponse]:
|
|
53
|
+
"""Construct the Response class from the raw ``httpx.Response``."""
|
|
54
|
+
return Response.build_from_httpx_response(response=response, parse_function=_parse_response)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
@retry(**DEFAULT_RETRY_ARGUMENTS)
|
|
58
|
+
def sync(
|
|
59
|
+
group_name: str,
|
|
60
|
+
*,
|
|
61
|
+
client: httpx.Client,
|
|
62
|
+
page_size: int | Unset = UNSET,
|
|
63
|
+
page_token: str | Unset = UNSET,
|
|
64
|
+
httpx_request_kwargs: dict[str, Any] | None = None,
|
|
65
|
+
) -> Response[Error | ListGroupUsersResponse]:
|
|
66
|
+
"""List users belonging to a group
|
|
67
|
+
|
|
68
|
+
List users belonging to a group. Note, group membership may take several minutes to update within
|
|
69
|
+
our identity provider. After adding or removing a user to or from a group, please allow up to 60
|
|
70
|
+
minutes for changes to be reflected.
|
|
71
|
+
|
|
72
|
+
Args:
|
|
73
|
+
group_name (str):
|
|
74
|
+
page_size (int | Unset):
|
|
75
|
+
page_token (str | Unset):
|
|
76
|
+
|
|
77
|
+
Raises:
|
|
78
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
79
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
80
|
+
|
|
81
|
+
Returns:
|
|
82
|
+
Response[Error | ListGroupUsersResponse]
|
|
83
|
+
"""
|
|
84
|
+
|
|
85
|
+
httpx_request_kwargs = httpx_request_kwargs or {}
|
|
86
|
+
|
|
87
|
+
kwargs = _get_kwargs(
|
|
88
|
+
group_name=group_name,
|
|
89
|
+
page_size=page_size,
|
|
90
|
+
page_token=page_token,
|
|
91
|
+
)
|
|
92
|
+
kwargs.update(httpx_request_kwargs)
|
|
93
|
+
response = client.request(
|
|
94
|
+
**kwargs,
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
return _build_response(response=response)
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
@retry(**DEFAULT_RETRY_ARGUMENTS)
|
|
101
|
+
def sync_from_dict(
|
|
102
|
+
group_name: str,
|
|
103
|
+
*,
|
|
104
|
+
client: httpx.Client,
|
|
105
|
+
page_size: int | Unset = UNSET,
|
|
106
|
+
page_token: str | Unset = UNSET,
|
|
107
|
+
httpx_request_kwargs: dict[str, Any] | None = None,
|
|
108
|
+
) -> Response[Error | ListGroupUsersResponse]:
|
|
109
|
+
httpx_request_kwargs = httpx_request_kwargs or {}
|
|
110
|
+
|
|
111
|
+
kwargs = _get_kwargs(
|
|
112
|
+
group_name=group_name,
|
|
113
|
+
client=client,
|
|
114
|
+
page_size=page_size,
|
|
115
|
+
page_token=page_token,
|
|
116
|
+
)
|
|
117
|
+
kwargs.update(httpx_request_kwargs)
|
|
118
|
+
response = client.request(
|
|
119
|
+
**kwargs,
|
|
120
|
+
)
|
|
121
|
+
return _build_response(response=response)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
@retry(**DEFAULT_RETRY_ARGUMENTS)
|
|
125
|
+
async def asyncio(
|
|
126
|
+
group_name: str,
|
|
127
|
+
*,
|
|
128
|
+
client: httpx.AsyncClient,
|
|
129
|
+
page_size: int | Unset = UNSET,
|
|
130
|
+
page_token: str | Unset = UNSET,
|
|
131
|
+
httpx_request_kwargs: dict[str, Any] | None = None,
|
|
132
|
+
) -> Response[Error | ListGroupUsersResponse]:
|
|
133
|
+
"""List users belonging to a group
|
|
134
|
+
|
|
135
|
+
List users belonging to a group. Note, group membership may take several minutes to update within
|
|
136
|
+
our identity provider. After adding or removing a user to or from a group, please allow up to 60
|
|
137
|
+
minutes for changes to be reflected.
|
|
138
|
+
|
|
139
|
+
Args:
|
|
140
|
+
group_name (str):
|
|
141
|
+
page_size (int | Unset):
|
|
142
|
+
page_token (str | Unset):
|
|
143
|
+
|
|
144
|
+
Raises:
|
|
145
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
146
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
147
|
+
|
|
148
|
+
Returns:
|
|
149
|
+
Response[Error | ListGroupUsersResponse]
|
|
150
|
+
"""
|
|
151
|
+
|
|
152
|
+
httpx_request_kwargs = httpx_request_kwargs or {}
|
|
153
|
+
kwargs = _get_kwargs(
|
|
154
|
+
group_name=group_name,
|
|
155
|
+
page_size=page_size,
|
|
156
|
+
page_token=page_token,
|
|
157
|
+
)
|
|
158
|
+
kwargs.update(httpx_request_kwargs)
|
|
159
|
+
response = await client.request(**kwargs)
|
|
160
|
+
return _build_response(response=response)
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
@retry(**DEFAULT_RETRY_ARGUMENTS)
|
|
164
|
+
async def asyncio_from_dict(
|
|
165
|
+
group_name: str,
|
|
166
|
+
*,
|
|
167
|
+
client: httpx.AsyncClient,
|
|
168
|
+
page_size: int | Unset = UNSET,
|
|
169
|
+
page_token: str | Unset = UNSET,
|
|
170
|
+
httpx_request_kwargs: dict[str, Any] | None = None,
|
|
171
|
+
) -> Response[Error | ListGroupUsersResponse]:
|
|
172
|
+
httpx_request_kwargs = httpx_request_kwargs or {}
|
|
173
|
+
|
|
174
|
+
kwargs = _get_kwargs(
|
|
175
|
+
group_name=group_name,
|
|
176
|
+
client=client,
|
|
177
|
+
page_size=page_size,
|
|
178
|
+
page_token=page_token,
|
|
179
|
+
)
|
|
180
|
+
kwargs.update(httpx_request_kwargs)
|
|
181
|
+
response = await client.request(
|
|
182
|
+
**kwargs,
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
return _build_response(response=response)
|