id
int64
0
843k
repository_name
stringlengths
7
55
file_path
stringlengths
9
332
class_name
stringlengths
3
290
human_written_code
stringlengths
12
4.36M
class_skeleton
stringlengths
19
2.2M
total_program_units
int64
1
9.57k
total_doc_str
int64
0
4.2k
AvgCountLine
float64
0
7.89k
AvgCountLineBlank
float64
0
300
AvgCountLineCode
float64
0
7.89k
AvgCountLineComment
float64
0
7.89k
AvgCyclomatic
float64
0
130
CommentToCodeRatio
float64
0
176
CountClassBase
float64
0
48
CountClassCoupled
float64
0
589
CountClassCoupledModified
float64
0
581
CountClassDerived
float64
0
5.37k
CountDeclInstanceMethod
float64
0
4.2k
CountDeclInstanceVariable
float64
0
299
CountDeclMethod
float64
0
4.2k
CountDeclMethodAll
float64
0
4.2k
CountLine
float64
1
115k
CountLineBlank
float64
0
9.01k
CountLineCode
float64
0
94.4k
CountLineCodeDecl
float64
0
46.1k
CountLineCodeExe
float64
0
91.3k
CountLineComment
float64
0
27k
CountStmt
float64
1
93.2k
CountStmtDecl
float64
0
46.1k
CountStmtExe
float64
0
90.2k
MaxCyclomatic
float64
0
759
MaxInheritanceTree
float64
0
16
MaxNesting
float64
0
34
SumCyclomatic
float64
0
6k
10,200
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/operations/_application_live_views_operations.py
azext_spring.vendored_sdks.appplatform.v2023_12_01.operations._application_live_views_operations.ApplicationLiveViewsOperations
class ApplicationLiveViewsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`application_live_views` attribute. """ models = _models def __init__(self, *args, **kwargs): input_args = list(args) self._client = input_args.pop(0) if input_args else kwargs.pop("client") self._config = input_args.pop(0) if input_args else kwargs.pop("config") self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace def list( self, resource_group_name: str, service_name: str, **kwargs: Any ) -> Iterable["_models.ApplicationLiveViewResource"]: """Handles requests to list all resources in a Service. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: An iterator like instance of either ApplicationLiveViewResource or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.ApplicationLiveViewResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.ApplicationLiveViewResourceCollection] = kwargs.pop("cls", None) error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) def prepare_request(next_link=None): if not next_link: _request = build_list_request( resource_group_name=resource_group_name, service_name=service_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version _parsed_next_link = urllib.parse.urlparse(next_link) _next_request_params = case_insensitive_dict( { key: [urllib.parse.quote(v) for v in value] for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() } ) _next_request_params["api-version"] = self._api_version _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request def extract_data(pipeline_response): deserialized = self._deserialize("ApplicationLiveViewResourceCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) @distributed_trace def get( self, resource_group_name: str, service_name: str, application_live_view_name: str, **kwargs: Any ) -> _models.ApplicationLiveViewResource: """Get the Application Live and its properties. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_live_view_name: The name of Application Live View. Required. :type application_live_view_name: str :return: ApplicationLiveViewResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.ApplicationLiveViewResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.ApplicationLiveViewResource] = kwargs.pop("cls", None) _request = build_get_request( resource_group_name=resource_group_name, service_name=service_name, application_live_view_name=application_live_view_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("ApplicationLiveViewResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore def _create_or_update_initial( self, resource_group_name: str, service_name: str, application_live_view_name: str, application_live_view_resource: Union[_models.ApplicationLiveViewResource, IO[bytes]], **kwargs: Any ) -> _models.ApplicationLiveViewResource: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApplicationLiveViewResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(application_live_view_resource, (IOBase, bytes)): _content = application_live_view_resource else: _json = self._serialize.body(application_live_view_resource, "ApplicationLiveViewResource") _request = build_create_or_update_request( resource_group_name=resource_group_name, service_name=service_name, application_live_view_name=application_live_view_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("ApplicationLiveViewResource", pipeline_response) if response.status_code == 201: deserialized = self._deserialize("ApplicationLiveViewResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, application_live_view_name: str, application_live_view_resource: _models.ApplicationLiveViewResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ApplicationLiveViewResource]: """Create the default Application Live View or update the existing Application Live View. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_live_view_name: The name of Application Live View. Required. :type application_live_view_name: str :param application_live_view_resource: Parameters for the update operation. Required. :type application_live_view_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ApplicationLiveViewResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ApplicationLiveViewResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApplicationLiveViewResource] :raises ~azure.core.exceptions.HttpResponseError: """ @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, application_live_view_name: str, application_live_view_resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ApplicationLiveViewResource]: """Create the default Application Live View or update the existing Application Live View. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_live_view_name: The name of Application Live View. Required. :type application_live_view_name: str :param application_live_view_resource: Parameters for the update operation. Required. :type application_live_view_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ApplicationLiveViewResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApplicationLiveViewResource] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def begin_create_or_update( self, resource_group_name: str, service_name: str, application_live_view_name: str, application_live_view_resource: Union[_models.ApplicationLiveViewResource, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.ApplicationLiveViewResource]: """Create the default Application Live View or update the existing Application Live View. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_live_view_name: The name of Application Live View. Required. :type application_live_view_name: str :param application_live_view_resource: Parameters for the update operation. Is either a ApplicationLiveViewResource type or a IO[bytes] type. Required. :type application_live_view_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ApplicationLiveViewResource or IO[bytes] :return: An instance of LROPoller that returns either ApplicationLiveViewResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApplicationLiveViewResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApplicationLiveViewResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, service_name=service_name, application_live_view_name=application_live_view_name, application_live_view_resource=application_live_view_resource, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("ApplicationLiveViewResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[_models.ApplicationLiveViewResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[_models.ApplicationLiveViewResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, application_live_view_name: str, **kwargs: Any ) -> None: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, service_name=service_name, application_live_view_name=application_live_view_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) if cls: return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace def begin_delete( self, resource_group_name: str, service_name: str, application_live_view_name: str, **kwargs: Any ) -> LROPoller[None]: """Disable the default Application Live View. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_live_view_name: The name of Application Live View. Required. :type application_live_view_name: str :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._delete_initial( # type: ignore resource_group_name=resource_group_name, service_name=service_name, application_live_view_name=application_live_view_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method)
class ApplicationLiveViewsOperations: ''' .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`application_live_views` attribute. ''' def __init__(self, *args, **kwargs): pass @distributed_trace def list( self, resource_group_name: str, service_name: str, **kwargs: Any ) -> Iterable["_models.ApplicationLiveViewResource"]: '''Handles requests to list all resources in a Service. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: An iterator like instance of either ApplicationLiveViewResource or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.ApplicationLiveViewResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def prepare_request(next_link=None): pass def extract_data(pipeline_response): pass def get_next(next_link=None): pass @distributed_trace def get_next(next_link=None): '''Get the Application Live and its properties. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_live_view_name: The name of Application Live View. Required. :type application_live_view_name: str :return: ApplicationLiveViewResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.ApplicationLiveViewResource :raises ~azure.core.exceptions.HttpResponseError: ''' pass def _create_or_update_initial( self, resource_group_name: str, service_name: str, application_live_view_name: str, application_live_view_resource: Union[_models.ApplicationLiveViewResource, IO[bytes]], **kwargs: Any ) -> _models.ApplicationLiveViewResource: pass @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, application_live_view_name: str, application_live_view_resource: _models.ApplicationLiveViewResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ApplicationLiveViewResource]: '''Create the default Application Live View or update the existing Application Live View. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_live_view_name: The name of Application Live View. Required. :type application_live_view_name: str :param application_live_view_resource: Parameters for the update operation. Required. :type application_live_view_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ApplicationLiveViewResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ApplicationLiveViewResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApplicationLiveViewResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, application_live_view_name: str, application_live_view_resource: _models.ApplicationLiveViewResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ApplicationLiveViewResource]: '''Create the default Application Live View or update the existing Application Live View. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_live_view_name: The name of Application Live View. Required. :type application_live_view_name: str :param application_live_view_resource: Parameters for the update operation. Required. :type application_live_view_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ApplicationLiveViewResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApplicationLiveViewResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def begin_create_or_update( self, resource_group_name: str, service_name: str, application_live_view_name: str, application_live_view_resource: _models.ApplicationLiveViewResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ApplicationLiveViewResource]: '''Create the default Application Live View or update the existing Application Live View. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_live_view_name: The name of Application Live View. Required. :type application_live_view_name: str :param application_live_view_resource: Parameters for the update operation. Is either a ApplicationLiveViewResource type or a IO[bytes] type. Required. :type application_live_view_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ApplicationLiveViewResource or IO[bytes] :return: An instance of LROPoller that returns either ApplicationLiveViewResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApplicationLiveViewResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, application_live_view_name: str, **kwargs: Any ) -> None: pass @distributed_trace def begin_delete( self, resource_group_name: str, service_name: str, application_live_view_name: str, **kwargs: Any ) -> LROPoller[None]: '''Disable the default Application Live View. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_live_view_name: The name of Application Live View. Required. :type application_live_view_name: str :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass
21
7
37
4
26
8
3
0.37
0
7
0
0
9
5
9
9
479
62
316
135
255
118
163
89
148
6
0
1
42
10,201
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/operations/_application_accelerators_operations.py
azext_spring.vendored_sdks.appplatform.v2023_12_01.operations._application_accelerators_operations.ApplicationAcceleratorsOperations
class ApplicationAcceleratorsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`application_accelerators` attribute. """ models = _models def __init__(self, *args, **kwargs): input_args = list(args) self._client = input_args.pop(0) if input_args else kwargs.pop("client") self._config = input_args.pop(0) if input_args else kwargs.pop("config") self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace def list( self, resource_group_name: str, service_name: str, **kwargs: Any ) -> Iterable["_models.ApplicationAcceleratorResource"]: """Handle requests to list all application accelerator. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: An iterator like instance of either ApplicationAcceleratorResource or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.ApplicationAcceleratorResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.ApplicationAcceleratorResourceCollection] = kwargs.pop("cls", None) error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) def prepare_request(next_link=None): if not next_link: _request = build_list_request( resource_group_name=resource_group_name, service_name=service_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version _parsed_next_link = urllib.parse.urlparse(next_link) _next_request_params = case_insensitive_dict( { key: [urllib.parse.quote(v) for v in value] for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() } ) _next_request_params["api-version"] = self._api_version _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request def extract_data(pipeline_response): deserialized = self._deserialize("ApplicationAcceleratorResourceCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) @distributed_trace def get( self, resource_group_name: str, service_name: str, application_accelerator_name: str, **kwargs: Any ) -> _models.ApplicationAcceleratorResource: """Get the application accelerator. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_accelerator_name: The name of the application accelerator. Required. :type application_accelerator_name: str :return: ApplicationAcceleratorResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.ApplicationAcceleratorResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.ApplicationAcceleratorResource] = kwargs.pop("cls", None) _request = build_get_request( resource_group_name=resource_group_name, service_name=service_name, application_accelerator_name=application_accelerator_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("ApplicationAcceleratorResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore def _create_or_update_initial( self, resource_group_name: str, service_name: str, application_accelerator_name: str, application_accelerator_resource: Union[_models.ApplicationAcceleratorResource, IO[bytes]], **kwargs: Any ) -> _models.ApplicationAcceleratorResource: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApplicationAcceleratorResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(application_accelerator_resource, (IOBase, bytes)): _content = application_accelerator_resource else: _json = self._serialize.body(application_accelerator_resource, "ApplicationAcceleratorResource") _request = build_create_or_update_request( resource_group_name=resource_group_name, service_name=service_name, application_accelerator_name=application_accelerator_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("ApplicationAcceleratorResource", pipeline_response) if response.status_code == 201: deserialized = self._deserialize("ApplicationAcceleratorResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, application_accelerator_name: str, application_accelerator_resource: _models.ApplicationAcceleratorResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ApplicationAcceleratorResource]: """Create or update the application accelerator. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_accelerator_name: The name of the application accelerator. Required. :type application_accelerator_name: str :param application_accelerator_resource: The application accelerator for the create or update operation. Required. :type application_accelerator_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ApplicationAcceleratorResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ApplicationAcceleratorResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApplicationAcceleratorResource] :raises ~azure.core.exceptions.HttpResponseError: """ @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, application_accelerator_name: str, application_accelerator_resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ApplicationAcceleratorResource]: """Create or update the application accelerator. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_accelerator_name: The name of the application accelerator. Required. :type application_accelerator_name: str :param application_accelerator_resource: The application accelerator for the create or update operation. Required. :type application_accelerator_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ApplicationAcceleratorResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApplicationAcceleratorResource] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def begin_create_or_update( self, resource_group_name: str, service_name: str, application_accelerator_name: str, application_accelerator_resource: Union[_models.ApplicationAcceleratorResource, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.ApplicationAcceleratorResource]: """Create or update the application accelerator. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_accelerator_name: The name of the application accelerator. Required. :type application_accelerator_name: str :param application_accelerator_resource: The application accelerator for the create or update operation. Is either a ApplicationAcceleratorResource type or a IO[bytes] type. Required. :type application_accelerator_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ApplicationAcceleratorResource or IO[bytes] :return: An instance of LROPoller that returns either ApplicationAcceleratorResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApplicationAcceleratorResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApplicationAcceleratorResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, service_name=service_name, application_accelerator_name=application_accelerator_name, application_accelerator_resource=application_accelerator_resource, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("ApplicationAcceleratorResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[_models.ApplicationAcceleratorResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[_models.ApplicationAcceleratorResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, application_accelerator_name: str, **kwargs: Any ) -> None: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, service_name=service_name, application_accelerator_name=application_accelerator_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) if cls: return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace def begin_delete( self, resource_group_name: str, service_name: str, application_accelerator_name: str, **kwargs: Any ) -> LROPoller[None]: """Delete the application accelerator. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_accelerator_name: The name of the application accelerator. Required. :type application_accelerator_name: str :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._delete_initial( # type: ignore resource_group_name=resource_group_name, service_name=service_name, application_accelerator_name=application_accelerator_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method)
class ApplicationAcceleratorsOperations: ''' .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`application_accelerators` attribute. ''' def __init__(self, *args, **kwargs): pass @distributed_trace def list( self, resource_group_name: str, service_name: str, **kwargs: Any ) -> Iterable["_models.ApplicationAcceleratorResource"]: '''Handle requests to list all application accelerator. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: An iterator like instance of either ApplicationAcceleratorResource or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.ApplicationAcceleratorResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def prepare_request(next_link=None): pass def extract_data(pipeline_response): pass def get_next(next_link=None): pass @distributed_trace def get_next(next_link=None): '''Get the application accelerator. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_accelerator_name: The name of the application accelerator. Required. :type application_accelerator_name: str :return: ApplicationAcceleratorResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.ApplicationAcceleratorResource :raises ~azure.core.exceptions.HttpResponseError: ''' pass def _create_or_update_initial( self, resource_group_name: str, service_name: str, application_accelerator_name: str, application_accelerator_resource: Union[_models.ApplicationAcceleratorResource, IO[bytes]], **kwargs: Any ) -> _models.ApplicationAcceleratorResource: pass @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, application_accelerator_name: str, application_accelerator_resource: _models.ApplicationAcceleratorResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ApplicationAcceleratorResource]: '''Create or update the application accelerator. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_accelerator_name: The name of the application accelerator. Required. :type application_accelerator_name: str :param application_accelerator_resource: The application accelerator for the create or update operation. Required. :type application_accelerator_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ApplicationAcceleratorResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ApplicationAcceleratorResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApplicationAcceleratorResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, application_accelerator_name: str, application_accelerator_resource: _models.ApplicationAcceleratorResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ApplicationAcceleratorResource]: '''Create or update the application accelerator. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_accelerator_name: The name of the application accelerator. Required. :type application_accelerator_name: str :param application_accelerator_resource: The application accelerator for the create or update operation. Required. :type application_accelerator_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ApplicationAcceleratorResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApplicationAcceleratorResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def begin_create_or_update( self, resource_group_name: str, service_name: str, application_accelerator_name: str, application_accelerator_resource: _models.ApplicationAcceleratorResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ApplicationAcceleratorResource]: '''Create or update the application accelerator. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_accelerator_name: The name of the application accelerator. Required. :type application_accelerator_name: str :param application_accelerator_resource: The application accelerator for the create or update operation. Is either a ApplicationAcceleratorResource type or a IO[bytes] type. Required. :type application_accelerator_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ApplicationAcceleratorResource or IO[bytes] :return: An instance of LROPoller that returns either ApplicationAcceleratorResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApplicationAcceleratorResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, application_accelerator_name: str, **kwargs: Any ) -> None: pass @distributed_trace def begin_delete( self, resource_group_name: str, service_name: str, application_accelerator_name: str, **kwargs: Any ) -> LROPoller[None]: '''Delete the application accelerator. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param application_accelerator_name: The name of the application accelerator. Required. :type application_accelerator_name: str :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass
21
7
37
4
26
9
3
0.38
0
7
0
0
9
5
9
9
481
62
316
135
255
120
163
89
148
6
0
1
42
10,202
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/operations/_apms_operations.py
azext_spring.vendored_sdks.appplatform.v2023_12_01.operations._apms_operations.ApmsOperations
class ApmsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`apms` attribute. """ models = _models def __init__(self, *args, **kwargs): input_args = list(args) self._client = input_args.pop(0) if input_args else kwargs.pop("client") self._config = input_args.pop(0) if input_args else kwargs.pop("config") self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace def list(self, resource_group_name: str, service_name: str, **kwargs: Any) -> Iterable["_models.ApmResource"]: """Get collection of APMs. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: An iterator like instance of either ApmResource or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.ApmResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.ApmResourceCollection] = kwargs.pop("cls", None) error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) def prepare_request(next_link=None): if not next_link: _request = build_list_request( resource_group_name=resource_group_name, service_name=service_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version _parsed_next_link = urllib.parse.urlparse(next_link) _next_request_params = case_insensitive_dict( { key: [urllib.parse.quote(v) for v in value] for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() } ) _next_request_params["api-version"] = self._api_version _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request def extract_data(pipeline_response): deserialized = self._deserialize("ApmResourceCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) @distributed_trace def get(self, resource_group_name: str, service_name: str, apm_name: str, **kwargs: Any) -> _models.ApmResource: """Get the APM by name. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param apm_name: The name of the APM. Required. :type apm_name: str :return: ApmResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.ApmResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.ApmResource] = kwargs.pop("cls", None) _request = build_get_request( resource_group_name=resource_group_name, service_name=service_name, apm_name=apm_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("ApmResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore def _create_or_update_initial( self, resource_group_name: str, service_name: str, apm_name: str, apm_resource: Union[_models.ApmResource, IO[bytes]], **kwargs: Any ) -> _models.ApmResource: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApmResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(apm_resource, (IOBase, bytes)): _content = apm_resource else: _json = self._serialize.body(apm_resource, "ApmResource") _request = build_create_or_update_request( resource_group_name=resource_group_name, service_name=service_name, apm_name=apm_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("ApmResource", pipeline_response) if response.status_code == 201: deserialized = self._deserialize("ApmResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, apm_name: str, apm_resource: _models.ApmResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ApmResource]: """Create or update an APM. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param apm_name: The name of the APM. Required. :type apm_name: str :param apm_resource: Parameters for the create or update operation. Required. :type apm_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ApmResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ApmResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApmResource] :raises ~azure.core.exceptions.HttpResponseError: """ @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, apm_name: str, apm_resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ApmResource]: """Create or update an APM. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param apm_name: The name of the APM. Required. :type apm_name: str :param apm_resource: Parameters for the create or update operation. Required. :type apm_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ApmResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApmResource] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def begin_create_or_update( self, resource_group_name: str, service_name: str, apm_name: str, apm_resource: Union[_models.ApmResource, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.ApmResource]: """Create or update an APM. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param apm_name: The name of the APM. Required. :type apm_name: str :param apm_resource: Parameters for the create or update operation. Is either a ApmResource type or a IO[bytes] type. Required. :type apm_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ApmResource or IO[bytes] :return: An instance of LROPoller that returns either ApmResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApmResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApmResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, service_name=service_name, apm_name=apm_name, apm_resource=apm_resource, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("ApmResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[_models.ApmResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[_models.ApmResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, apm_name: str, **kwargs: Any ) -> None: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, service_name=service_name, apm_name=apm_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) if cls: return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace def begin_delete( self, resource_group_name: str, service_name: str, apm_name: str, **kwargs: Any ) -> LROPoller[None]: """Operation to delete an APM. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param apm_name: The name of the APM. Required. :type apm_name: str :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._delete_initial( # type: ignore resource_group_name=resource_group_name, service_name=service_name, apm_name=apm_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) ) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace def list_secret_keys( self, resource_group_name: str, service_name: str, apm_name: str, **kwargs: Any ) -> _models.ApmSecretKeys: """List keys of APM sensitive properties. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param apm_name: The name of the APM. Required. :type apm_name: str :return: ApmSecretKeys or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.ApmSecretKeys :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.ApmSecretKeys] = kwargs.pop("cls", None) _request = build_list_secret_keys_request( resource_group_name=resource_group_name, service_name=service_name, apm_name=apm_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("ApmSecretKeys", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized
class ApmsOperations: ''' .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`apms` attribute. ''' def __init__(self, *args, **kwargs): pass @distributed_trace def list(self, resource_group_name: str, service_name: str, **kwargs: Any) -> Iterable["_models.ApmResource"]: '''Get collection of APMs. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: An iterator like instance of either ApmResource or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.ApmResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def prepare_request(next_link=None): pass def extract_data(pipeline_response): pass def get_next(next_link=None): pass @distributed_trace def get_next(next_link=None): '''Get the APM by name. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param apm_name: The name of the APM. Required. :type apm_name: str :return: ApmResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.ApmResource :raises ~azure.core.exceptions.HttpResponseError: ''' pass def _create_or_update_initial( self, resource_group_name: str, service_name: str, apm_name: str, apm_resource: Union[_models.ApmResource, IO[bytes]], **kwargs: Any ) -> _models.ApmResource: pass @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, apm_name: str, apm_resource: _models.ApmResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ApmResource]: '''Create or update an APM. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param apm_name: The name of the APM. Required. :type apm_name: str :param apm_resource: Parameters for the create or update operation. Required. :type apm_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ApmResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ApmResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApmResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, apm_name: str, apm_resource: _models.ApmResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ApmResource]: '''Create or update an APM. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param apm_name: The name of the APM. Required. :type apm_name: str :param apm_resource: Parameters for the create or update operation. Required. :type apm_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ApmResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApmResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def begin_create_or_update( self, resource_group_name: str, service_name: str, apm_name: str, apm_resource: _models.ApmResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ApmResource]: '''Create or update an APM. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param apm_name: The name of the APM. Required. :type apm_name: str :param apm_resource: Parameters for the create or update operation. Is either a ApmResource type or a IO[bytes] type. Required. :type apm_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ApmResource or IO[bytes] :return: An instance of LROPoller that returns either ApmResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApmResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, apm_name: str, **kwargs: Any ) -> None: pass @distributed_trace def begin_delete( self, resource_group_name: str, service_name: str, apm_name: str, **kwargs: Any ) -> LROPoller[None]: '''Operation to delete an APM. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param apm_name: The name of the APM. Required. :type apm_name: str :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass @distributed_trace def list_secret_keys( self, resource_group_name: str, service_name: str, apm_name: str, **kwargs: Any ) -> _models.ApmSecretKeys: '''List keys of APM sensitive properties. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param apm_name: The name of the APM. Required. :type apm_name: str :return: ApmSecretKeys or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.ApmSecretKeys :raises ~azure.core.exceptions.HttpResponseError: ''' pass
23
8
37
4
26
8
3
0.36
0
7
0
0
10
5
10
10
531
73
352
145
291
126
183
100
167
6
0
1
45
10,203
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/operations/_api_portals_operations.py
azext_spring.vendored_sdks.appplatform.v2023_12_01.operations._api_portals_operations.ApiPortalsOperations
class ApiPortalsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`api_portals` attribute. """ models = _models def __init__(self, *args, **kwargs): input_args = list(args) self._client = input_args.pop(0) if input_args else kwargs.pop("client") self._config = input_args.pop(0) if input_args else kwargs.pop("config") self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace def get( self, resource_group_name: str, service_name: str, api_portal_name: str, **kwargs: Any ) -> _models.ApiPortalResource: """Get the API portal and its properties. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param api_portal_name: The name of API portal. Required. :type api_portal_name: str :return: ApiPortalResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.ApiPortalResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.ApiPortalResource] = kwargs.pop("cls", None) _request = build_get_request( resource_group_name=resource_group_name, service_name=service_name, api_portal_name=api_portal_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("ApiPortalResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore def _create_or_update_initial( self, resource_group_name: str, service_name: str, api_portal_name: str, api_portal_resource: Union[_models.ApiPortalResource, IO[bytes]], **kwargs: Any ) -> _models.ApiPortalResource: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApiPortalResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(api_portal_resource, (IOBase, bytes)): _content = api_portal_resource else: _json = self._serialize.body(api_portal_resource, "ApiPortalResource") _request = build_create_or_update_request( resource_group_name=resource_group_name, service_name=service_name, api_portal_name=api_portal_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("ApiPortalResource", pipeline_response) if response.status_code == 201: deserialized = self._deserialize("ApiPortalResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, api_portal_name: str, api_portal_resource: _models.ApiPortalResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ApiPortalResource]: """Create the default API portal or update the existing API portal. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param api_portal_name: The name of API portal. Required. :type api_portal_name: str :param api_portal_resource: The API portal for the create or update operation. Required. :type api_portal_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ApiPortalResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ApiPortalResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApiPortalResource] :raises ~azure.core.exceptions.HttpResponseError: """ @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, api_portal_name: str, api_portal_resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ApiPortalResource]: """Create the default API portal or update the existing API portal. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param api_portal_name: The name of API portal. Required. :type api_portal_name: str :param api_portal_resource: The API portal for the create or update operation. Required. :type api_portal_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ApiPortalResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApiPortalResource] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def begin_create_or_update( self, resource_group_name: str, service_name: str, api_portal_name: str, api_portal_resource: Union[_models.ApiPortalResource, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.ApiPortalResource]: """Create the default API portal or update the existing API portal. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param api_portal_name: The name of API portal. Required. :type api_portal_name: str :param api_portal_resource: The API portal for the create or update operation. Is either a ApiPortalResource type or a IO[bytes] type. Required. :type api_portal_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ApiPortalResource or IO[bytes] :return: An instance of LROPoller that returns either ApiPortalResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApiPortalResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApiPortalResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, service_name=service_name, api_portal_name=api_portal_name, api_portal_resource=api_portal_resource, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("ApiPortalResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[_models.ApiPortalResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[_models.ApiPortalResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, api_portal_name: str, **kwargs: Any ) -> None: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, service_name=service_name, api_portal_name=api_portal_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) # type: ignore @distributed_trace def begin_delete( self, resource_group_name: str, service_name: str, api_portal_name: str, **kwargs: Any ) -> LROPoller[None]: """Delete the default API portal. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param api_portal_name: The name of API portal. Required. :type api_portal_name: str :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._delete_initial( # type: ignore resource_group_name=resource_group_name, service_name=service_name, api_portal_name=api_portal_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace def list(self, resource_group_name: str, service_name: str, **kwargs: Any) -> Iterable["_models.ApiPortalResource"]: """Handles requests to list all resources in a Service. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: An iterator like instance of either ApiPortalResource or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.ApiPortalResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.ApiPortalResourceCollection] = kwargs.pop("cls", None) error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) def prepare_request(next_link=None): if not next_link: _request = build_list_request( resource_group_name=resource_group_name, service_name=service_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version _parsed_next_link = urllib.parse.urlparse(next_link) _next_request_params = case_insensitive_dict( { key: [urllib.parse.quote(v) for v in value] for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() } ) _next_request_params["api-version"] = self._api_version _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request def extract_data(pipeline_response): deserialized = self._deserialize("ApiPortalResourceCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) @overload def validate_domain( self, resource_group_name: str, service_name: str, api_portal_name: str, validate_payload: _models.CustomDomainValidatePayload, *, content_type: str = "application/json", **kwargs: Any ) -> _models.CustomDomainValidateResult: """Check the domains are valid as well as not in use. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param api_portal_name: The name of API portal. Required. :type api_portal_name: str :param validate_payload: Custom domain payload to be validated. Required. :type validate_payload: ~azure.mgmt.appplatform.v2023_12_01.models.CustomDomainValidatePayload :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: CustomDomainValidateResult or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.CustomDomainValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ @overload def validate_domain( self, resource_group_name: str, service_name: str, api_portal_name: str, validate_payload: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.CustomDomainValidateResult: """Check the domains are valid as well as not in use. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param api_portal_name: The name of API portal. Required. :type api_portal_name: str :param validate_payload: Custom domain payload to be validated. Required. :type validate_payload: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: CustomDomainValidateResult or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.CustomDomainValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def validate_domain( self, resource_group_name: str, service_name: str, api_portal_name: str, validate_payload: Union[_models.CustomDomainValidatePayload, IO[bytes]], **kwargs: Any ) -> _models.CustomDomainValidateResult: """Check the domains are valid as well as not in use. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param api_portal_name: The name of API portal. Required. :type api_portal_name: str :param validate_payload: Custom domain payload to be validated. Is either a CustomDomainValidatePayload type or a IO[bytes] type. Required. :type validate_payload: ~azure.mgmt.appplatform.v2023_12_01.models.CustomDomainValidatePayload or IO[bytes] :return: CustomDomainValidateResult or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.CustomDomainValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CustomDomainValidateResult] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(validate_payload, (IOBase, bytes)): _content = validate_payload else: _json = self._serialize.body(validate_payload, "CustomDomainValidatePayload") _request = build_validate_domain_request( resource_group_name=resource_group_name, service_name=service_name, api_portal_name=api_portal_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("CustomDomainValidateResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized
class ApiPortalsOperations: ''' .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`api_portals` attribute. ''' def __init__(self, *args, **kwargs): pass @distributed_trace def get( self, resource_group_name: str, service_name: str, api_portal_name: str, **kwargs: Any ) -> _models.ApiPortalResource: '''Get the API portal and its properties. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param api_portal_name: The name of API portal. Required. :type api_portal_name: str :return: ApiPortalResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.ApiPortalResource :raises ~azure.core.exceptions.HttpResponseError: ''' pass def _create_or_update_initial( self, resource_group_name: str, service_name: str, api_portal_name: str, api_portal_resource: Union[_models.ApiPortalResource, IO[bytes]], **kwargs: Any ) -> _models.ApiPortalResource: pass @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, api_portal_name: str, api_portal_resource: _models.ApiPortalResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ApiPortalResource]: '''Create the default API portal or update the existing API portal. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param api_portal_name: The name of API portal. Required. :type api_portal_name: str :param api_portal_resource: The API portal for the create or update operation. Required. :type api_portal_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ApiPortalResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ApiPortalResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApiPortalResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, api_portal_name: str, api_portal_resource: _models.ApiPortalResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ApiPortalResource]: '''Create the default API portal or update the existing API portal. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param api_portal_name: The name of API portal. Required. :type api_portal_name: str :param api_portal_resource: The API portal for the create or update operation. Required. :type api_portal_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ApiPortalResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApiPortalResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def begin_create_or_update( self, resource_group_name: str, service_name: str, api_portal_name: str, api_portal_resource: _models.ApiPortalResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ApiPortalResource]: '''Create the default API portal or update the existing API portal. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param api_portal_name: The name of API portal. Required. :type api_portal_name: str :param api_portal_resource: The API portal for the create or update operation. Is either a ApiPortalResource type or a IO[bytes] type. Required. :type api_portal_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ApiPortalResource or IO[bytes] :return: An instance of LROPoller that returns either ApiPortalResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApiPortalResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, api_portal_name: str, **kwargs: Any ) -> None: pass @distributed_trace def begin_delete( self, resource_group_name: str, service_name: str, api_portal_name: str, **kwargs: Any ) -> LROPoller[None]: '''Delete the default API portal. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param api_portal_name: The name of API portal. Required. :type api_portal_name: str :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass @distributed_trace def list(self, resource_group_name: str, service_name: str, **kwargs: Any) -> Iterable["_models.ApiPortalResource"]: '''Handles requests to list all resources in a Service. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: An iterator like instance of either ApiPortalResource or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.ApiPortalResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def prepare_request(next_link=None): pass def extract_data(pipeline_response): pass def get_next(next_link=None): pass @overload def validate_domain( self, resource_group_name: str, service_name: str, api_portal_name: str, validate_payload: _models.CustomDomainValidatePayload, *, content_type: str = "application/json", **kwargs: Any ) -> _models.CustomDomainValidateResult: '''Check the domains are valid as well as not in use. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param api_portal_name: The name of API portal. Required. :type api_portal_name: str :param validate_payload: Custom domain payload to be validated. Required. :type validate_payload: ~azure.mgmt.appplatform.v2023_12_01.models.CustomDomainValidatePayload :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: CustomDomainValidateResult or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.CustomDomainValidateResult :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload def validate_domain( self, resource_group_name: str, service_name: str, api_portal_name: str, validate_payload: _models.CustomDomainValidatePayload, *, content_type: str = "application/json", **kwargs: Any ) -> _models.CustomDomainValidateResult: '''Check the domains are valid as well as not in use. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param api_portal_name: The name of API portal. Required. :type api_portal_name: str :param validate_payload: Custom domain payload to be validated. Required. :type validate_payload: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: CustomDomainValidateResult or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.CustomDomainValidateResult :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def validate_domain( self, resource_group_name: str, service_name: str, api_portal_name: str, validate_payload: _models.CustomDomainValidatePayload, *, content_type: str = "application/json", **kwargs: Any ) -> _models.CustomDomainValidateResult: '''Check the domains are valid as well as not in use. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param api_portal_name: The name of API portal. Required. :type api_portal_name: str :param validate_payload: Custom domain payload to be validated. Is either a CustomDomainValidatePayload type or a IO[bytes] type. Required. :type validate_payload: ~azure.mgmt.appplatform.v2023_12_01.models.CustomDomainValidatePayload or IO[bytes] :return: CustomDomainValidateResult or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.CustomDomainValidateResult :raises ~azure.core.exceptions.HttpResponseError: ''' pass
27
10
38
4
25
10
3
0.44
0
7
0
0
12
5
12
12
613
77
387
176
297
169
189
104
171
6
0
1
47
10,204
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/operations/_api_portal_custom_domains_operations.py
azext_spring.vendored_sdks.appplatform.v2023_12_01.operations._api_portal_custom_domains_operations.ApiPortalCustomDomainsOperations
class ApiPortalCustomDomainsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`api_portal_custom_domains` attribute. """ models = _models def __init__(self, *args, **kwargs): input_args = list(args) self._client = input_args.pop(0) if input_args else kwargs.pop("client") self._config = input_args.pop(0) if input_args else kwargs.pop("config") self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace def get( self, resource_group_name: str, service_name: str, api_portal_name: str, domain_name: str, **kwargs: Any ) -> _models.ApiPortalCustomDomainResource: """Get the API portal custom domain. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param api_portal_name: The name of API portal. Required. :type api_portal_name: str :param domain_name: The name of the API portal custom domain. Required. :type domain_name: str :return: ApiPortalCustomDomainResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.ApiPortalCustomDomainResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.ApiPortalCustomDomainResource] = kwargs.pop("cls", None) _request = build_get_request( resource_group_name=resource_group_name, service_name=service_name, api_portal_name=api_portal_name, domain_name=domain_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("ApiPortalCustomDomainResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore def _create_or_update_initial( self, resource_group_name: str, service_name: str, api_portal_name: str, domain_name: str, api_portal_custom_domain_resource: Union[_models.ApiPortalCustomDomainResource, IO[bytes]], **kwargs: Any ) -> _models.ApiPortalCustomDomainResource: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApiPortalCustomDomainResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(api_portal_custom_domain_resource, (IOBase, bytes)): _content = api_portal_custom_domain_resource else: _json = self._serialize.body(api_portal_custom_domain_resource, "ApiPortalCustomDomainResource") _request = build_create_or_update_request( resource_group_name=resource_group_name, service_name=service_name, api_portal_name=api_portal_name, domain_name=domain_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("ApiPortalCustomDomainResource", pipeline_response) if response.status_code == 201: deserialized = self._deserialize("ApiPortalCustomDomainResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, api_portal_name: str, domain_name: str, api_portal_custom_domain_resource: _models.ApiPortalCustomDomainResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ApiPortalCustomDomainResource]: """Create or update the API portal custom domain. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param api_portal_name: The name of API portal. Required. :type api_portal_name: str :param domain_name: The name of the API portal custom domain. Required. :type domain_name: str :param api_portal_custom_domain_resource: The API portal custom domain for the create or update operation. Required. :type api_portal_custom_domain_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ApiPortalCustomDomainResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ApiPortalCustomDomainResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApiPortalCustomDomainResource] :raises ~azure.core.exceptions.HttpResponseError: """ @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, api_portal_name: str, domain_name: str, api_portal_custom_domain_resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ApiPortalCustomDomainResource]: """Create or update the API portal custom domain. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param api_portal_name: The name of API portal. Required. :type api_portal_name: str :param domain_name: The name of the API portal custom domain. Required. :type domain_name: str :param api_portal_custom_domain_resource: The API portal custom domain for the create or update operation. Required. :type api_portal_custom_domain_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ApiPortalCustomDomainResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApiPortalCustomDomainResource] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def begin_create_or_update( self, resource_group_name: str, service_name: str, api_portal_name: str, domain_name: str, api_portal_custom_domain_resource: Union[_models.ApiPortalCustomDomainResource, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.ApiPortalCustomDomainResource]: """Create or update the API portal custom domain. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param api_portal_name: The name of API portal. Required. :type api_portal_name: str :param domain_name: The name of the API portal custom domain. Required. :type domain_name: str :param api_portal_custom_domain_resource: The API portal custom domain for the create or update operation. Is either a ApiPortalCustomDomainResource type or a IO[bytes] type. Required. :type api_portal_custom_domain_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ApiPortalCustomDomainResource or IO[bytes] :return: An instance of LROPoller that returns either ApiPortalCustomDomainResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApiPortalCustomDomainResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApiPortalCustomDomainResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, service_name=service_name, api_portal_name=api_portal_name, domain_name=domain_name, api_portal_custom_domain_resource=api_portal_custom_domain_resource, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("ApiPortalCustomDomainResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[_models.ApiPortalCustomDomainResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[_models.ApiPortalCustomDomainResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, api_portal_name: str, domain_name: str, **kwargs: Any ) -> None: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, service_name=service_name, api_portal_name=api_portal_name, domain_name=domain_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) # type: ignore @distributed_trace def begin_delete( self, resource_group_name: str, service_name: str, api_portal_name: str, domain_name: str, **kwargs: Any ) -> LROPoller[None]: """Delete the API portal custom domain. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param api_portal_name: The name of API portal. Required. :type api_portal_name: str :param domain_name: The name of the API portal custom domain. Required. :type domain_name: str :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._delete_initial( # type: ignore resource_group_name=resource_group_name, service_name=service_name, api_portal_name=api_portal_name, domain_name=domain_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace def list( self, resource_group_name: str, service_name: str, api_portal_name: str, **kwargs: Any ) -> Iterable["_models.ApiPortalCustomDomainResource"]: """Handle requests to list all API portal custom domains. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param api_portal_name: The name of API portal. Required. :type api_portal_name: str :return: An iterator like instance of either ApiPortalCustomDomainResource or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.ApiPortalCustomDomainResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.ApiPortalCustomDomainResourceCollection] = kwargs.pop("cls", None) error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) def prepare_request(next_link=None): if not next_link: _request = build_list_request( resource_group_name=resource_group_name, service_name=service_name, api_portal_name=api_portal_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version _parsed_next_link = urllib.parse.urlparse(next_link) _next_request_params = case_insensitive_dict( { key: [urllib.parse.quote(v) for v in value] for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() } ) _next_request_params["api-version"] = self._api_version _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request def extract_data(pipeline_response): deserialized = self._deserialize("ApiPortalCustomDomainResourceCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data)
class ApiPortalCustomDomainsOperations: ''' .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`api_portal_custom_domains` attribute. ''' def __init__(self, *args, **kwargs): pass @distributed_trace def get( self, resource_group_name: str, service_name: str, api_portal_name: str, domain_name: str, **kwargs: Any ) -> _models.ApiPortalCustomDomainResource: '''Get the API portal custom domain. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param api_portal_name: The name of API portal. Required. :type api_portal_name: str :param domain_name: The name of the API portal custom domain. Required. :type domain_name: str :return: ApiPortalCustomDomainResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.ApiPortalCustomDomainResource :raises ~azure.core.exceptions.HttpResponseError: ''' pass def _create_or_update_initial( self, resource_group_name: str, service_name: str, api_portal_name: str, domain_name: str, api_portal_custom_domain_resource: Union[_models.ApiPortalCustomDomainResource, IO[bytes]], **kwargs: Any ) -> _models.ApiPortalCustomDomainResource: pass @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, api_portal_name: str, domain_name: str, api_portal_custom_domain_resource: _models.ApiPortalCustomDomainResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ApiPortalCustomDomainResource]: '''Create or update the API portal custom domain. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param api_portal_name: The name of API portal. Required. :type api_portal_name: str :param domain_name: The name of the API portal custom domain. Required. :type domain_name: str :param api_portal_custom_domain_resource: The API portal custom domain for the create or update operation. Required. :type api_portal_custom_domain_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ApiPortalCustomDomainResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ApiPortalCustomDomainResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApiPortalCustomDomainResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, api_portal_name: str, domain_name: str, api_portal_custom_domain_resource: _models.ApiPortalCustomDomainResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ApiPortalCustomDomainResource]: '''Create or update the API portal custom domain. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param api_portal_name: The name of API portal. Required. :type api_portal_name: str :param domain_name: The name of the API portal custom domain. Required. :type domain_name: str :param api_portal_custom_domain_resource: The API portal custom domain for the create or update operation. Required. :type api_portal_custom_domain_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ApiPortalCustomDomainResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApiPortalCustomDomainResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def begin_create_or_update( self, resource_group_name: str, service_name: str, api_portal_name: str, domain_name: str, api_portal_custom_domain_resource: _models.ApiPortalCustomDomainResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ApiPortalCustomDomainResource]: '''Create or update the API portal custom domain. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param api_portal_name: The name of API portal. Required. :type api_portal_name: str :param domain_name: The name of the API portal custom domain. Required. :type domain_name: str :param api_portal_custom_domain_resource: The API portal custom domain for the create or update operation. Is either a ApiPortalCustomDomainResource type or a IO[bytes] type. Required. :type api_portal_custom_domain_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ApiPortalCustomDomainResource or IO[bytes] :return: An instance of LROPoller that returns either ApiPortalCustomDomainResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ApiPortalCustomDomainResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, api_portal_name: str, domain_name: str, **kwargs: Any ) -> None: pass @distributed_trace def begin_delete( self, resource_group_name: str, service_name: str, api_portal_name: str, domain_name: str, **kwargs: Any ) -> LROPoller[None]: '''Delete the API portal custom domain. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param api_portal_name: The name of API portal. Required. :type api_portal_name: str :param domain_name: The name of the API portal custom domain. Required. :type domain_name: str :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass @distributed_trace def list( self, resource_group_name: str, service_name: str, api_portal_name: str, **kwargs: Any ) -> Iterable["_models.ApiPortalCustomDomainResource"]: '''Handle requests to list all API portal custom domains. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param api_portal_name: The name of API portal. Required. :type api_portal_name: str :return: An iterator like instance of either ApiPortalCustomDomainResource or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.ApiPortalCustomDomainResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def prepare_request(next_link=None): pass def extract_data(pipeline_response): pass def get_next(next_link=None): pass
21
7
38
4
26
9
3
0.41
0
7
0
0
9
5
9
9
499
61
323
138
258
132
160
88
145
6
0
1
41
10,205
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.UserSourceInfo
class UserSourceInfo(_serialization.Model): """Source information for a deployment. You probably want to use the sub-classes and not this class directly. Known sub-classes are: BuildResultUserSourceInfo, CustomContainerUserSourceInfo, UploadedUserSourceInfo All required parameters must be populated in order to send to server. :ivar type: Type of the source uploaded. Required. :vartype type: str :ivar version: Version of the source. :vartype version: str """ _validation = { "type": {"required": True}, } _attribute_map = { "type": {"key": "type", "type": "str"}, "version": {"key": "version", "type": "str"}, } _subtype_map = { "type": { "BuildResult": "BuildResultUserSourceInfo", "Container": "CustomContainerUserSourceInfo", "UploadedUserSourceInfo": "UploadedUserSourceInfo", } } def __init__(self, *, version: Optional[str] = None, **kwargs: Any) -> None: """ :keyword version: Version of the source. :paramtype version: str """ super().__init__(**kwargs) self.type: Optional[str] = None self.version = version
class UserSourceInfo(_serialization.Model): '''Source information for a deployment. You probably want to use the sub-classes and not this class directly. Known sub-classes are: BuildResultUserSourceInfo, CustomContainerUserSourceInfo, UploadedUserSourceInfo All required parameters must be populated in order to send to server. :ivar type: Type of the source uploaded. Required. :vartype type: str :ivar version: Version of the source. :vartype version: str ''' def __init__(self, *, version: Optional[str] = None, **kwargs: Any) -> None: ''' :keyword version: Version of the source. :paramtype version: str ''' pass
2
2
8
0
4
4
1
0.68
1
3
0
3
1
2
1
16
39
7
19
7
17
13
8
7
6
1
2
0
1
10,206
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.TriggeredBuildResult
class TriggeredBuildResult(_serialization.Model): """The build result triggered by a build. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: The unique build id of this build result. :vartype id: str :ivar provisioning_state: The provisioning state of this build result. Known values are: "Queuing", "Building", "Succeeded", "Failed", "Deleting", and "Canceled". :vartype provisioning_state: str or ~azure.mgmt.appplatform.v2023_12_01.models.TriggeredBuildResultProvisioningState :ivar image: The container image of this build result. :vartype image: str :ivar last_transition_time: The last transition time of this build result. :vartype last_transition_time: ~datetime.datetime :ivar last_transition_reason: The last transition reason of this build result. :vartype last_transition_reason: str :ivar last_transition_status: The last transition status of this build result. :vartype last_transition_status: str """ _validation = { "provisioning_state": {"readonly": True}, } _attribute_map = { "id": {"key": "id", "type": "str"}, "provisioning_state": {"key": "provisioningState", "type": "str"}, "image": {"key": "image", "type": "str"}, "last_transition_time": {"key": "lastTransitionTime", "type": "iso-8601"}, "last_transition_reason": {"key": "lastTransitionReason", "type": "str"}, "last_transition_status": {"key": "lastTransitionStatus", "type": "str"}, } def __init__( self, *, id: Optional[str] = None, # pylint: disable=redefined-builtin image: Optional[str] = None, last_transition_time: Optional[datetime.datetime] = None, last_transition_reason: Optional[str] = None, last_transition_status: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword id: The unique build id of this build result. :paramtype id: str :keyword image: The container image of this build result. :paramtype image: str :keyword last_transition_time: The last transition time of this build result. :paramtype last_transition_time: ~datetime.datetime :keyword last_transition_reason: The last transition reason of this build result. :paramtype last_transition_reason: str :keyword last_transition_status: The last transition status of this build result. :paramtype last_transition_status: str """ super().__init__(**kwargs) self.id = id self.provisioning_state = None self.image = image self.last_transition_time = last_transition_time self.last_transition_reason = last_transition_reason self.last_transition_status = last_transition_status
class TriggeredBuildResult(_serialization.Model): '''The build result triggered by a build. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: The unique build id of this build result. :vartype id: str :ivar provisioning_state: The provisioning state of this build result. Known values are: "Queuing", "Building", "Succeeded", "Failed", "Deleting", and "Canceled". :vartype provisioning_state: str or ~azure.mgmt.appplatform.v2023_12_01.models.TriggeredBuildResultProvisioningState :ivar image: The container image of this build result. :vartype image: str :ivar last_transition_time: The last transition time of this build result. :vartype last_transition_time: ~datetime.datetime :ivar last_transition_reason: The last transition reason of this build result. :vartype last_transition_reason: str :ivar last_transition_status: The last transition status of this build result. :vartype last_transition_status: str ''' def __init__( self, *, id: Optional[str] = None, # pylint: disable=redefined-builtin image: Optional[str] = None, last_transition_time: Optional[datetime.datetime] = None, last_transition_reason: Optional[str] = None, last_transition_status: Optional[str] = None, **kwargs: Any ) -> None: ''' :keyword id: The unique build id of this build result. :paramtype id: str :keyword image: The container image of this build result. :paramtype image: str :keyword last_transition_time: The last transition time of this build result. :paramtype last_transition_time: ~datetime.datetime :keyword last_transition_reason: The last transition reason of this build result. :paramtype last_transition_reason: str :keyword last_transition_status: The last transition status of this build result. :paramtype last_transition_status: str ''' pass
2
2
29
0
17
13
1
1.03
1
4
0
0
1
6
1
16
63
5
29
19
18
30
11
10
9
1
2
0
1
10,207
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.TrackedResource
class TrackedResource(Resource): """The resource model definition for a ARM tracked top level resource. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource Id for the resource. :vartype id: str :ivar name: The name of the resource. :vartype name: str :ivar type: The type of the resource. :vartype type: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. :vartype system_data: ~azure.mgmt.appplatform.v2023_12_01.models.SystemData :ivar location: The GEO location of the resource. :vartype location: str :ivar tags: Tags of the service which is a list of key value pairs that describe the resource. :vartype tags: dict[str, str] """ _validation = { "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, "system_data": {"readonly": True}, } _attribute_map = { "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, "system_data": {"key": "systemData", "type": "SystemData"}, "location": {"key": "location", "type": "str"}, "tags": {"key": "tags", "type": "{str}"}, } def __init__(self, *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: The GEO location of the resource. :paramtype location: str :keyword tags: Tags of the service which is a list of key value pairs that describe the resource. :paramtype tags: dict[str, str] """ super().__init__(**kwargs) self.location = location self.tags = tags
class TrackedResource(Resource): '''The resource model definition for a ARM tracked top level resource. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource Id for the resource. :vartype id: str :ivar name: The name of the resource. :vartype name: str :ivar type: The type of the resource. :vartype type: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. :vartype system_data: ~azure.mgmt.appplatform.v2023_12_01.models.SystemData :ivar location: The GEO location of the resource. :vartype location: str :ivar tags: Tags of the service which is a list of key value pairs that describe the resource. :vartype tags: dict[str, str] ''' def __init__(self, *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: ''' :keyword location: The GEO location of the resource. :paramtype location: str :keyword tags: Tags of the service which is a list of key value pairs that describe the resource. :paramtype tags: dict[str, str] ''' pass
2
2
11
0
4
7
1
1.16
1
3
0
1
1
2
1
17
46
5
19
6
17
22
7
6
5
1
3
0
1
10,208
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.TCPSocketAction
class TCPSocketAction(ProbeAction): """TCPSocketAction describes an action based on opening a socket. All required parameters must be populated in order to send to server. :ivar type: The type of the action to take to perform the health check. Required. Known values are: "HTTPGetAction", "TCPSocketAction", and "ExecAction". :vartype type: str or ~azure.mgmt.appplatform.v2023_12_01.models.ProbeActionType """ _validation = { "type": {"required": True}, } _attribute_map = { "type": {"key": "type", "type": "str"}, } def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.type: str = "TCPSocketAction"
class TCPSocketAction(ProbeAction): '''TCPSocketAction describes an action based on opening a socket. All required parameters must be populated in order to send to server. :ivar type: The type of the action to take to perform the health check. Required. Known values are: "HTTPGetAction", "TCPSocketAction", and "ExecAction". :vartype type: str or ~azure.mgmt.appplatform.v2023_12_01.models.ProbeActionType ''' def __init__(self, **kwargs: Any) -> None: ''' ''' pass
2
2
4
0
3
1
1
0.7
1
3
0
0
1
1
1
17
22
5
10
5
8
7
6
5
4
1
3
0
1
10,209
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.SystemData
class SystemData(_serialization.Model): """Metadata pertaining to creation and last modification of the resource. :ivar created_by: The identity that created the resource. :vartype created_by: str :ivar created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". :vartype created_by_type: str or ~azure.mgmt.appplatform.v2023_12_01.models.CreatedByType :ivar created_at: The timestamp of resource creation (UTC). :vartype created_at: ~datetime.datetime :ivar last_modified_by: The identity that last modified the resource. :vartype last_modified_by: str :ivar last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". :vartype last_modified_by_type: str or ~azure.mgmt.appplatform.v2023_12_01.models.LastModifiedByType :ivar last_modified_at: The timestamp of resource modification (UTC). :vartype last_modified_at: ~datetime.datetime """ _attribute_map = { "created_by": {"key": "createdBy", "type": "str"}, "created_by_type": {"key": "createdByType", "type": "str"}, "created_at": {"key": "createdAt", "type": "iso-8601"}, "last_modified_by": {"key": "lastModifiedBy", "type": "str"}, "last_modified_by_type": {"key": "lastModifiedByType", "type": "str"}, "last_modified_at": {"key": "lastModifiedAt", "type": "iso-8601"}, } def __init__( self, *, created_by: Optional[str] = None, created_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, created_at: Optional[datetime.datetime] = None, last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.LastModifiedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, **kwargs: Any ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str :keyword created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". :paramtype created_by_type: str or ~azure.mgmt.appplatform.v2023_12_01.models.CreatedByType :keyword created_at: The timestamp of resource creation (UTC). :paramtype created_at: ~datetime.datetime :keyword last_modified_by: The identity that last modified the resource. :paramtype last_modified_by: str :keyword last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". :paramtype last_modified_by_type: str or ~azure.mgmt.appplatform.v2023_12_01.models.LastModifiedByType :keyword last_modified_at: The timestamp of resource modification (UTC). :paramtype last_modified_at: ~datetime.datetime """ super().__init__(**kwargs) self.created_by = created_by self.created_by_type = created_by_type self.created_at = created_at self.last_modified_by = last_modified_by self.last_modified_by_type = last_modified_by_type self.last_modified_at = last_modified_at
class SystemData(_serialization.Model): '''Metadata pertaining to creation and last modification of the resource. :ivar created_by: The identity that created the resource. :vartype created_by: str :ivar created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". :vartype created_by_type: str or ~azure.mgmt.appplatform.v2023_12_01.models.CreatedByType :ivar created_at: The timestamp of resource creation (UTC). :vartype created_at: ~datetime.datetime :ivar last_modified_by: The identity that last modified the resource. :vartype last_modified_by: str :ivar last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". :vartype last_modified_by_type: str or ~azure.mgmt.appplatform.v2023_12_01.models.LastModifiedByType :ivar last_modified_at: The timestamp of resource modification (UTC). :vartype last_modified_at: ~datetime.datetime ''' def __init__( self, *, created_by: Optional[str] = None, created_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, created_at: Optional[datetime.datetime] = None, last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.LastModifiedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, **kwargs: Any ) -> None: ''' :keyword created_by: The identity that created the resource. :paramtype created_by: str :keyword created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". :paramtype created_by_type: str or ~azure.mgmt.appplatform.v2023_12_01.models.CreatedByType :keyword created_at: The timestamp of resource creation (UTC). :paramtype created_at: ~datetime.datetime :keyword last_modified_by: The identity that last modified the resource. :paramtype last_modified_by: str :keyword last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". :paramtype last_modified_by_type: str or ~azure.mgmt.appplatform.v2023_12_01.models.LastModifiedByType :keyword last_modified_at: The timestamp of resource modification (UTC). :paramtype last_modified_at: ~datetime.datetime ''' pass
2
2
35
0
18
17
1
1.26
1
4
0
0
1
6
1
16
64
3
27
19
15
34
10
9
8
1
2
0
1
10,210
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.SupportedStacksCollection
class SupportedStacksCollection(_serialization.Model): """Object that includes an array of supported stacks resources and a possible link for next set. :ivar value: Collection of supported stacks resources. :vartype value: list[~azure.mgmt.appplatform.v2023_12_01.models.SupportedStackResource] :ivar next_link: URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. :vartype next_link: str """ _attribute_map = { "value": {"key": "value", "type": "[SupportedStackResource]"}, "next_link": {"key": "nextLink", "type": "str"}, } def __init__( self, *, value: Optional[List["_models.SupportedStackResource"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword value: Collection of supported stacks resources. :paramtype value: list[~azure.mgmt.appplatform.v2023_12_01.models.SupportedStackResource] :keyword next_link: URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. :paramtype next_link: str """ super().__init__(**kwargs) self.value = value self.next_link = next_link
class SupportedStacksCollection(_serialization.Model): '''Object that includes an array of supported stacks resources and a possible link for next set. :ivar value: Collection of supported stacks resources. :vartype value: list[~azure.mgmt.appplatform.v2023_12_01.models.SupportedStackResource] :ivar next_link: URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. :vartype next_link: str ''' def __init__( self, *, value: Optional[List["_models.SupportedStackResource"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: ''' :keyword value: Collection of supported stacks resources. :paramtype value: list[~azure.mgmt.appplatform.v2023_12_01.models.SupportedStackResource] :keyword next_link: URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. :paramtype next_link: str ''' pass
2
2
17
0
10
7
1
0.93
1
3
0
0
1
2
1
16
32
3
15
11
7
14
6
5
4
1
2
0
1
10,211
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.SupportedStackResource
class SupportedStackResource(ProxyResource): """Supported stack resource payload. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource Id for the resource. :vartype id: str :ivar name: The name of the resource. :vartype name: str :ivar type: The type of the resource. :vartype type: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. :vartype system_data: ~azure.mgmt.appplatform.v2023_12_01.models.SystemData :ivar properties: Supported stack resource properties. :vartype properties: ~azure.mgmt.appplatform.v2023_12_01.models.SupportedStackResourceProperties """ _validation = { "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, "system_data": {"readonly": True}, } _attribute_map = { "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, "system_data": {"key": "systemData", "type": "SystemData"}, "properties": {"key": "properties", "type": "SupportedStackResourceProperties"}, } def __init__( self, *, properties: Optional["_models.SupportedStackResourceProperties"] = None, **kwargs: Any ) -> None: """ :keyword properties: Supported stack resource properties. :paramtype properties: ~azure.mgmt.appplatform.v2023_12_01.models.SupportedStackResourceProperties """ super().__init__(**kwargs) self.properties = properties
class SupportedStackResource(ProxyResource): '''Supported stack resource payload. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource Id for the resource. :vartype id: str :ivar name: The name of the resource. :vartype name: str :ivar type: The type of the resource. :vartype type: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. :vartype system_data: ~azure.mgmt.appplatform.v2023_12_01.models.SystemData :ivar properties: Supported stack resource properties. :vartype properties: ~azure.mgmt.appplatform.v2023_12_01.models.SupportedStackResourceProperties ''' def __init__( self, *, properties: Optional["_models.SupportedStackResourceProperties"] = None, **kwargs: Any ) -> None: ''' :keyword properties: Supported stack resource properties. :paramtype properties: ~azure.mgmt.appplatform.v2023_12_01.models.SupportedStackResourceProperties ''' pass
2
2
10
0
5
5
1
1
1
2
0
0
1
1
1
17
43
5
19
7
15
19
6
5
4
1
4
0
1
10,212
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.SupportedServerVersions
class SupportedServerVersions(_serialization.Model): """Supported server versions. :ivar value: Collection of the supported server versions. :vartype value: list[~azure.mgmt.appplatform.v2023_12_01.models.SupportedServerVersion] :ivar next_link: URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. :vartype next_link: str """ _attribute_map = { "value": {"key": "value", "type": "[SupportedServerVersion]"}, "next_link": {"key": "nextLink", "type": "str"}, } def __init__( self, *, value: Optional[List["_models.SupportedServerVersion"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword value: Collection of the supported server versions. :paramtype value: list[~azure.mgmt.appplatform.v2023_12_01.models.SupportedServerVersion] :keyword next_link: URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. :paramtype next_link: str """ super().__init__(**kwargs) self.value = value self.next_link = next_link
class SupportedServerVersions(_serialization.Model): '''Supported server versions. :ivar value: Collection of the supported server versions. :vartype value: list[~azure.mgmt.appplatform.v2023_12_01.models.SupportedServerVersion] :ivar next_link: URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. :vartype next_link: str ''' def __init__( self, *, value: Optional[List["_models.SupportedServerVersion"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: ''' :keyword value: Collection of the supported server versions. :paramtype value: list[~azure.mgmt.appplatform.v2023_12_01.models.SupportedServerVersion] :keyword next_link: URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. :paramtype next_link: str ''' pass
2
2
17
0
10
7
1
0.93
1
3
0
0
1
2
1
16
32
3
15
11
7
14
6
5
4
1
2
0
1
10,213
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.SupportedRuntimeVersion
class SupportedRuntimeVersion(_serialization.Model): """Supported deployment runtime version descriptor. :ivar value: The raw value which could be passed to deployment CRUD operations. Known values are: "Java_8", "Java_11", "Java_17", and "NetCore_31". :vartype value: str or ~azure.mgmt.appplatform.v2023_12_01.models.SupportedRuntimeValue :ivar platform: The platform of this runtime version (possible values: "Java" or ".NET"). Known values are: "Java" and ".NET Core". :vartype platform: str or ~azure.mgmt.appplatform.v2023_12_01.models.SupportedRuntimePlatform :ivar version: The detailed version (major.minor) of the platform. :vartype version: str """ _attribute_map = { "value": {"key": "value", "type": "str"}, "platform": {"key": "platform", "type": "str"}, "version": {"key": "version", "type": "str"}, } def __init__( self, *, value: Optional[Union[str, "_models.SupportedRuntimeValue"]] = None, platform: Optional[Union[str, "_models.SupportedRuntimePlatform"]] = None, version: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword value: The raw value which could be passed to deployment CRUD operations. Known values are: "Java_8", "Java_11", "Java_17", and "NetCore_31". :paramtype value: str or ~azure.mgmt.appplatform.v2023_12_01.models.SupportedRuntimeValue :keyword platform: The platform of this runtime version (possible values: "Java" or ".NET"). Known values are: "Java" and ".NET Core". :paramtype platform: str or ~azure.mgmt.appplatform.v2023_12_01.models.SupportedRuntimePlatform :keyword version: The detailed version (major.minor) of the platform. :paramtype version: str """ super().__init__(**kwargs) self.value = value self.platform = platform self.version = version
class SupportedRuntimeVersion(_serialization.Model): '''Supported deployment runtime version descriptor. :ivar value: The raw value which could be passed to deployment CRUD operations. Known values are: "Java_8", "Java_11", "Java_17", and "NetCore_31". :vartype value: str or ~azure.mgmt.appplatform.v2023_12_01.models.SupportedRuntimeValue :ivar platform: The platform of this runtime version (possible values: "Java" or ".NET"). Known values are: "Java" and ".NET Core". :vartype platform: str or ~azure.mgmt.appplatform.v2023_12_01.models.SupportedRuntimePlatform :ivar version: The detailed version (major.minor) of the platform. :vartype version: str ''' def __init__( self, *, value: Optional[Union[str, "_models.SupportedRuntimeValue"]] = None, platform: Optional[Union[str, "_models.SupportedRuntimePlatform"]] = None, version: Optional[str] = None, **kwargs: Any ) -> None: ''' :keyword value: The raw value which could be passed to deployment CRUD operations. Known values are: "Java_8", "Java_11", "Java_17", and "NetCore_31". :paramtype value: str or ~azure.mgmt.appplatform.v2023_12_01.models.SupportedRuntimeValue :keyword platform: The platform of this runtime version (possible values: "Java" or ".NET"). Known values are: "Java" and ".NET Core". :paramtype platform: str or ~azure.mgmt.appplatform.v2023_12_01.models.SupportedRuntimePlatform :keyword version: The detailed version (major.minor) of the platform. :paramtype version: str ''' pass
2
2
22
0
12
10
1
1.11
1
3
0
0
1
3
1
16
41
3
18
13
9
20
7
6
5
1
2
0
1
10,214
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.SupportedBuildpacksCollection
class SupportedBuildpacksCollection(_serialization.Model): """Object that includes an array of supported buildpacks resources and a possible link for next set. :ivar value: Collection of supported buildpacks resources. :vartype value: list[~azure.mgmt.appplatform.v2023_12_01.models.SupportedBuildpackResource] :ivar next_link: URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. :vartype next_link: str """ _attribute_map = { "value": {"key": "value", "type": "[SupportedBuildpackResource]"}, "next_link": {"key": "nextLink", "type": "str"}, } def __init__( self, *, value: Optional[List["_models.SupportedBuildpackResource"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword value: Collection of supported buildpacks resources. :paramtype value: list[~azure.mgmt.appplatform.v2023_12_01.models.SupportedBuildpackResource] :keyword next_link: URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. :paramtype next_link: str """ super().__init__(**kwargs) self.value = value self.next_link = next_link
class SupportedBuildpacksCollection(_serialization.Model): '''Object that includes an array of supported buildpacks resources and a possible link for next set. :ivar value: Collection of supported buildpacks resources. :vartype value: list[~azure.mgmt.appplatform.v2023_12_01.models.SupportedBuildpackResource] :ivar next_link: URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. :vartype next_link: str ''' def __init__( self, *, value: Optional[List["_models.SupportedBuildpackResource"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: ''' :keyword value: Collection of supported buildpacks resources. :paramtype value: list[~azure.mgmt.appplatform.v2023_12_01.models.SupportedBuildpackResource] :keyword next_link: URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. :paramtype next_link: str ''' pass
2
2
17
0
10
7
1
1
1
3
0
0
1
2
1
16
33
3
15
11
7
15
6
5
4
1
2
0
1
10,215
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.SupportedBuildpackResourceProperties
class SupportedBuildpackResourceProperties(_serialization.Model): """Supported buildpack resource properties. :ivar buildpack_id: The id of supported buildpack. :vartype buildpack_id: str """ _attribute_map = { "buildpack_id": {"key": "buildpackId", "type": "str"}, } def __init__(self, *, buildpack_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword buildpack_id: The id of supported buildpack. :paramtype buildpack_id: str """ super().__init__(**kwargs) self.buildpack_id = buildpack_id
class SupportedBuildpackResourceProperties(_serialization.Model): '''Supported buildpack resource properties. :ivar buildpack_id: The id of supported buildpack. :vartype buildpack_id: str ''' def __init__(self, *, buildpack_id: Optional[str] = None, **kwargs: Any) -> None: ''' :keyword buildpack_id: The id of supported buildpack. :paramtype buildpack_id: str ''' pass
2
2
7
0
3
4
1
1.14
1
3
0
0
1
1
1
16
18
3
7
4
5
8
5
4
3
1
2
0
1
10,216
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.SupportedBuildpackResource
class SupportedBuildpackResource(ProxyResource): """Supported buildpack resource payload. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource Id for the resource. :vartype id: str :ivar name: The name of the resource. :vartype name: str :ivar type: The type of the resource. :vartype type: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. :vartype system_data: ~azure.mgmt.appplatform.v2023_12_01.models.SystemData :ivar properties: Supported buildpack resource properties. :vartype properties: ~azure.mgmt.appplatform.v2023_12_01.models.SupportedBuildpackResourceProperties """ _validation = { "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, "system_data": {"readonly": True}, } _attribute_map = { "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, "system_data": {"key": "systemData", "type": "SystemData"}, "properties": {"key": "properties", "type": "SupportedBuildpackResourceProperties"}, } def __init__( self, *, properties: Optional["_models.SupportedBuildpackResourceProperties"] = None, **kwargs: Any ) -> None: """ :keyword properties: Supported buildpack resource properties. :paramtype properties: ~azure.mgmt.appplatform.v2023_12_01.models.SupportedBuildpackResourceProperties """ super().__init__(**kwargs) self.properties = properties
class SupportedBuildpackResource(ProxyResource): '''Supported buildpack resource payload. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource Id for the resource. :vartype id: str :ivar name: The name of the resource. :vartype name: str :ivar type: The type of the resource. :vartype type: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. :vartype system_data: ~azure.mgmt.appplatform.v2023_12_01.models.SystemData :ivar properties: Supported buildpack resource properties. :vartype properties: ~azure.mgmt.appplatform.v2023_12_01.models.SupportedBuildpackResourceProperties ''' def __init__( self, *, properties: Optional["_models.SupportedBuildpackResourceProperties"] = None, **kwargs: Any ) -> None: ''' :keyword properties: Supported buildpack resource properties. :paramtype properties: ~azure.mgmt.appplatform.v2023_12_01.models.SupportedBuildpackResourceProperties ''' pass
2
2
10
0
5
5
1
1
1
2
0
0
1
1
1
17
43
5
19
7
15
19
6
5
4
1
4
0
1
10,217
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/operations/_apps_operations.py
azext_spring.vendored_sdks.appplatform.v2023_12_01.operations._apps_operations.AppsOperations
class AppsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`apps` attribute. """ models = _models def __init__(self, *args, **kwargs): input_args = list(args) self._client = input_args.pop(0) if input_args else kwargs.pop("client") self._config = input_args.pop(0) if input_args else kwargs.pop("config") self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace def get( self, resource_group_name: str, service_name: str, app_name: str, sync_status: Optional[str] = None, **kwargs: Any ) -> _models.AppResource: """Get an App and its properties. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param sync_status: Indicates whether sync status. Default value is None. :type sync_status: str :return: AppResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.AppResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.AppResource] = kwargs.pop("cls", None) _request = build_get_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, subscription_id=self._config.subscription_id, sync_status=sync_status, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("AppResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore def _create_or_update_initial( self, resource_group_name: str, service_name: str, app_name: str, app_resource: Union[_models.AppResource, IO[bytes]], **kwargs: Any ) -> _models.AppResource: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AppResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(app_resource, (IOBase, bytes)): _content = app_resource else: _json = self._serialize.body(app_resource, "AppResource") _request = build_create_or_update_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("AppResource", pipeline_response) if response.status_code == 201: deserialized = self._deserialize("AppResource", pipeline_response) if response.status_code == 202: deserialized = self._deserialize("AppResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, app_name: str, app_resource: _models.AppResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.AppResource]: """Create a new App or update an exiting App. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param app_resource: Parameters for the create or update operation. Required. :type app_resource: ~azure.mgmt.appplatform.v2023_12_01.models.AppResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either AppResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.AppResource] :raises ~azure.core.exceptions.HttpResponseError: """ @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, app_name: str, app_resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.AppResource]: """Create a new App or update an exiting App. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param app_resource: Parameters for the create or update operation. Required. :type app_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either AppResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.AppResource] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def begin_create_or_update( self, resource_group_name: str, service_name: str, app_name: str, app_resource: Union[_models.AppResource, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.AppResource]: """Create a new App or update an exiting App. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param app_resource: Parameters for the create or update operation. Is either a AppResource type or a IO[bytes] type. Required. :type app_resource: ~azure.mgmt.appplatform.v2023_12_01.models.AppResource or IO[bytes] :return: An instance of LROPoller that returns either AppResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.AppResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AppResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, app_resource=app_resource, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("AppResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[_models.AppResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[_models.AppResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, app_name: str, **kwargs: Any ) -> None: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) # type: ignore @distributed_trace def begin_delete( self, resource_group_name: str, service_name: str, app_name: str, **kwargs: Any ) -> LROPoller[None]: """Operation to delete an App. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._delete_initial( # type: ignore resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _update_initial( self, resource_group_name: str, service_name: str, app_name: str, app_resource: Union[_models.AppResource, IO[bytes]], **kwargs: Any ) -> _models.AppResource: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AppResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(app_resource, (IOBase, bytes)): _content = app_resource else: _json = self._serialize.body(app_resource, "AppResource") _request = build_update_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("AppResource", pipeline_response) if response.status_code == 202: deserialized = self._deserialize("AppResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload def begin_update( self, resource_group_name: str, service_name: str, app_name: str, app_resource: _models.AppResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.AppResource]: """Operation to update an exiting App. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param app_resource: Parameters for the update operation. Required. :type app_resource: ~azure.mgmt.appplatform.v2023_12_01.models.AppResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either AppResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.AppResource] :raises ~azure.core.exceptions.HttpResponseError: """ @overload def begin_update( self, resource_group_name: str, service_name: str, app_name: str, app_resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.AppResource]: """Operation to update an exiting App. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param app_resource: Parameters for the update operation. Required. :type app_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either AppResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.AppResource] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def begin_update( self, resource_group_name: str, service_name: str, app_name: str, app_resource: Union[_models.AppResource, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.AppResource]: """Operation to update an exiting App. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param app_resource: Parameters for the update operation. Is either a AppResource type or a IO[bytes] type. Required. :type app_resource: ~azure.mgmt.appplatform.v2023_12_01.models.AppResource or IO[bytes] :return: An instance of LROPoller that returns either AppResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.AppResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AppResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._update_initial( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, app_resource=app_resource, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("AppResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[_models.AppResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[_models.AppResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) @distributed_trace def list(self, resource_group_name: str, service_name: str, **kwargs: Any) -> Iterable["_models.AppResource"]: """Handles requests to list all resources in a Service. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: An iterator like instance of either AppResource or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.AppResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.AppResourceCollection] = kwargs.pop("cls", None) error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) def prepare_request(next_link=None): if not next_link: _request = build_list_request( resource_group_name=resource_group_name, service_name=service_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version _parsed_next_link = urllib.parse.urlparse(next_link) _next_request_params = case_insensitive_dict( { key: [urllib.parse.quote(v) for v in value] for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() } ) _next_request_params["api-version"] = self._api_version _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request def extract_data(pipeline_response): deserialized = self._deserialize("AppResourceCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) @distributed_trace def get_resource_upload_url( self, resource_group_name: str, service_name: str, app_name: str, **kwargs: Any ) -> _models.ResourceUploadDefinition: """Get an resource upload URL for an App, which may be artifacts or source archive. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :return: ResourceUploadDefinition or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.ResourceUploadDefinition :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.ResourceUploadDefinition] = kwargs.pop("cls", None) _request = build_get_resource_upload_url_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("ResourceUploadDefinition", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore def _set_active_deployments_initial( self, resource_group_name: str, service_name: str, app_name: str, active_deployment_collection: Union[_models.ActiveDeploymentCollection, IO[bytes]], **kwargs: Any ) -> _models.AppResource: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AppResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(active_deployment_collection, (IOBase, bytes)): _content = active_deployment_collection else: _json = self._serialize.body(active_deployment_collection, "ActiveDeploymentCollection") _request = build_set_active_deployments_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("AppResource", pipeline_response) if response.status_code == 202: deserialized = self._deserialize("AppResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload def begin_set_active_deployments( self, resource_group_name: str, service_name: str, app_name: str, active_deployment_collection: _models.ActiveDeploymentCollection, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.AppResource]: """Set existing Deployment under the app as active. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param active_deployment_collection: A list of Deployment name to be active. Required. :type active_deployment_collection: ~azure.mgmt.appplatform.v2023_12_01.models.ActiveDeploymentCollection :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either AppResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.AppResource] :raises ~azure.core.exceptions.HttpResponseError: """ @overload def begin_set_active_deployments( self, resource_group_name: str, service_name: str, app_name: str, active_deployment_collection: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.AppResource]: """Set existing Deployment under the app as active. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param active_deployment_collection: A list of Deployment name to be active. Required. :type active_deployment_collection: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either AppResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.AppResource] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def begin_set_active_deployments( self, resource_group_name: str, service_name: str, app_name: str, active_deployment_collection: Union[_models.ActiveDeploymentCollection, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.AppResource]: """Set existing Deployment under the app as active. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param active_deployment_collection: A list of Deployment name to be active. Is either a ActiveDeploymentCollection type or a IO[bytes] type. Required. :type active_deployment_collection: ~azure.mgmt.appplatform.v2023_12_01.models.ActiveDeploymentCollection or IO[bytes] :return: An instance of LROPoller that returns either AppResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.AppResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AppResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._set_active_deployments_initial( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, active_deployment_collection=active_deployment_collection, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("AppResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[_models.AppResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[_models.AppResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) @overload def validate_domain( self, resource_group_name: str, service_name: str, app_name: str, validate_payload: _models.CustomDomainValidatePayload, *, content_type: str = "application/json", **kwargs: Any ) -> _models.CustomDomainValidateResult: """Check the resource name is valid as well as not in use. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param validate_payload: Custom domain payload to be validated. Required. :type validate_payload: ~azure.mgmt.appplatform.v2023_12_01.models.CustomDomainValidatePayload :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: CustomDomainValidateResult or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.CustomDomainValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ @overload def validate_domain( self, resource_group_name: str, service_name: str, app_name: str, validate_payload: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.CustomDomainValidateResult: """Check the resource name is valid as well as not in use. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param validate_payload: Custom domain payload to be validated. Required. :type validate_payload: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: CustomDomainValidateResult or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.CustomDomainValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def validate_domain( self, resource_group_name: str, service_name: str, app_name: str, validate_payload: Union[_models.CustomDomainValidatePayload, IO[bytes]], **kwargs: Any ) -> _models.CustomDomainValidateResult: """Check the resource name is valid as well as not in use. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param validate_payload: Custom domain payload to be validated. Is either a CustomDomainValidatePayload type or a IO[bytes] type. Required. :type validate_payload: ~azure.mgmt.appplatform.v2023_12_01.models.CustomDomainValidatePayload or IO[bytes] :return: CustomDomainValidateResult or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.CustomDomainValidateResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CustomDomainValidateResult] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(validate_payload, (IOBase, bytes)): _content = validate_payload else: _json = self._serialize.body(validate_payload, "CustomDomainValidatePayload") _request = build_validate_domain_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("CustomDomainValidateResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized
class AppsOperations: ''' .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`apps` attribute. ''' def __init__(self, *args, **kwargs): pass @distributed_trace def get( self, resource_group_name: str, service_name: str, app_name: str, sync_status: Optional[str] = None, **kwargs: Any ) -> _models.AppResource: '''Get an App and its properties. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param sync_status: Indicates whether sync status. Default value is None. :type sync_status: str :return: AppResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.AppResource :raises ~azure.core.exceptions.HttpResponseError: ''' pass def _create_or_update_initial( self, resource_group_name: str, service_name: str, app_name: str, app_resource: Union[_models.AppResource, IO[bytes]], **kwargs: Any ) -> _models.AppResource: pass @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, app_name: str, app_resource: _models.AppResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.AppResource]: '''Create a new App or update an exiting App. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param app_resource: Parameters for the create or update operation. Required. :type app_resource: ~azure.mgmt.appplatform.v2023_12_01.models.AppResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either AppResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.AppResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, app_name: str, app_resource: _models.AppResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.AppResource]: '''Create a new App or update an exiting App. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param app_resource: Parameters for the create or update operation. Required. :type app_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either AppResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.AppResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def begin_create_or_update( self, resource_group_name: str, service_name: str, app_name: str, app_resource: _models.AppResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.AppResource]: '''Create a new App or update an exiting App. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param app_resource: Parameters for the create or update operation. Is either a AppResource type or a IO[bytes] type. Required. :type app_resource: ~azure.mgmt.appplatform.v2023_12_01.models.AppResource or IO[bytes] :return: An instance of LROPoller that returns either AppResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.AppResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, app_name: str, **kwargs: Any ) -> None: pass @distributed_trace def begin_delete( self, resource_group_name: str, service_name: str, app_name: str, **kwargs: Any ) -> LROPoller[None]: '''Operation to delete an App. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass def _update_initial( self, resource_group_name: str, service_name: str, app_name: str, app_resource: Union[_models.AppResource, IO[bytes]], **kwargs: Any ) -> _models.AppResource: pass @overload def begin_update( self, resource_group_name: str, service_name: str, app_name: str, app_resource: _models.AppResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.AppResource]: '''Operation to update an exiting App. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param app_resource: Parameters for the update operation. Required. :type app_resource: ~azure.mgmt.appplatform.v2023_12_01.models.AppResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either AppResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.AppResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload def begin_update( self, resource_group_name: str, service_name: str, app_name: str, app_resource: _models.AppResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.AppResource]: '''Operation to update an exiting App. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param app_resource: Parameters for the update operation. Required. :type app_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either AppResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.AppResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def begin_update( self, resource_group_name: str, service_name: str, app_name: str, app_resource: _models.AppResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.AppResource]: '''Operation to update an exiting App. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param app_resource: Parameters for the update operation. Is either a AppResource type or a IO[bytes] type. Required. :type app_resource: ~azure.mgmt.appplatform.v2023_12_01.models.AppResource or IO[bytes] :return: An instance of LROPoller that returns either AppResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.AppResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass @distributed_trace def list(self, resource_group_name: str, service_name: str, **kwargs: Any) -> Iterable["_models.AppResource"]: '''Handles requests to list all resources in a Service. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: An iterator like instance of either AppResource or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.AppResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def prepare_request(next_link=None): pass def extract_data(pipeline_response): pass def get_next(next_link=None): pass @distributed_trace def get_resource_upload_url( self, resource_group_name: str, service_name: str, app_name: str, **kwargs: Any ) -> _models.ResourceUploadDefinition: '''Get an resource upload URL for an App, which may be artifacts or source archive. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :return: ResourceUploadDefinition or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.ResourceUploadDefinition :raises ~azure.core.exceptions.HttpResponseError: ''' pass def _set_active_deployments_initial( self, resource_group_name: str, service_name: str, app_name: str, active_deployment_collection: Union[_models.ActiveDeploymentCollection, IO[bytes]], **kwargs: Any ) -> _models.AppResource: pass @overload def begin_set_active_deployments( self, resource_group_name: str, service_name: str, app_name: str, active_deployment_collection: _models.ActiveDeploymentCollection, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.AppResource]: '''Set existing Deployment under the app as active. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param active_deployment_collection: A list of Deployment name to be active. Required. :type active_deployment_collection: ~azure.mgmt.appplatform.v2023_12_01.models.ActiveDeploymentCollection :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either AppResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.AppResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload def begin_set_active_deployments( self, resource_group_name: str, service_name: str, app_name: str, active_deployment_collection: _models.ActiveDeploymentCollection, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.AppResource]: '''Set existing Deployment under the app as active. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param active_deployment_collection: A list of Deployment name to be active. Required. :type active_deployment_collection: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either AppResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.AppResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def begin_set_active_deployments( self, resource_group_name: str, service_name: str, app_name: str, active_deployment_collection: _models.ActiveDeploymentCollection, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.AppResource]: '''Set existing Deployment under the app as active. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param active_deployment_collection: A list of Deployment name to be active. Is either a ActiveDeploymentCollection type or a IO[bytes] type. Required. :type active_deployment_collection: ~azure.mgmt.appplatform.v2023_12_01.models.ActiveDeploymentCollection or IO[bytes] :return: An instance of LROPoller that returns either AppResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.AppResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass @overload def validate_domain( self, resource_group_name: str, service_name: str, app_name: str, validate_payload: _models.CustomDomainValidatePayload, *, content_type: str = "application/json", **kwargs: Any ) -> _models.CustomDomainValidateResult: '''Check the resource name is valid as well as not in use. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param validate_payload: Custom domain payload to be validated. Required. :type validate_payload: ~azure.mgmt.appplatform.v2023_12_01.models.CustomDomainValidatePayload :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: CustomDomainValidateResult or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.CustomDomainValidateResult :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload def validate_domain( self, resource_group_name: str, service_name: str, app_name: str, validate_payload: _models.CustomDomainValidatePayload, *, content_type: str = "application/json", **kwargs: Any ) -> _models.CustomDomainValidateResult: '''Check the resource name is valid as well as not in use. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param validate_payload: Custom domain payload to be validated. Required. :type validate_payload: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: CustomDomainValidateResult or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.CustomDomainValidateResult :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def validate_domain( self, resource_group_name: str, service_name: str, app_name: str, validate_payload: _models.CustomDomainValidatePayload, *, content_type: str = "application/json", **kwargs: Any ) -> _models.CustomDomainValidateResult: '''Check the resource name is valid as well as not in use. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param validate_payload: Custom domain payload to be validated. Is either a CustomDomainValidatePayload type or a IO[bytes] type. Required. :type validate_payload: ~azure.mgmt.appplatform.v2023_12_01.models.CustomDomainValidatePayload or IO[bytes] :return: CustomDomainValidateResult or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.CustomDomainValidateResult :raises ~azure.core.exceptions.HttpResponseError: ''' pass
45
17
40
4
26
11
3
0.43
0
7
0
0
21
5
21
21
1,088
131
693
323
514
297
323
173
294
7
0
1
81
10,218
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/operations/_bindings_operations.py
azext_spring.vendored_sdks.appplatform.v2023_12_01.operations._bindings_operations.BindingsOperations
class BindingsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`bindings` attribute. """ models = _models def __init__(self, *args, **kwargs): input_args = list(args) self._client = input_args.pop(0) if input_args else kwargs.pop("client") self._config = input_args.pop(0) if input_args else kwargs.pop("config") self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace def get( self, resource_group_name: str, service_name: str, app_name: str, binding_name: str, **kwargs: Any ) -> _models.BindingResource: """Get a Binding and its properties. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param binding_name: The name of the Binding resource. Required. :type binding_name: str :return: BindingResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.BindingResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.BindingResource] = kwargs.pop("cls", None) _request = build_get_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, binding_name=binding_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("BindingResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore def _create_or_update_initial( self, resource_group_name: str, service_name: str, app_name: str, binding_name: str, binding_resource: Union[_models.BindingResource, IO[bytes]], **kwargs: Any ) -> _models.BindingResource: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.BindingResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(binding_resource, (IOBase, bytes)): _content = binding_resource else: _json = self._serialize.body(binding_resource, "BindingResource") _request = build_create_or_update_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, binding_name=binding_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("BindingResource", pipeline_response) if response.status_code == 201: deserialized = self._deserialize("BindingResource", pipeline_response) if response.status_code == 202: deserialized = self._deserialize("BindingResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, app_name: str, binding_name: str, binding_resource: _models.BindingResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BindingResource]: """Create a new Binding or update an exiting Binding. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param binding_name: The name of the Binding resource. Required. :type binding_name: str :param binding_resource: Parameters for the create or update operation. Required. :type binding_resource: ~azure.mgmt.appplatform.v2023_12_01.models.BindingResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either BindingResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BindingResource] :raises ~azure.core.exceptions.HttpResponseError: """ @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, app_name: str, binding_name: str, binding_resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BindingResource]: """Create a new Binding or update an exiting Binding. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param binding_name: The name of the Binding resource. Required. :type binding_name: str :param binding_resource: Parameters for the create or update operation. Required. :type binding_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either BindingResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BindingResource] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def begin_create_or_update( self, resource_group_name: str, service_name: str, app_name: str, binding_name: str, binding_resource: Union[_models.BindingResource, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.BindingResource]: """Create a new Binding or update an exiting Binding. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param binding_name: The name of the Binding resource. Required. :type binding_name: str :param binding_resource: Parameters for the create or update operation. Is either a BindingResource type or a IO[bytes] type. Required. :type binding_resource: ~azure.mgmt.appplatform.v2023_12_01.models.BindingResource or IO[bytes] :return: An instance of LROPoller that returns either BindingResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BindingResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.BindingResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, binding_name=binding_name, binding_resource=binding_resource, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("BindingResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[_models.BindingResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[_models.BindingResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, app_name: str, binding_name: str, **kwargs: Any ) -> None: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, binding_name=binding_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) # type: ignore @distributed_trace def begin_delete( self, resource_group_name: str, service_name: str, app_name: str, binding_name: str, **kwargs: Any ) -> LROPoller[None]: """Operation to delete a Binding. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param binding_name: The name of the Binding resource. Required. :type binding_name: str :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._delete_initial( # type: ignore resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, binding_name=binding_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _update_initial( self, resource_group_name: str, service_name: str, app_name: str, binding_name: str, binding_resource: Union[_models.BindingResource, IO[bytes]], **kwargs: Any ) -> _models.BindingResource: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.BindingResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(binding_resource, (IOBase, bytes)): _content = binding_resource else: _json = self._serialize.body(binding_resource, "BindingResource") _request = build_update_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, binding_name=binding_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("BindingResource", pipeline_response) if response.status_code == 202: deserialized = self._deserialize("BindingResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload def begin_update( self, resource_group_name: str, service_name: str, app_name: str, binding_name: str, binding_resource: _models.BindingResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BindingResource]: """Operation to update an exiting Binding. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param binding_name: The name of the Binding resource. Required. :type binding_name: str :param binding_resource: Parameters for the update operation. Required. :type binding_resource: ~azure.mgmt.appplatform.v2023_12_01.models.BindingResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either BindingResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BindingResource] :raises ~azure.core.exceptions.HttpResponseError: """ @overload def begin_update( self, resource_group_name: str, service_name: str, app_name: str, binding_name: str, binding_resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BindingResource]: """Operation to update an exiting Binding. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param binding_name: The name of the Binding resource. Required. :type binding_name: str :param binding_resource: Parameters for the update operation. Required. :type binding_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either BindingResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BindingResource] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def begin_update( self, resource_group_name: str, service_name: str, app_name: str, binding_name: str, binding_resource: Union[_models.BindingResource, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.BindingResource]: """Operation to update an exiting Binding. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param binding_name: The name of the Binding resource. Required. :type binding_name: str :param binding_resource: Parameters for the update operation. Is either a BindingResource type or a IO[bytes] type. Required. :type binding_resource: ~azure.mgmt.appplatform.v2023_12_01.models.BindingResource or IO[bytes] :return: An instance of LROPoller that returns either BindingResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BindingResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.BindingResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._update_initial( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, binding_name=binding_name, binding_resource=binding_resource, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("BindingResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[_models.BindingResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[_models.BindingResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) @distributed_trace def list( self, resource_group_name: str, service_name: str, app_name: str, **kwargs: Any ) -> Iterable["_models.BindingResource"]: """Handles requests to list all resources in an App. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :return: An iterator like instance of either BindingResource or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.BindingResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.BindingResourceCollection] = kwargs.pop("cls", None) error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) def prepare_request(next_link=None): if not next_link: _request = build_list_request( resource_group_name=resource_group_name, service_name=service_name, app_name=app_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version _parsed_next_link = urllib.parse.urlparse(next_link) _next_request_params = case_insensitive_dict( { key: [urllib.parse.quote(v) for v in value] for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() } ) _next_request_params["api-version"] = self._api_version _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request def extract_data(pipeline_response): deserialized = self._deserialize("BindingResourceCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data)
class BindingsOperations: ''' .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`bindings` attribute. ''' def __init__(self, *args, **kwargs): pass @distributed_trace def get( self, resource_group_name: str, service_name: str, app_name: str, binding_name: str, **kwargs: Any ) -> _models.BindingResource: '''Get a Binding and its properties. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param binding_name: The name of the Binding resource. Required. :type binding_name: str :return: BindingResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.BindingResource :raises ~azure.core.exceptions.HttpResponseError: ''' pass def _create_or_update_initial( self, resource_group_name: str, service_name: str, app_name: str, binding_name: str, binding_resource: Union[_models.BindingResource, IO[bytes]], **kwargs: Any ) -> _models.BindingResource: pass @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, app_name: str, binding_name: str, binding_resource: _models.BindingResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BindingResource]: '''Create a new Binding or update an exiting Binding. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param binding_name: The name of the Binding resource. Required. :type binding_name: str :param binding_resource: Parameters for the create or update operation. Required. :type binding_resource: ~azure.mgmt.appplatform.v2023_12_01.models.BindingResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either BindingResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BindingResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, app_name: str, binding_name: str, binding_resource: _models.BindingResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BindingResource]: '''Create a new Binding or update an exiting Binding. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param binding_name: The name of the Binding resource. Required. :type binding_name: str :param binding_resource: Parameters for the create or update operation. Required. :type binding_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either BindingResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BindingResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def begin_create_or_update( self, resource_group_name: str, service_name: str, app_name: str, binding_name: str, binding_resource: _models.BindingResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BindingResource]: '''Create a new Binding or update an exiting Binding. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param binding_name: The name of the Binding resource. Required. :type binding_name: str :param binding_resource: Parameters for the create or update operation. Is either a BindingResource type or a IO[bytes] type. Required. :type binding_resource: ~azure.mgmt.appplatform.v2023_12_01.models.BindingResource or IO[bytes] :return: An instance of LROPoller that returns either BindingResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BindingResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, app_name: str, binding_name: str, **kwargs: Any ) -> None: pass @distributed_trace def begin_delete( self, resource_group_name: str, service_name: str, app_name: str, binding_name: str, **kwargs: Any ) -> LROPoller[None]: '''Operation to delete a Binding. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param binding_name: The name of the Binding resource. Required. :type binding_name: str :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass def _update_initial( self, resource_group_name: str, service_name: str, app_name: str, binding_name: str, binding_resource: Union[_models.BindingResource, IO[bytes]], **kwargs: Any ) -> _models.BindingResource: pass @overload def begin_update( self, resource_group_name: str, service_name: str, app_name: str, binding_name: str, binding_resource: _models.BindingResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BindingResource]: '''Operation to update an exiting Binding. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param binding_name: The name of the Binding resource. Required. :type binding_name: str :param binding_resource: Parameters for the update operation. Required. :type binding_resource: ~azure.mgmt.appplatform.v2023_12_01.models.BindingResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either BindingResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BindingResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload def begin_update( self, resource_group_name: str, service_name: str, app_name: str, binding_name: str, binding_resource: _models.BindingResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BindingResource]: '''Operation to update an exiting Binding. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param binding_name: The name of the Binding resource. Required. :type binding_name: str :param binding_resource: Parameters for the update operation. Required. :type binding_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either BindingResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BindingResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def begin_update( self, resource_group_name: str, service_name: str, app_name: str, binding_name: str, binding_resource: _models.BindingResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BindingResource]: '''Operation to update an exiting Binding. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :param binding_name: The name of the Binding resource. Required. :type binding_name: str :param binding_resource: Parameters for the update operation. Is either a BindingResource type or a IO[bytes] type. Required. :type binding_resource: ~azure.mgmt.appplatform.v2023_12_01.models.BindingResource or IO[bytes] :return: An instance of LROPoller that returns either BindingResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BindingResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass @distributed_trace def list( self, resource_group_name: str, service_name: str, app_name: str, **kwargs: Any ) -> Iterable["_models.BindingResource"]: '''Handles requests to list all resources in an App. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param app_name: The name of the App resource. Required. :type app_name: str :return: An iterator like instance of either BindingResource or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.BindingResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def prepare_request(next_link=None): pass def extract_data(pipeline_response): pass def get_next(next_link=None): pass
29
10
39
4
27
10
3
0.42
0
7
0
0
13
5
13
13
715
83
461
206
352
193
218
117
198
7
0
1
57
10,219
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/operations/_build_service_agent_pool_operations.py
azext_spring.vendored_sdks.appplatform.v2023_12_01.operations._build_service_agent_pool_operations.BuildServiceAgentPoolOperations
class BuildServiceAgentPoolOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`build_service_agent_pool` attribute. """ models = _models def __init__(self, *args, **kwargs): input_args = list(args) self._client = input_args.pop(0) if input_args else kwargs.pop("client") self._config = input_args.pop(0) if input_args else kwargs.pop("config") self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace def list( self, resource_group_name: str, service_name: str, build_service_name: str, **kwargs: Any ) -> Iterable["_models.BuildServiceAgentPoolResource"]: """List build service agent pool. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :return: An iterator like instance of either BuildServiceAgentPoolResource or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceAgentPoolResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.BuildServiceAgentPoolResourceCollection] = kwargs.pop("cls", None) error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) def prepare_request(next_link=None): if not next_link: _request = build_list_request( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version _parsed_next_link = urllib.parse.urlparse(next_link) _next_request_params = case_insensitive_dict( { key: [urllib.parse.quote(v) for v in value] for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() } ) _next_request_params["api-version"] = self._api_version _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request def extract_data(pipeline_response): deserialized = self._deserialize("BuildServiceAgentPoolResourceCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) @distributed_trace def get( self, resource_group_name: str, service_name: str, build_service_name: str, agent_pool_name: str, **kwargs: Any ) -> _models.BuildServiceAgentPoolResource: """Get build service agent pool. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param agent_pool_name: The name of the build service agent pool resource. Required. :type agent_pool_name: str :return: BuildServiceAgentPoolResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceAgentPoolResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.BuildServiceAgentPoolResource] = kwargs.pop("cls", None) _request = build_get_request( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, agent_pool_name=agent_pool_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("BuildServiceAgentPoolResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore def _update_put_initial( self, resource_group_name: str, service_name: str, build_service_name: str, agent_pool_name: str, agent_pool_resource: Union[_models.BuildServiceAgentPoolResource, IO[bytes]], **kwargs: Any ) -> _models.BuildServiceAgentPoolResource: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.BuildServiceAgentPoolResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(agent_pool_resource, (IOBase, bytes)): _content = agent_pool_resource else: _json = self._serialize.body(agent_pool_resource, "BuildServiceAgentPoolResource") _request = build_update_put_request( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, agent_pool_name=agent_pool_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("BuildServiceAgentPoolResource", pipeline_response) if response.status_code == 201: deserialized = self._deserialize("BuildServiceAgentPoolResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload def begin_update_put( self, resource_group_name: str, service_name: str, build_service_name: str, agent_pool_name: str, agent_pool_resource: _models.BuildServiceAgentPoolResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BuildServiceAgentPoolResource]: """Create or update build service agent pool. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param agent_pool_name: The name of the build service agent pool resource. Required. :type agent_pool_name: str :param agent_pool_resource: Parameters for the update operation. Required. :type agent_pool_resource: ~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceAgentPoolResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either BuildServiceAgentPoolResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceAgentPoolResource] :raises ~azure.core.exceptions.HttpResponseError: """ @overload def begin_update_put( self, resource_group_name: str, service_name: str, build_service_name: str, agent_pool_name: str, agent_pool_resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BuildServiceAgentPoolResource]: """Create or update build service agent pool. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param agent_pool_name: The name of the build service agent pool resource. Required. :type agent_pool_name: str :param agent_pool_resource: Parameters for the update operation. Required. :type agent_pool_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either BuildServiceAgentPoolResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceAgentPoolResource] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def begin_update_put( self, resource_group_name: str, service_name: str, build_service_name: str, agent_pool_name: str, agent_pool_resource: Union[_models.BuildServiceAgentPoolResource, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.BuildServiceAgentPoolResource]: """Create or update build service agent pool. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param agent_pool_name: The name of the build service agent pool resource. Required. :type agent_pool_name: str :param agent_pool_resource: Parameters for the update operation. Is either a BuildServiceAgentPoolResource type or a IO[bytes] type. Required. :type agent_pool_resource: ~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceAgentPoolResource or IO[bytes] :return: An instance of LROPoller that returns either BuildServiceAgentPoolResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceAgentPoolResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.BuildServiceAgentPoolResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._update_put_initial( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, agent_pool_name=agent_pool_name, agent_pool_resource=agent_pool_resource, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("BuildServiceAgentPoolResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[_models.BuildServiceAgentPoolResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[_models.BuildServiceAgentPoolResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore )
class BuildServiceAgentPoolOperations: ''' .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`build_service_agent_pool` attribute. ''' def __init__(self, *args, **kwargs): pass @distributed_trace def list( self, resource_group_name: str, service_name: str, build_service_name: str, **kwargs: Any ) -> Iterable["_models.BuildServiceAgentPoolResource"]: '''List build service agent pool. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :return: An iterator like instance of either BuildServiceAgentPoolResource or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceAgentPoolResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def prepare_request(next_link=None): pass def extract_data(pipeline_response): pass def get_next(next_link=None): pass @distributed_trace def get_next(next_link=None): '''Get build service agent pool. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param agent_pool_name: The name of the build service agent pool resource. Required. :type agent_pool_name: str :return: BuildServiceAgentPoolResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceAgentPoolResource :raises ~azure.core.exceptions.HttpResponseError: ''' pass def _update_put_initial( self, resource_group_name: str, service_name: str, build_service_name: str, agent_pool_name: str, agent_pool_resource: Union[_models.BuildServiceAgentPoolResource, IO[bytes]], **kwargs: Any ) -> _models.BuildServiceAgentPoolResource: pass @overload def begin_update_put( self, resource_group_name: str, service_name: str, build_service_name: str, agent_pool_name: str, agent_pool_resource: _models.BuildServiceAgentPoolResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BuildServiceAgentPoolResource]: '''Create or update build service agent pool. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param agent_pool_name: The name of the build service agent pool resource. Required. :type agent_pool_name: str :param agent_pool_resource: Parameters for the update operation. Required. :type agent_pool_resource: ~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceAgentPoolResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either BuildServiceAgentPoolResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceAgentPoolResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload def begin_update_put( self, resource_group_name: str, service_name: str, build_service_name: str, agent_pool_name: str, agent_pool_resource: _models.BuildServiceAgentPoolResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BuildServiceAgentPoolResource]: '''Create or update build service agent pool. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param agent_pool_name: The name of the build service agent pool resource. Required. :type agent_pool_name: str :param agent_pool_resource: Parameters for the update operation. Required. :type agent_pool_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either BuildServiceAgentPoolResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceAgentPoolResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def begin_update_put( self, resource_group_name: str, service_name: str, build_service_name: str, agent_pool_name: str, agent_pool_resource: _models.BuildServiceAgentPoolResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BuildServiceAgentPoolResource]: '''Create or update build service agent pool. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param agent_pool_name: The name of the build service agent pool resource. Required. :type agent_pool_name: str :param agent_pool_resource: Parameters for the update operation. Is either a BuildServiceAgentPoolResource type or a IO[bytes] type. Required. :type agent_pool_resource: ~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceAgentPoolResource or IO[bytes] :return: An instance of LROPoller that returns either BuildServiceAgentPoolResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BuildServiceAgentPoolResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass
17
6
39
4
26
10
3
0.44
0
7
0
0
7
5
7
7
393
48
246
112
189
109
121
67
109
6
0
1
31
10,220
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/operations/_build_service_builder_operations.py
azext_spring.vendored_sdks.appplatform.v2023_12_01.operations._build_service_builder_operations.BuildServiceBuilderOperations
class BuildServiceBuilderOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`build_service_builder` attribute. """ models = _models def __init__(self, *args, **kwargs): input_args = list(args) self._client = input_args.pop(0) if input_args else kwargs.pop("client") self._config = input_args.pop(0) if input_args else kwargs.pop("config") self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace def get( self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, **kwargs: Any ) -> _models.BuilderResource: """Get a KPack builder. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param builder_name: The name of the builder resource. Required. :type builder_name: str :return: BuilderResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.BuilderResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.BuilderResource] = kwargs.pop("cls", None) _request = build_get_request( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, builder_name=builder_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("BuilderResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore def _create_or_update_initial( self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, builder_resource: Union[_models.BuilderResource, IO[bytes]], **kwargs: Any ) -> _models.BuilderResource: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.BuilderResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(builder_resource, (IOBase, bytes)): _content = builder_resource else: _json = self._serialize.body(builder_resource, "BuilderResource") _request = build_create_or_update_request( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, builder_name=builder_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("BuilderResource", pipeline_response) if response.status_code == 201: deserialized = self._deserialize("BuilderResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, builder_resource: _models.BuilderResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BuilderResource]: """Create or update a KPack builder. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param builder_name: The name of the builder resource. Required. :type builder_name: str :param builder_resource: The target builder for the create or update operation. Required. :type builder_resource: ~azure.mgmt.appplatform.v2023_12_01.models.BuilderResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either BuilderResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BuilderResource] :raises ~azure.core.exceptions.HttpResponseError: """ @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, builder_resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BuilderResource]: """Create or update a KPack builder. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param builder_name: The name of the builder resource. Required. :type builder_name: str :param builder_resource: The target builder for the create or update operation. Required. :type builder_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either BuilderResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BuilderResource] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def begin_create_or_update( self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, builder_resource: Union[_models.BuilderResource, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.BuilderResource]: """Create or update a KPack builder. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param builder_name: The name of the builder resource. Required. :type builder_name: str :param builder_resource: The target builder for the create or update operation. Is either a BuilderResource type or a IO[bytes] type. Required. :type builder_resource: ~azure.mgmt.appplatform.v2023_12_01.models.BuilderResource or IO[bytes] :return: An instance of LROPoller that returns either BuilderResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BuilderResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.BuilderResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, builder_name=builder_name, builder_resource=builder_resource, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("BuilderResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[_models.BuilderResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[_models.BuilderResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, **kwargs: Any ) -> None: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, builder_name=builder_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) # type: ignore @distributed_trace def begin_delete( self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, **kwargs: Any ) -> LROPoller[None]: """Delete a KPack builder. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param builder_name: The name of the builder resource. Required. :type builder_name: str :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._delete_initial( # type: ignore resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, builder_name=builder_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace def list( self, resource_group_name: str, service_name: str, build_service_name: str, **kwargs: Any ) -> Iterable["_models.BuilderResource"]: """List KPack builders result. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :return: An iterator like instance of either BuilderResource or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.BuilderResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.BuilderResourceCollection] = kwargs.pop("cls", None) error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) def prepare_request(next_link=None): if not next_link: _request = build_list_request( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version _parsed_next_link = urllib.parse.urlparse(next_link) _next_request_params = case_insensitive_dict( { key: [urllib.parse.quote(v) for v in value] for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() } ) _next_request_params["api-version"] = self._api_version _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request def extract_data(pipeline_response): deserialized = self._deserialize("BuilderResourceCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) @distributed_trace def list_deployments( self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, **kwargs: Any ) -> _models.DeploymentList: """List deployments that are using the builder. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param builder_name: The name of the builder resource. Required. :type builder_name: str :return: DeploymentList or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.DeploymentList :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.DeploymentList] = kwargs.pop("cls", None) _request = build_list_deployments_request( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, builder_name=builder_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("DeploymentList", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized
class BuildServiceBuilderOperations: ''' .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`build_service_builder` attribute. ''' def __init__(self, *args, **kwargs): pass @distributed_trace def get( self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, **kwargs: Any ) -> _models.BuilderResource: '''Get a KPack builder. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param builder_name: The name of the builder resource. Required. :type builder_name: str :return: BuilderResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.BuilderResource :raises ~azure.core.exceptions.HttpResponseError: ''' pass def _create_or_update_initial( self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, builder_resource: Union[_models.BuilderResource, IO[bytes]], **kwargs: Any ) -> _models.BuilderResource: pass @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, builder_resource: _models.BuilderResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BuilderResource]: '''Create or update a KPack builder. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param builder_name: The name of the builder resource. Required. :type builder_name: str :param builder_resource: The target builder for the create or update operation. Required. :type builder_resource: ~azure.mgmt.appplatform.v2023_12_01.models.BuilderResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either BuilderResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BuilderResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, builder_resource: _models.BuilderResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BuilderResource]: '''Create or update a KPack builder. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param builder_name: The name of the builder resource. Required. :type builder_name: str :param builder_resource: The target builder for the create or update operation. Required. :type builder_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either BuilderResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BuilderResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def begin_create_or_update( self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, builder_resource: _models.BuilderResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BuilderResource]: '''Create or update a KPack builder. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param builder_name: The name of the builder resource. Required. :type builder_name: str :param builder_resource: The target builder for the create or update operation. Is either a BuilderResource type or a IO[bytes] type. Required. :type builder_resource: ~azure.mgmt.appplatform.v2023_12_01.models.BuilderResource or IO[bytes] :return: An instance of LROPoller that returns either BuilderResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BuilderResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, **kwargs: Any ) -> None: pass @distributed_trace def begin_delete( self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, **kwargs: Any ) -> LROPoller[None]: '''Delete a KPack builder. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param builder_name: The name of the builder resource. Required. :type builder_name: str :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass @distributed_trace def list( self, resource_group_name: str, service_name: str, build_service_name: str, **kwargs: Any ) -> Iterable["_models.BuilderResource"]: '''List KPack builders result. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :return: An iterator like instance of either BuilderResource or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.BuilderResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def prepare_request(next_link=None): pass def extract_data(pipeline_response): pass def get_next(next_link=None): pass @distributed_trace def list_deployments( self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, **kwargs: Any ) -> _models.DeploymentList: '''List deployments that are using the builder. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param builder_name: The name of the builder resource. Required. :type builder_name: str :return: DeploymentList or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.DeploymentList :raises ~azure.core.exceptions.HttpResponseError: ''' pass
23
8
39
4
27
10
3
0.4
0
7
0
0
10
5
10
10
558
72
362
152
293
144
180
99
164
6
0
1
44
10,221
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/operations/_container_registries_operations.py
azext_spring.vendored_sdks.appplatform.v2023_12_01.operations._container_registries_operations.ContainerRegistriesOperations
class ContainerRegistriesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`container_registries` attribute. """ models = _models def __init__(self, *args, **kwargs): input_args = list(args) self._client = input_args.pop(0) if input_args else kwargs.pop("client") self._config = input_args.pop(0) if input_args else kwargs.pop("config") self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace def list( self, resource_group_name: str, service_name: str, **kwargs: Any ) -> Iterable["_models.ContainerRegistryResource"]: """List container registries resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: An iterator like instance of either ContainerRegistryResource or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.ContainerRegistryResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.ContainerRegistryResourceCollection] = kwargs.pop("cls", None) error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) def prepare_request(next_link=None): if not next_link: _request = build_list_request( resource_group_name=resource_group_name, service_name=service_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version _parsed_next_link = urllib.parse.urlparse(next_link) _next_request_params = case_insensitive_dict( { key: [urllib.parse.quote(v) for v in value] for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() } ) _next_request_params["api-version"] = self._api_version _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request def extract_data(pipeline_response): deserialized = self._deserialize("ContainerRegistryResourceCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) @distributed_trace def get( self, resource_group_name: str, service_name: str, container_registry_name: str, **kwargs: Any ) -> _models.ContainerRegistryResource: """Get the container registries resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :return: ContainerRegistryResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.ContainerRegistryResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.ContainerRegistryResource] = kwargs.pop("cls", None) _request = build_get_request( resource_group_name=resource_group_name, service_name=service_name, container_registry_name=container_registry_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("ContainerRegistryResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore def _create_or_update_initial( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_resource: Union[_models.ContainerRegistryResource, IO[bytes]], **kwargs: Any ) -> _models.ContainerRegistryResource: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ContainerRegistryResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(container_registry_resource, (IOBase, bytes)): _content = container_registry_resource else: _json = self._serialize.body(container_registry_resource, "ContainerRegistryResource") _request = build_create_or_update_request( resource_group_name=resource_group_name, service_name=service_name, container_registry_name=container_registry_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("ContainerRegistryResource", pipeline_response) if response.status_code == 201: deserialized = self._deserialize("ContainerRegistryResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_resource: _models.ContainerRegistryResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ContainerRegistryResource]: """Create or update container registry resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :param container_registry_resource: Parameters for the create or update operation. Required. :type container_registry_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ContainerRegistryResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ContainerRegistryResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ContainerRegistryResource] :raises ~azure.core.exceptions.HttpResponseError: """ @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ContainerRegistryResource]: """Create or update container registry resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :param container_registry_resource: Parameters for the create or update operation. Required. :type container_registry_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ContainerRegistryResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ContainerRegistryResource] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def begin_create_or_update( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_resource: Union[_models.ContainerRegistryResource, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.ContainerRegistryResource]: """Create or update container registry resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :param container_registry_resource: Parameters for the create or update operation. Is either a ContainerRegistryResource type or a IO[bytes] type. Required. :type container_registry_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ContainerRegistryResource or IO[bytes] :return: An instance of LROPoller that returns either ContainerRegistryResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ContainerRegistryResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ContainerRegistryResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, service_name=service_name, container_registry_name=container_registry_name, container_registry_resource=container_registry_resource, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("ContainerRegistryResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: PollingMethod = cast( PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) ) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[_models.ContainerRegistryResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[_models.ContainerRegistryResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, container_registry_name: str, **kwargs: Any ) -> None: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, service_name=service_name, container_registry_name=container_registry_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) if cls: return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace def begin_delete( self, resource_group_name: str, service_name: str, container_registry_name: str, **kwargs: Any ) -> LROPoller[None]: """Delete a container registry resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._delete_initial( # type: ignore resource_group_name=resource_group_name, service_name=service_name, container_registry_name=container_registry_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) ) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore def _validate_initial( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_properties: Union[_models.ContainerRegistryProperties, IO[bytes]], **kwargs: Any ) -> Optional[_models.ContainerRegistryValidateResult]: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ContainerRegistryValidateResult]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(container_registry_properties, (IOBase, bytes)): _content = container_registry_properties else: _json = self._serialize.body(container_registry_properties, "ContainerRegistryProperties") _request = build_validate_request( resource_group_name=resource_group_name, service_name=service_name, container_registry_name=container_registry_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None response_headers = {} if response.status_code == 200: deserialized = self._deserialize("ContainerRegistryValidateResult", pipeline_response) if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore @overload def begin_validate( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_properties: _models.ContainerRegistryProperties, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ContainerRegistryValidateResult]: """Check if the container registry properties are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :param container_registry_properties: Parameters for the validate operation. Required. :type container_registry_properties: ~azure.mgmt.appplatform.v2023_12_01.models.ContainerRegistryProperties :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ContainerRegistryValidateResult or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ContainerRegistryValidateResult] :raises ~azure.core.exceptions.HttpResponseError: """ @overload def begin_validate( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_properties: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ContainerRegistryValidateResult]: """Check if the container registry properties are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :param container_registry_properties: Parameters for the validate operation. Required. :type container_registry_properties: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ContainerRegistryValidateResult or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ContainerRegistryValidateResult] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def begin_validate( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_properties: Union[_models.ContainerRegistryProperties, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.ContainerRegistryValidateResult]: """Check if the container registry properties are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :param container_registry_properties: Parameters for the validate operation. Is either a ContainerRegistryProperties type or a IO[bytes] type. Required. :type container_registry_properties: ~azure.mgmt.appplatform.v2023_12_01.models.ContainerRegistryProperties or IO[bytes] :return: An instance of LROPoller that returns either ContainerRegistryValidateResult or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ContainerRegistryValidateResult] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ContainerRegistryValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._validate_initial( resource_group_name=resource_group_name, service_name=service_name, container_registry_name=container_registry_name, container_registry_properties=container_registry_properties, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("ContainerRegistryValidateResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: PollingMethod = cast( PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) ) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[_models.ContainerRegistryValidateResult].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[_models.ContainerRegistryValidateResult]( self._client, raw_result, get_long_running_output, polling_method # type: ignore )
class ContainerRegistriesOperations: ''' .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`container_registries` attribute. ''' def __init__(self, *args, **kwargs): pass @distributed_trace def list( self, resource_group_name: str, service_name: str, **kwargs: Any ) -> Iterable["_models.ContainerRegistryResource"]: '''List container registries resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: An iterator like instance of either ContainerRegistryResource or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.ContainerRegistryResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def prepare_request(next_link=None): pass def extract_data(pipeline_response): pass def get_next(next_link=None): pass @distributed_trace def get_next(next_link=None): '''Get the container registries resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :return: ContainerRegistryResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.ContainerRegistryResource :raises ~azure.core.exceptions.HttpResponseError: ''' pass def _create_or_update_initial( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_resource: Union[_models.ContainerRegistryResource, IO[bytes]], **kwargs: Any ) -> _models.ContainerRegistryResource: pass @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_resource: _models.ContainerRegistryResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ContainerRegistryResource]: '''Create or update container registry resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :param container_registry_resource: Parameters for the create or update operation. Required. :type container_registry_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ContainerRegistryResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ContainerRegistryResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ContainerRegistryResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_resource: _models.ContainerRegistryResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ContainerRegistryResource]: '''Create or update container registry resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :param container_registry_resource: Parameters for the create or update operation. Required. :type container_registry_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ContainerRegistryResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ContainerRegistryResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def begin_create_or_update( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_resource: _models.ContainerRegistryResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ContainerRegistryResource]: '''Create or update container registry resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :param container_registry_resource: Parameters for the create or update operation. Is either a ContainerRegistryResource type or a IO[bytes] type. Required. :type container_registry_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ContainerRegistryResource or IO[bytes] :return: An instance of LROPoller that returns either ContainerRegistryResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ContainerRegistryResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, container_registry_name: str, **kwargs: Any ) -> None: pass @distributed_trace def begin_delete( self, resource_group_name: str, service_name: str, container_registry_name: str, **kwargs: Any ) -> LROPoller[None]: '''Delete a container registry resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass def _validate_initial( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_properties: Union[_models.ContainerRegistryProperties, IO[bytes]], **kwargs: Any ) -> Optional[_models.ContainerRegistryValidateResult]: pass @overload def begin_validate( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_properties: _models.ContainerRegistryProperties, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ContainerRegistryValidateResult]: '''Check if the container registry properties are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :param container_registry_properties: Parameters for the validate operation. Required. :type container_registry_properties: ~azure.mgmt.appplatform.v2023_12_01.models.ContainerRegistryProperties :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ContainerRegistryValidateResult or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ContainerRegistryValidateResult] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload def begin_validate( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_properties: _models.ContainerRegistryProperties, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ContainerRegistryValidateResult]: '''Check if the container registry properties are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :param container_registry_properties: Parameters for the validate operation. Required. :type container_registry_properties: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ContainerRegistryValidateResult or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ContainerRegistryValidateResult] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def begin_validate( self, resource_group_name: str, service_name: str, container_registry_name: str, container_registry_properties: _models.ContainerRegistryProperties, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ContainerRegistryValidateResult]: '''Check if the container registry properties are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param container_registry_name: The name of the container registry. Required. :type container_registry_name: str :param container_registry_properties: Parameters for the validate operation. Is either a ContainerRegistryProperties type or a IO[bytes] type. Required. :type container_registry_properties: ~azure.mgmt.appplatform.v2023_12_01.models.ContainerRegistryProperties or IO[bytes] :return: An instance of LROPoller that returns either ContainerRegistryValidateResult or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ContainerRegistryValidateResult] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass
29
10
38
4
26
9
3
0.4
0
7
0
0
13
5
13
13
695
83
454
200
353
180
221
119
201
6
0
1
57
10,222
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/operations/_configuration_services_operations.py
azext_spring.vendored_sdks.appplatform.v2023_12_01.operations._configuration_services_operations.ConfigurationServicesOperations
class ConfigurationServicesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`configuration_services` attribute. """ models = _models def __init__(self, *args, **kwargs): input_args = list(args) self._client = input_args.pop(0) if input_args else kwargs.pop("client") self._config = input_args.pop(0) if input_args else kwargs.pop("config") self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace def get( self, resource_group_name: str, service_name: str, configuration_service_name: str, **kwargs: Any ) -> _models.ConfigurationServiceResource: """Get the Application Configuration Service and its properties. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param configuration_service_name: The name of Application Configuration Service. Required. :type configuration_service_name: str :return: ConfigurationServiceResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.ConfigurationServiceResource] = kwargs.pop("cls", None) _request = build_get_request( resource_group_name=resource_group_name, service_name=service_name, configuration_service_name=configuration_service_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("ConfigurationServiceResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore def _create_or_update_initial( self, resource_group_name: str, service_name: str, configuration_service_name: str, configuration_service_resource: Union[_models.ConfigurationServiceResource, IO[bytes]], **kwargs: Any ) -> _models.ConfigurationServiceResource: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ConfigurationServiceResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(configuration_service_resource, (IOBase, bytes)): _content = configuration_service_resource else: _json = self._serialize.body(configuration_service_resource, "ConfigurationServiceResource") _request = build_create_or_update_request( resource_group_name=resource_group_name, service_name=service_name, configuration_service_name=configuration_service_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("ConfigurationServiceResource", pipeline_response) if response.status_code == 201: deserialized = self._deserialize("ConfigurationServiceResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, configuration_service_name: str, configuration_service_resource: _models.ConfigurationServiceResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigurationServiceResource]: """Create the default Application Configuration Service or update the existing Application Configuration Service. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param configuration_service_name: The name of Application Configuration Service. Required. :type configuration_service_name: str :param configuration_service_resource: Parameters for the update operation. Required. :type configuration_service_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ConfigurationServiceResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceResource] :raises ~azure.core.exceptions.HttpResponseError: """ @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, configuration_service_name: str, configuration_service_resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigurationServiceResource]: """Create the default Application Configuration Service or update the existing Application Configuration Service. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param configuration_service_name: The name of Application Configuration Service. Required. :type configuration_service_name: str :param configuration_service_resource: Parameters for the update operation. Required. :type configuration_service_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ConfigurationServiceResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceResource] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def begin_create_or_update( self, resource_group_name: str, service_name: str, configuration_service_name: str, configuration_service_resource: Union[_models.ConfigurationServiceResource, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.ConfigurationServiceResource]: """Create the default Application Configuration Service or update the existing Application Configuration Service. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param configuration_service_name: The name of Application Configuration Service. Required. :type configuration_service_name: str :param configuration_service_resource: Parameters for the update operation. Is either a ConfigurationServiceResource type or a IO[bytes] type. Required. :type configuration_service_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceResource or IO[bytes] :return: An instance of LROPoller that returns either ConfigurationServiceResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ConfigurationServiceResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, service_name=service_name, configuration_service_name=configuration_service_name, configuration_service_resource=configuration_service_resource, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("ConfigurationServiceResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[_models.ConfigurationServiceResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[_models.ConfigurationServiceResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, configuration_service_name: str, **kwargs: Any ) -> None: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, service_name=service_name, configuration_service_name=configuration_service_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) # type: ignore @distributed_trace def begin_delete( self, resource_group_name: str, service_name: str, configuration_service_name: str, **kwargs: Any ) -> LROPoller[None]: """Disable the default Application Configuration Service. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param configuration_service_name: The name of Application Configuration Service. Required. :type configuration_service_name: str :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._delete_initial( # type: ignore resource_group_name=resource_group_name, service_name=service_name, configuration_service_name=configuration_service_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace def list( self, resource_group_name: str, service_name: str, **kwargs: Any ) -> Iterable["_models.ConfigurationServiceResource"]: """Handles requests to list all resources in a Service. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: An iterator like instance of either ConfigurationServiceResource or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.ConfigurationServiceResourceCollection] = kwargs.pop("cls", None) error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) def prepare_request(next_link=None): if not next_link: _request = build_list_request( resource_group_name=resource_group_name, service_name=service_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version _parsed_next_link = urllib.parse.urlparse(next_link) _next_request_params = case_insensitive_dict( { key: [urllib.parse.quote(v) for v in value] for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() } ) _next_request_params["api-version"] = self._api_version _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request def extract_data(pipeline_response): deserialized = self._deserialize("ConfigurationServiceResourceCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) def _validate_initial( self, resource_group_name: str, service_name: str, configuration_service_name: str, settings: Union[_models.ConfigurationServiceSettings, IO[bytes]], **kwargs: Any ) -> _models.ConfigurationServiceSettingsValidateResult: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ConfigurationServiceSettingsValidateResult] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(settings, (IOBase, bytes)): _content = settings else: _json = self._serialize.body(settings, "ConfigurationServiceSettings") _request = build_validate_request( resource_group_name=resource_group_name, service_name=service_name, configuration_service_name=configuration_service_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("ConfigurationServiceSettingsValidateResult", pipeline_response) if response.status_code == 202: deserialized = self._deserialize("ConfigurationServiceSettingsValidateResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload def begin_validate( self, resource_group_name: str, service_name: str, configuration_service_name: str, settings: _models.ConfigurationServiceSettings, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigurationServiceSettingsValidateResult]: """Check if the Application Configuration Service settings are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param configuration_service_name: The name of Application Configuration Service. Required. :type configuration_service_name: str :param settings: Application Configuration Service settings to be validated. Required. :type settings: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceSettings :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ConfigurationServiceSettingsValidateResult or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceSettingsValidateResult] :raises ~azure.core.exceptions.HttpResponseError: """ @overload def begin_validate( self, resource_group_name: str, service_name: str, configuration_service_name: str, settings: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigurationServiceSettingsValidateResult]: """Check if the Application Configuration Service settings are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param configuration_service_name: The name of Application Configuration Service. Required. :type configuration_service_name: str :param settings: Application Configuration Service settings to be validated. Required. :type settings: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ConfigurationServiceSettingsValidateResult or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceSettingsValidateResult] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def begin_validate( self, resource_group_name: str, service_name: str, configuration_service_name: str, settings: Union[_models.ConfigurationServiceSettings, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.ConfigurationServiceSettingsValidateResult]: """Check if the Application Configuration Service settings are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param configuration_service_name: The name of Application Configuration Service. Required. :type configuration_service_name: str :param settings: Application Configuration Service settings to be validated. Is either a ConfigurationServiceSettings type or a IO[bytes] type. Required. :type settings: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceSettings or IO[bytes] :return: An instance of LROPoller that returns either ConfigurationServiceSettingsValidateResult or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceSettingsValidateResult] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ConfigurationServiceSettingsValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._validate_initial( resource_group_name=resource_group_name, service_name=service_name, configuration_service_name=configuration_service_name, settings=settings, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("ConfigurationServiceSettingsValidateResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: PollingMethod = cast( PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) ) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[_models.ConfigurationServiceSettingsValidateResult].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[_models.ConfigurationServiceSettingsValidateResult]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) def _validate_resource_initial( self, resource_group_name: str, service_name: str, configuration_service_name: str, configuration_service_resource: Union[_models.ConfigurationServiceResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.ConfigurationServiceSettingsValidateResult]: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ConfigurationServiceSettingsValidateResult]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(configuration_service_resource, (IOBase, bytes)): _content = configuration_service_resource else: _json = self._serialize.body(configuration_service_resource, "ConfigurationServiceResource") _request = build_validate_resource_request( resource_group_name=resource_group_name, service_name=service_name, configuration_service_name=configuration_service_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None response_headers = {} if response.status_code == 200: deserialized = self._deserialize("ConfigurationServiceSettingsValidateResult", pipeline_response) if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore @overload def begin_validate_resource( self, resource_group_name: str, service_name: str, configuration_service_name: str, configuration_service_resource: _models.ConfigurationServiceResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigurationServiceSettingsValidateResult]: """Check if the Application Configuration Service resource is valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param configuration_service_name: The name of Application Configuration Service. Required. :type configuration_service_name: str :param configuration_service_resource: Application Configuration Service resource to be validated. Required. :type configuration_service_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ConfigurationServiceSettingsValidateResult or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceSettingsValidateResult] :raises ~azure.core.exceptions.HttpResponseError: """ @overload def begin_validate_resource( self, resource_group_name: str, service_name: str, configuration_service_name: str, configuration_service_resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigurationServiceSettingsValidateResult]: """Check if the Application Configuration Service resource is valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param configuration_service_name: The name of Application Configuration Service. Required. :type configuration_service_name: str :param configuration_service_resource: Application Configuration Service resource to be validated. Required. :type configuration_service_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ConfigurationServiceSettingsValidateResult or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceSettingsValidateResult] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def begin_validate_resource( self, resource_group_name: str, service_name: str, configuration_service_name: str, configuration_service_resource: Union[_models.ConfigurationServiceResource, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.ConfigurationServiceSettingsValidateResult]: """Check if the Application Configuration Service resource is valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param configuration_service_name: The name of Application Configuration Service. Required. :type configuration_service_name: str :param configuration_service_resource: Application Configuration Service resource to be validated. Is either a ConfigurationServiceResource type or a IO[bytes] type. Required. :type configuration_service_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceResource or IO[bytes] :return: An instance of LROPoller that returns either ConfigurationServiceSettingsValidateResult or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceSettingsValidateResult] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ConfigurationServiceSettingsValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._validate_resource_initial( resource_group_name=resource_group_name, service_name=service_name, configuration_service_name=configuration_service_name, configuration_service_resource=configuration_service_resource, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("ConfigurationServiceSettingsValidateResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: PollingMethod = cast( PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) ) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[_models.ConfigurationServiceSettingsValidateResult].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[_models.ConfigurationServiceSettingsValidateResult]( self._client, raw_result, get_long_running_output, polling_method # type: ignore )
class ConfigurationServicesOperations: ''' .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`configuration_services` attribute. ''' def __init__(self, *args, **kwargs): pass @distributed_trace def get( self, resource_group_name: str, service_name: str, configuration_service_name: str, **kwargs: Any ) -> _models.ConfigurationServiceResource: '''Get the Application Configuration Service and its properties. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param configuration_service_name: The name of Application Configuration Service. Required. :type configuration_service_name: str :return: ConfigurationServiceResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceResource :raises ~azure.core.exceptions.HttpResponseError: ''' pass def _create_or_update_initial( self, resource_group_name: str, service_name: str, configuration_service_name: str, configuration_service_resource: Union[_models.ConfigurationServiceResource, IO[bytes]], **kwargs: Any ) -> _models.ConfigurationServiceResource: pass @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, configuration_service_name: str, configuration_service_resource: _models.ConfigurationServiceResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigurationServiceResource]: '''Create the default Application Configuration Service or update the existing Application Configuration Service. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param configuration_service_name: The name of Application Configuration Service. Required. :type configuration_service_name: str :param configuration_service_resource: Parameters for the update operation. Required. :type configuration_service_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ConfigurationServiceResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, configuration_service_name: str, configuration_service_resource: _models.ConfigurationServiceResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigurationServiceResource]: '''Create the default Application Configuration Service or update the existing Application Configuration Service. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param configuration_service_name: The name of Application Configuration Service. Required. :type configuration_service_name: str :param configuration_service_resource: Parameters for the update operation. Required. :type configuration_service_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ConfigurationServiceResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def begin_create_or_update( self, resource_group_name: str, service_name: str, configuration_service_name: str, configuration_service_resource: _models.ConfigurationServiceResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigurationServiceResource]: '''Create the default Application Configuration Service or update the existing Application Configuration Service. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param configuration_service_name: The name of Application Configuration Service. Required. :type configuration_service_name: str :param configuration_service_resource: Parameters for the update operation. Is either a ConfigurationServiceResource type or a IO[bytes] type. Required. :type configuration_service_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceResource or IO[bytes] :return: An instance of LROPoller that returns either ConfigurationServiceResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, configuration_service_name: str, **kwargs: Any ) -> None: pass @distributed_trace def begin_delete( self, resource_group_name: str, service_name: str, configuration_service_name: str, **kwargs: Any ) -> LROPoller[None]: '''Disable the default Application Configuration Service. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param configuration_service_name: The name of Application Configuration Service. Required. :type configuration_service_name: str :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass @distributed_trace def list( self, resource_group_name: str, service_name: str, **kwargs: Any ) -> Iterable["_models.ConfigurationServiceResource"]: '''Handles requests to list all resources in a Service. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: An iterator like instance of either ConfigurationServiceResource or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def prepare_request(next_link=None): pass def extract_data(pipeline_response): pass def get_next(next_link=None): pass def _validate_initial( self, resource_group_name: str, service_name: str, configuration_service_name: str, settings: Union[_models.ConfigurationServiceSettings, IO[bytes]], **kwargs: Any ) -> _models.ConfigurationServiceSettingsValidateResult: pass @overload def begin_validate( self, resource_group_name: str, service_name: str, configuration_service_name: str, settings: _models.ConfigurationServiceSettings, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigurationServiceSettingsValidateResult]: '''Check if the Application Configuration Service settings are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param configuration_service_name: The name of Application Configuration Service. Required. :type configuration_service_name: str :param settings: Application Configuration Service settings to be validated. Required. :type settings: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceSettings :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ConfigurationServiceSettingsValidateResult or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceSettingsValidateResult] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload def begin_validate( self, resource_group_name: str, service_name: str, configuration_service_name: str, settings: _models.ConfigurationServiceSettings, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigurationServiceSettingsValidateResult]: '''Check if the Application Configuration Service settings are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param configuration_service_name: The name of Application Configuration Service. Required. :type configuration_service_name: str :param settings: Application Configuration Service settings to be validated. Required. :type settings: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ConfigurationServiceSettingsValidateResult or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceSettingsValidateResult] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def begin_validate( self, resource_group_name: str, service_name: str, configuration_service_name: str, settings: _models.ConfigurationServiceSettings, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigurationServiceSettingsValidateResult]: '''Check if the Application Configuration Service settings are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param configuration_service_name: The name of Application Configuration Service. Required. :type configuration_service_name: str :param settings: Application Configuration Service settings to be validated. Is either a ConfigurationServiceSettings type or a IO[bytes] type. Required. :type settings: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceSettings or IO[bytes] :return: An instance of LROPoller that returns either ConfigurationServiceSettingsValidateResult or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceSettingsValidateResult] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass def _validate_resource_initial( self, resource_group_name: str, service_name: str, configuration_service_name: str, configuration_service_resource: Union[_models.ConfigurationServiceResource, IO[bytes]], **kwargs: Any ) -> Optional[_models.ConfigurationServiceSettingsValidateResult]: pass @overload def begin_validate_resource( self, resource_group_name: str, service_name: str, configuration_service_name: str, configuration_service_resource: _models.ConfigurationServiceResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigurationServiceSettingsValidateResult]: '''Check if the Application Configuration Service resource is valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param configuration_service_name: The name of Application Configuration Service. Required. :type configuration_service_name: str :param configuration_service_resource: Application Configuration Service resource to be validated. Required. :type configuration_service_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ConfigurationServiceSettingsValidateResult or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceSettingsValidateResult] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload def begin_validate_resource( self, resource_group_name: str, service_name: str, configuration_service_name: str, configuration_service_resource: _models.ConfigurationServiceResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigurationServiceSettingsValidateResult]: '''Check if the Application Configuration Service resource is valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param configuration_service_name: The name of Application Configuration Service. Required. :type configuration_service_name: str :param configuration_service_resource: Application Configuration Service resource to be validated. Required. :type configuration_service_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ConfigurationServiceSettingsValidateResult or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceSettingsValidateResult] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def begin_validate_resource( self, resource_group_name: str, service_name: str, configuration_service_name: str, configuration_service_resource: _models.ConfigurationServiceResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigurationServiceSettingsValidateResult]: '''Check if the Application Configuration Service resource is valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param configuration_service_name: The name of Application Configuration Service. Required. :type configuration_service_name: str :param configuration_service_resource: Application Configuration Service resource to be validated. Is either a ConfigurationServiceResource type or a IO[bytes] type. Required. :type configuration_service_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceResource or IO[bytes] :return: An instance of LROPoller that returns either ConfigurationServiceSettingsValidateResult or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigurationServiceSettingsValidateResult] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass
37
13
39
4
26
10
3
0.42
0
7
0
0
17
5
17
17
901
103
579
263
438
246
274
147
249
6
0
1
71
10,223
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/operations/_config_servers_operations.py
azext_spring.vendored_sdks.appplatform.v2023_12_01.operations._config_servers_operations.ConfigServersOperations
class ConfigServersOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`config_servers` attribute. """ models = _models def __init__(self, *args, **kwargs): input_args = list(args) self._client = input_args.pop(0) if input_args else kwargs.pop("client") self._config = input_args.pop(0) if input_args else kwargs.pop("config") self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _models.ConfigServerResource: """Get the config server and its properties. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: ConfigServerResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.ConfigServerResource] = kwargs.pop("cls", None) _request = build_get_request( resource_group_name=resource_group_name, service_name=service_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("ConfigServerResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore def _update_put_initial( self, resource_group_name: str, service_name: str, config_server_resource: Union[_models.ConfigServerResource, IO[bytes]], **kwargs: Any ) -> _models.ConfigServerResource: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ConfigServerResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(config_server_resource, (IOBase, bytes)): _content = config_server_resource else: _json = self._serialize.body(config_server_resource, "ConfigServerResource") _request = build_update_put_request( resource_group_name=resource_group_name, service_name=service_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("ConfigServerResource", pipeline_response) if response.status_code == 202: deserialized = self._deserialize("ConfigServerResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload def begin_update_put( self, resource_group_name: str, service_name: str, config_server_resource: _models.ConfigServerResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigServerResource]: """Update the config server. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param config_server_resource: Parameters for the update operation. Required. :type config_server_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ConfigServerResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerResource] :raises ~azure.core.exceptions.HttpResponseError: """ @overload def begin_update_put( self, resource_group_name: str, service_name: str, config_server_resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigServerResource]: """Update the config server. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param config_server_resource: Parameters for the update operation. Required. :type config_server_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ConfigServerResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerResource] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def begin_update_put( self, resource_group_name: str, service_name: str, config_server_resource: Union[_models.ConfigServerResource, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.ConfigServerResource]: """Update the config server. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param config_server_resource: Parameters for the update operation. Is either a ConfigServerResource type or a IO[bytes] type. Required. :type config_server_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerResource or IO[bytes] :return: An instance of LROPoller that returns either ConfigServerResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ConfigServerResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._update_put_initial( resource_group_name=resource_group_name, service_name=service_name, config_server_resource=config_server_resource, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("ConfigServerResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[_models.ConfigServerResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[_models.ConfigServerResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) def _update_patch_initial( self, resource_group_name: str, service_name: str, config_server_resource: Union[_models.ConfigServerResource, IO[bytes]], **kwargs: Any ) -> _models.ConfigServerResource: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ConfigServerResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(config_server_resource, (IOBase, bytes)): _content = config_server_resource else: _json = self._serialize.body(config_server_resource, "ConfigServerResource") _request = build_update_patch_request( resource_group_name=resource_group_name, service_name=service_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("ConfigServerResource", pipeline_response) if response.status_code == 202: deserialized = self._deserialize("ConfigServerResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload def begin_update_patch( self, resource_group_name: str, service_name: str, config_server_resource: _models.ConfigServerResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigServerResource]: """Update the config server. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param config_server_resource: Parameters for the update operation. Required. :type config_server_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ConfigServerResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerResource] :raises ~azure.core.exceptions.HttpResponseError: """ @overload def begin_update_patch( self, resource_group_name: str, service_name: str, config_server_resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigServerResource]: """Update the config server. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param config_server_resource: Parameters for the update operation. Required. :type config_server_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ConfigServerResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerResource] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def begin_update_patch( self, resource_group_name: str, service_name: str, config_server_resource: Union[_models.ConfigServerResource, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.ConfigServerResource]: """Update the config server. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param config_server_resource: Parameters for the update operation. Is either a ConfigServerResource type or a IO[bytes] type. Required. :type config_server_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerResource or IO[bytes] :return: An instance of LROPoller that returns either ConfigServerResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ConfigServerResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._update_patch_initial( resource_group_name=resource_group_name, service_name=service_name, config_server_resource=config_server_resource, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("ConfigServerResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[_models.ConfigServerResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[_models.ConfigServerResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) def _validate_initial( self, resource_group_name: str, service_name: str, config_server_settings: Union[_models.ConfigServerSettings, IO[bytes]], **kwargs: Any ) -> _models.ConfigServerSettingsValidateResult: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ConfigServerSettingsValidateResult] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(config_server_settings, (IOBase, bytes)): _content = config_server_settings else: _json = self._serialize.body(config_server_settings, "ConfigServerSettings") _request = build_validate_request( resource_group_name=resource_group_name, service_name=service_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("ConfigServerSettingsValidateResult", pipeline_response) if response.status_code == 202: deserialized = self._deserialize("ConfigServerSettingsValidateResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload def begin_validate( self, resource_group_name: str, service_name: str, config_server_settings: _models.ConfigServerSettings, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigServerSettingsValidateResult]: """Check if the config server settings are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param config_server_settings: Config server settings to be validated. Required. :type config_server_settings: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerSettings :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ConfigServerSettingsValidateResult or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerSettingsValidateResult] :raises ~azure.core.exceptions.HttpResponseError: """ @overload def begin_validate( self, resource_group_name: str, service_name: str, config_server_settings: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigServerSettingsValidateResult]: """Check if the config server settings are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param config_server_settings: Config server settings to be validated. Required. :type config_server_settings: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ConfigServerSettingsValidateResult or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerSettingsValidateResult] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def begin_validate( self, resource_group_name: str, service_name: str, config_server_settings: Union[_models.ConfigServerSettings, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.ConfigServerSettingsValidateResult]: """Check if the config server settings are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param config_server_settings: Config server settings to be validated. Is either a ConfigServerSettings type or a IO[bytes] type. Required. :type config_server_settings: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerSettings or IO[bytes] :return: An instance of LROPoller that returns either ConfigServerSettingsValidateResult or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerSettingsValidateResult] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ConfigServerSettingsValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._validate_initial( resource_group_name=resource_group_name, service_name=service_name, config_server_settings=config_server_settings, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("ConfigServerSettingsValidateResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: PollingMethod = cast( PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) ) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[_models.ConfigServerSettingsValidateResult].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[_models.ConfigServerSettingsValidateResult]( self._client, raw_result, get_long_running_output, polling_method # type: ignore )
class ConfigServersOperations: ''' .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`config_servers` attribute. ''' def __init__(self, *args, **kwargs): pass @distributed_trace def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _models.ConfigServerResource: '''Get the config server and its properties. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: ConfigServerResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerResource :raises ~azure.core.exceptions.HttpResponseError: ''' pass def _update_put_initial( self, resource_group_name: str, service_name: str, config_server_resource: Union[_models.ConfigServerResource, IO[bytes]], **kwargs: Any ) -> _models.ConfigServerResource: pass @overload def begin_update_put( self, resource_group_name: str, service_name: str, config_server_resource: _models.ConfigServerResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigServerResource]: '''Update the config server. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param config_server_resource: Parameters for the update operation. Required. :type config_server_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ConfigServerResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload def begin_update_put( self, resource_group_name: str, service_name: str, config_server_resource: _models.ConfigServerResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigServerResource]: '''Update the config server. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param config_server_resource: Parameters for the update operation. Required. :type config_server_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ConfigServerResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def begin_update_put( self, resource_group_name: str, service_name: str, config_server_resource: _models.ConfigServerResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigServerResource]: '''Update the config server. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param config_server_resource: Parameters for the update operation. Is either a ConfigServerResource type or a IO[bytes] type. Required. :type config_server_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerResource or IO[bytes] :return: An instance of LROPoller that returns either ConfigServerResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass def _update_patch_initial( self, resource_group_name: str, service_name: str, config_server_resource: Union[_models.ConfigServerResource, IO[bytes]], **kwargs: Any ) -> _models.ConfigServerResource: pass @overload def begin_update_patch( self, resource_group_name: str, service_name: str, config_server_resource: _models.ConfigServerResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigServerResource]: '''Update the config server. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param config_server_resource: Parameters for the update operation. Required. :type config_server_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ConfigServerResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload def begin_update_patch( self, resource_group_name: str, service_name: str, config_server_resource: _models.ConfigServerResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigServerResource]: '''Update the config server. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param config_server_resource: Parameters for the update operation. Required. :type config_server_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ConfigServerResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def begin_update_patch( self, resource_group_name: str, service_name: str, config_server_resource: _models.ConfigServerResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigServerResource]: '''Update the config server. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param config_server_resource: Parameters for the update operation. Is either a ConfigServerResource type or a IO[bytes] type. Required. :type config_server_resource: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerResource or IO[bytes] :return: An instance of LROPoller that returns either ConfigServerResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass def _validate_initial( self, resource_group_name: str, service_name: str, config_server_settings: Union[_models.ConfigServerSettings, IO[bytes]], **kwargs: Any ) -> _models.ConfigServerSettingsValidateResult: pass @overload def begin_validate( self, resource_group_name: str, service_name: str, config_server_settings: _models.ConfigServerSettings, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigServerSettingsValidateResult]: '''Check if the config server settings are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param config_server_settings: Config server settings to be validated. Required. :type config_server_settings: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerSettings :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ConfigServerSettingsValidateResult or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerSettingsValidateResult] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload def begin_validate( self, resource_group_name: str, service_name: str, config_server_settings: _models.ConfigServerSettings, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigServerSettingsValidateResult]: '''Check if the config server settings are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param config_server_settings: Config server settings to be validated. Required. :type config_server_settings: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either ConfigServerSettingsValidateResult or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerSettingsValidateResult] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def begin_validate( self, resource_group_name: str, service_name: str, config_server_settings: _models.ConfigServerSettings, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.ConfigServerSettingsValidateResult]: '''Check if the config server settings are valid. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param config_server_settings: Config server settings to be validated. Is either a ConfigServerSettings type or a IO[bytes] type. Required. :type config_server_settings: ~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerSettings or IO[bytes] :return: An instance of LROPoller that returns either ConfigServerSettingsValidateResult or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.ConfigServerSettingsValidateResult] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass
28
11
38
4
25
11
3
0.44
0
7
0
0
14
5
14
14
662
77
418
201
306
185
197
107
179
6
0
1
54
10,224
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/operations/_certificates_operations.py
azext_spring.vendored_sdks.appplatform.v2023_12_01.operations._certificates_operations.CertificatesOperations
class CertificatesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`certificates` attribute. """ models = _models def __init__(self, *args, **kwargs): input_args = list(args) self._client = input_args.pop(0) if input_args else kwargs.pop("client") self._config = input_args.pop(0) if input_args else kwargs.pop("config") self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace def get( self, resource_group_name: str, service_name: str, certificate_name: str, **kwargs: Any ) -> _models.CertificateResource: """Get the certificate resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param certificate_name: The name of the certificate resource. Required. :type certificate_name: str :return: CertificateResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.CertificateResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.CertificateResource] = kwargs.pop("cls", None) _request = build_get_request( resource_group_name=resource_group_name, service_name=service_name, certificate_name=certificate_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("CertificateResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore def _create_or_update_initial( self, resource_group_name: str, service_name: str, certificate_name: str, certificate_resource: Union[_models.CertificateResource, IO[bytes]], **kwargs: Any ) -> _models.CertificateResource: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CertificateResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(certificate_resource, (IOBase, bytes)): _content = certificate_resource else: _json = self._serialize.body(certificate_resource, "CertificateResource") _request = build_create_or_update_request( resource_group_name=resource_group_name, service_name=service_name, certificate_name=certificate_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("CertificateResource", pipeline_response) if response.status_code == 201: deserialized = self._deserialize("CertificateResource", pipeline_response) if response.status_code == 202: deserialized = self._deserialize("CertificateResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, certificate_name: str, certificate_resource: _models.CertificateResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.CertificateResource]: """Create or update certificate resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param certificate_name: The name of the certificate resource. Required. :type certificate_name: str :param certificate_resource: Parameters for the create or update operation. Required. :type certificate_resource: ~azure.mgmt.appplatform.v2023_12_01.models.CertificateResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either CertificateResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.CertificateResource] :raises ~azure.core.exceptions.HttpResponseError: """ @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, certificate_name: str, certificate_resource: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.CertificateResource]: """Create or update certificate resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param certificate_name: The name of the certificate resource. Required. :type certificate_name: str :param certificate_resource: Parameters for the create or update operation. Required. :type certificate_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either CertificateResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.CertificateResource] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def begin_create_or_update( self, resource_group_name: str, service_name: str, certificate_name: str, certificate_resource: Union[_models.CertificateResource, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.CertificateResource]: """Create or update certificate resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param certificate_name: The name of the certificate resource. Required. :type certificate_name: str :param certificate_resource: Parameters for the create or update operation. Is either a CertificateResource type or a IO[bytes] type. Required. :type certificate_resource: ~azure.mgmt.appplatform.v2023_12_01.models.CertificateResource or IO[bytes] :return: An instance of LROPoller that returns either CertificateResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.CertificateResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CertificateResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, service_name=service_name, certificate_name=certificate_name, certificate_resource=certificate_resource, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("CertificateResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[_models.CertificateResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[_models.CertificateResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, certificate_name: str, **kwargs: Any ) -> None: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, service_name=service_name, certificate_name=certificate_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) # type: ignore @distributed_trace def begin_delete( self, resource_group_name: str, service_name: str, certificate_name: str, **kwargs: Any ) -> LROPoller[None]: """Delete the certificate resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param certificate_name: The name of the certificate resource. Required. :type certificate_name: str :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._delete_initial( # type: ignore resource_group_name=resource_group_name, service_name=service_name, certificate_name=certificate_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace def list( self, resource_group_name: str, service_name: str, **kwargs: Any ) -> Iterable["_models.CertificateResource"]: """List all the certificates of one user. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: An iterator like instance of either CertificateResource or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.CertificateResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.CertificateResourceCollection] = kwargs.pop("cls", None) error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) def prepare_request(next_link=None): if not next_link: _request = build_list_request( resource_group_name=resource_group_name, service_name=service_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version _parsed_next_link = urllib.parse.urlparse(next_link) _next_request_params = case_insensitive_dict( { key: [urllib.parse.quote(v) for v in value] for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() } ) _next_request_params["api-version"] = self._api_version _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request def extract_data(pipeline_response): deserialized = self._deserialize("CertificateResourceCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data)
class CertificatesOperations: ''' .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`certificates` attribute. ''' def __init__(self, *args, **kwargs): pass @distributed_trace def get( self, resource_group_name: str, service_name: str, certificate_name: str, **kwargs: Any ) -> _models.CertificateResource: '''Get the certificate resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param certificate_name: The name of the certificate resource. Required. :type certificate_name: str :return: CertificateResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.CertificateResource :raises ~azure.core.exceptions.HttpResponseError: ''' pass def _create_or_update_initial( self, resource_group_name: str, service_name: str, certificate_name: str, certificate_resource: Union[_models.CertificateResource, IO[bytes]], **kwargs: Any ) -> _models.CertificateResource: pass @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, certificate_name: str, certificate_resource: _models.CertificateResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.CertificateResource]: '''Create or update certificate resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param certificate_name: The name of the certificate resource. Required. :type certificate_name: str :param certificate_resource: Parameters for the create or update operation. Required. :type certificate_resource: ~azure.mgmt.appplatform.v2023_12_01.models.CertificateResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either CertificateResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.CertificateResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, certificate_name: str, certificate_resource: _models.CertificateResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.CertificateResource]: '''Create or update certificate resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param certificate_name: The name of the certificate resource. Required. :type certificate_name: str :param certificate_resource: Parameters for the create or update operation. Required. :type certificate_resource: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either CertificateResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.CertificateResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def begin_create_or_update( self, resource_group_name: str, service_name: str, certificate_name: str, certificate_resource: _models.CertificateResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.CertificateResource]: '''Create or update certificate resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param certificate_name: The name of the certificate resource. Required. :type certificate_name: str :param certificate_resource: Parameters for the create or update operation. Is either a CertificateResource type or a IO[bytes] type. Required. :type certificate_resource: ~azure.mgmt.appplatform.v2023_12_01.models.CertificateResource or IO[bytes] :return: An instance of LROPoller that returns either CertificateResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.CertificateResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, certificate_name: str, **kwargs: Any ) -> None: pass @distributed_trace def begin_delete( self, resource_group_name: str, service_name: str, certificate_name: str, **kwargs: Any ) -> LROPoller[None]: '''Delete the certificate resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param certificate_name: The name of the certificate resource. Required. :type certificate_name: str :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass @distributed_trace def list( self, resource_group_name: str, service_name: str, **kwargs: Any ) -> Iterable["_models.CertificateResource"]: '''List all the certificates of one user. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: An iterator like instance of either CertificateResource or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.CertificateResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def prepare_request(next_link=None): pass def extract_data(pipeline_response): pass def get_next(next_link=None): pass
21
7
36
4
26
8
3
0.37
0
7
0
0
9
5
9
9
476
62
315
134
254
116
162
88
147
7
0
1
42
10,225
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/workspace/quota/_show.py
azext_playwright_cli_extension.aaz.latest.playwright_testing.workspace.quota._show.Show.AccountQuotasGet
class AccountQuotasGet(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName}", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "accountName", self.ctx.args.workspace_name, required=True, ), **self.serialize_url_param( "quotaName", self.ctx.args.quota_name, required=True, ), **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-12-01", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.id = AAZStrType( flags={"read_only": True}, ) _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) _schema_on_200.properties = AAZObjectType( flags={"client_flatten": True}, ) _schema_on_200.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _schema_on_200.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200.properties properties.free_trial = AAZObjectType( serialized_name="freeTrial", ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) free_trial = cls._schema_on_200.properties.free_trial free_trial.allocated_value = AAZIntType( serialized_name="allocatedValue", flags={"read_only": True}, ) free_trial.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) free_trial.expiry_at = AAZStrType( serialized_name="expiryAt", flags={"read_only": True}, ) free_trial.percentage_used = AAZFloatType( serialized_name="percentageUsed", flags={"read_only": True}, ) free_trial.used_value = AAZIntType( serialized_name="usedValue", flags={"read_only": True}, ) system_data = cls._schema_on_200.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", ) system_data.created_by = AAZStrType( serialized_name="createdBy", ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", ) return cls._schema_on_200
class AccountQuotasGet(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
15
1
14
0
1
0
1
0
0
0
8
0
9
9
154
17
137
29
120
0
54
22
44
2
1
1
11
10,226
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/workspace/quota/_list.py
azext_playwright_cli_extension.aaz.latest.playwright_testing.workspace.quota._list.List.AccountQuotasListByAccount
class AccountQuotasListByAccount(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "accountName", self.ctx.args.workspace_name, required=True, ), **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-12-01", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.next_link = AAZStrType( serialized_name="nextLink", ) _schema_on_200.value = AAZListType( flags={"required": True}, ) value = cls._schema_on_200.value value.Element = AAZObjectType() _element = cls._schema_on_200.value.Element _element.id = AAZStrType( flags={"read_only": True}, ) _element.name = AAZStrType( flags={"read_only": True}, ) _element.properties = AAZObjectType( flags={"client_flatten": True}, ) _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _element.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200.value.Element.properties properties.free_trial = AAZObjectType( serialized_name="freeTrial", ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) free_trial = cls._schema_on_200.value.Element.properties.free_trial free_trial.allocated_value = AAZIntType( serialized_name="allocatedValue", flags={"read_only": True}, ) free_trial.created_at = AAZStrType( serialized_name="createdAt", flags={"read_only": True}, ) free_trial.expiry_at = AAZStrType( serialized_name="expiryAt", flags={"read_only": True}, ) free_trial.percentage_used = AAZFloatType( serialized_name="percentageUsed", flags={"read_only": True}, ) free_trial.used_value = AAZIntType( serialized_name="usedValue", flags={"read_only": True}, ) system_data = cls._schema_on_200.value.Element.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", ) system_data.created_by = AAZStrType( serialized_name="createdBy", ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", ) return cls._schema_on_200
class AccountQuotasListByAccount(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
16
1
15
0
1
0
1
0
0
0
8
0
9
9
161
19
142
31
125
0
59
24
49
2
1
1
11
10,227
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/workspace/_wait.py
azext_playwright_cli_extension.aaz.latest.playwright_testing.workspace._wait.Wait.AccountsGet
class AccountsGet(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "accountName", self.ctx.args.workspace_name, required=True, ), **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-12-01", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.id = AAZStrType( flags={"read_only": True}, ) _schema_on_200.location = AAZStrType( flags={"required": True}, ) _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) _schema_on_200.properties = AAZObjectType( flags={"client_flatten": True}, ) _schema_on_200.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _schema_on_200.tags = AAZDictType() _schema_on_200.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200.properties properties.dashboard_uri = AAZStrType( serialized_name="dashboardUri", flags={"read_only": True}, ) properties.local_auth = AAZStrType( serialized_name="localAuth", ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) properties.regional_affinity = AAZStrType( serialized_name="regionalAffinity", ) properties.reporting = AAZStrType() properties.scalable_execution = AAZStrType( serialized_name="scalableExecution", ) system_data = cls._schema_on_200.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", ) system_data.created_by = AAZStrType( serialized_name="createdBy", ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", ) tags = cls._schema_on_200.tags tags.Element = AAZStrType() return cls._schema_on_200
class AccountsGet(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
14
1
13
0
1
0
1
0
0
0
8
0
9
9
146
17
129
29
112
0
56
22
46
2
1
1
11
10,228
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/workspace/_update.py
azext_playwright_cli_extension.aaz.latest.playwright_testing.workspace._update.Update.InstanceUpdateByJson
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): def __call__(self, *args, **kwargs): self._update_instance(self.ctx.vars.instance) def _update_instance(self, instance): _instance_value, _builder = self.new_content_builder( self.ctx.args, value=instance, typ=AAZObjectType ) _builder.set_prop("properties", AAZObjectType, typ_kwargs={ "flags": {"client_flatten": True}}) _builder.set_prop("tags", AAZDictType, ".tags") properties = _builder.get(".properties") if properties is not None: properties.set_prop("localAuth", AAZStrType, ".local_auth") properties.set_prop("regionalAffinity", AAZStrType, ".regional_affinity") properties.set_prop("reporting", AAZStrType, ".reporting") properties.set_prop("scalableExecution", AAZStrType, ".scalable_execution") tags = _builder.get(".tags") if tags is not None: tags.set_elements(AAZStrType, ".") return _instance_value
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): def __call__(self, *args, **kwargs): pass def _update_instance(self, instance): pass
3
0
12
2
10
0
2
0
1
0
0
0
2
0
2
2
26
5
21
6
18
0
17
6
14
3
1
1
4
10,229
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/providerhub/azext_providerhub/aaz/latest/providerhub/operation/_delete.py
azext_providerhub.aaz.latest.providerhub.operation._delete.Delete.OperationsDelete
class OperationsDelete(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) if session.http_response.status_code in [204]: return self.on_204(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/operations/default", **self.url_parameters ) @property def method(self): return "DELETE" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "providerNamespace", self.ctx.args.provider_namespace, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-04-01-preview", required=True, ), } return parameters def on_200(self, session): pass def on_204(self, session): pass
class OperationsDelete(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass def on_200(self, session): pass def on_204(self, session): pass
14
0
5
0
5
0
1
0
1
0
0
0
8
0
8
8
57
9
48
19
34
0
26
14
17
3
1
1
10
10,230
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/workspace/_update.py
azext_playwright_cli_extension.aaz.latest.playwright_testing.workspace._update.Update.AccountsGet
class AccountsGet(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "accountName", self.ctx.args.workspace_name, required=True, ), **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-12-01", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _UpdateHelper._build_schema_account_read(cls._schema_on_200) return cls._schema_on_200
class AccountsGet(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
7
0
7
0
1
0
1
1
1
0
8
0
9
9
82
13
69
25
52
0
33
18
23
2
1
1
11
10,231
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/workspace/_list.py
azext_playwright_cli_extension.aaz.latest.playwright_testing.workspace._list.List.AccountsListBySubscription
class AccountsListBySubscription(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/accounts", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-12-01", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.next_link = AAZStrType( serialized_name="nextLink", ) _schema_on_200.value = AAZListType( flags={"required": True}, ) value = cls._schema_on_200.value value.Element = AAZObjectType() _element = cls._schema_on_200.value.Element _element.id = AAZStrType( flags={"read_only": True}, ) _element.location = AAZStrType( flags={"required": True}, ) _element.name = AAZStrType( flags={"read_only": True}, ) _element.properties = AAZObjectType( flags={"client_flatten": True}, ) _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _element.tags = AAZDictType() _element.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200.value.Element.properties properties.dashboard_uri = AAZStrType( serialized_name="dashboardUri", flags={"read_only": True}, ) properties.local_auth = AAZStrType( serialized_name="localAuth", ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) properties.regional_affinity = AAZStrType( serialized_name="regionalAffinity", ) properties.reporting = AAZStrType() properties.scalable_execution = AAZStrType( serialized_name="scalableExecution", ) system_data = cls._schema_on_200.value.Element.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", ) system_data.created_by = AAZStrType( serialized_name="createdBy", ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", ) tags = cls._schema_on_200.value.Element.tags tags.Element = AAZStrType() return cls._schema_on_200
class AccountsListBySubscription(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
14
1
13
0
1
0
1
0
0
0
8
0
9
9
149
19
130
31
113
0
61
24
51
2
1
1
11
10,232
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/workspace/_list.py
azext_playwright_cli_extension.aaz.latest.playwright_testing.workspace._list.List.AccountsListByResourceGroup
class AccountsListByResourceGroup(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-12-01", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.next_link = AAZStrType( serialized_name="nextLink", ) _schema_on_200.value = AAZListType( flags={"required": True}, ) value = cls._schema_on_200.value value.Element = AAZObjectType() _element = cls._schema_on_200.value.Element _element.id = AAZStrType( flags={"read_only": True}, ) _element.location = AAZStrType( flags={"required": True}, ) _element.name = AAZStrType( flags={"read_only": True}, ) _element.properties = AAZObjectType( flags={"client_flatten": True}, ) _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _element.tags = AAZDictType() _element.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200.value.Element.properties properties.dashboard_uri = AAZStrType( serialized_name="dashboardUri", flags={"read_only": True}, ) properties.local_auth = AAZStrType( serialized_name="localAuth", ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) properties.regional_affinity = AAZStrType( serialized_name="regionalAffinity", ) properties.reporting = AAZStrType() properties.scalable_execution = AAZStrType( serialized_name="scalableExecution", ) system_data = cls._schema_on_200.value.Element.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", ) system_data.created_by = AAZStrType( serialized_name="createdBy", ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", ) tags = cls._schema_on_200.value.Element.tags tags.Element = AAZStrType() return cls._schema_on_200
class AccountsListByResourceGroup(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
15
1
14
0
1
0
1
0
0
0
8
0
9
9
153
19
134
31
117
0
61
24
51
2
1
1
11
10,233
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/workspace/_delete.py
azext_playwright_cli_extension.aaz.latest.playwright_testing.workspace._delete.Delete.AccountsDelete
class AccountsDelete(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [202]: return self.client.build_lro_polling( self.ctx.args.no_wait, session, self.on_200_201, self.on_error, lro_options={"final-state-via": "location"}, path_format_arguments=self.url_parameters, ) if session.http_response.status_code in [204]: return self.client.build_lro_polling( self.ctx.args.no_wait, session, self.on_204, self.on_error, lro_options={"final-state-via": "location"}, path_format_arguments=self.url_parameters, ) if session.http_response.status_code in [200, 201]: return self.client.build_lro_polling( self.ctx.args.no_wait, session, self.on_200_201, self.on_error, lro_options={"final-state-via": "location"}, path_format_arguments=self.url_parameters, ) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}", **self.url_parameters ) @property def method(self): return "DELETE" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "accountName", self.ctx.args.workspace_name, required=True, ), **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-12-01", required=True, ), } return parameters def on_204(self, session): pass def on_200_201(self, session): pass
class AccountsDelete(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass def on_204(self, session): pass def on_200_201(self, session): pass
14
0
9
0
9
0
1
0
1
0
0
0
8
1
8
8
84
9
75
20
61
0
28
14
19
4
1
1
11
10,234
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/workspace/_create.py
azext_playwright_cli_extension.aaz.latest.playwright_testing.workspace._create.Create.AccountsCreateOrUpdate
class AccountsCreateOrUpdate(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [202]: return self.client.build_lro_polling( self.ctx.args.no_wait, session, self.on_200_201, self.on_error, lro_options={"final-state-via": "azure-async-operation"}, path_format_arguments=self.url_parameters, ) if session.http_response.status_code in [200, 201]: return self.client.build_lro_polling( self.ctx.args.no_wait, session, self.on_200_201, self.on_error, lro_options={"final-state-via": "azure-async-operation"}, path_format_arguments=self.url_parameters, ) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}", **self.url_parameters ) @property def method(self): return "PUT" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "accountName", self.ctx.args.workspace_name, required=True, ), **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-12-01", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Content-Type", "application/json", ), **self.serialize_header_param( "Accept", "application/json", ), } return parameters @property def content(self): _content_value, _builder = self.new_content_builder( self.ctx.args, typ=AAZObjectType, typ_kwargs={ "flags": {"required": True, "client_flatten": True}} ) _builder.set_prop("location", AAZStrType, ".location", typ_kwargs={ "flags": {"required": True}}) _builder.set_prop("properties", AAZObjectType, typ_kwargs={ "flags": {"client_flatten": True}}) _builder.set_prop("tags", AAZDictType, ".tags") properties = _builder.get(".properties") if properties is not None: properties.set_prop("localAuth", AAZStrType, ".local_auth") properties.set_prop("regionalAffinity", AAZStrType, ".regional_affinity") properties.set_prop("reporting", AAZStrType, ".reporting") properties.set_prop("scalableExecution", AAZStrType, ".scalable_execution") tags = _builder.get(".tags") if tags is not None: tags.set_elements(AAZStrType, ".") return self.serialize_content(_content_value) def on_200_201(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200_201 ) _schema_on_200_201 = None @classmethod def _build_schema_on_200_201(cls): if cls._schema_on_200_201 is not None: return cls._schema_on_200_201 cls._schema_on_200_201 = AAZObjectType() _schema_on_200_201 = cls._schema_on_200_201 _schema_on_200_201.id = AAZStrType( flags={"read_only": True}, ) _schema_on_200_201.location = AAZStrType( flags={"required": True}, ) _schema_on_200_201.name = AAZStrType( flags={"read_only": True}, ) _schema_on_200_201.properties = AAZObjectType( flags={"client_flatten": True}, ) _schema_on_200_201.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _schema_on_200_201.tags = AAZDictType() _schema_on_200_201.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200_201.properties properties.dashboard_uri = AAZStrType( serialized_name="dashboardUri", flags={"read_only": True}, ) properties.local_auth = AAZStrType( serialized_name="localAuth", ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) properties.regional_affinity = AAZStrType( serialized_name="regionalAffinity", ) properties.reporting = AAZStrType() properties.scalable_execution = AAZStrType( serialized_name="scalableExecution", ) system_data = cls._schema_on_200_201.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", ) system_data.created_by = AAZStrType( serialized_name="createdBy", ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", ) tags = cls._schema_on_200_201.tags tags.Element = AAZStrType() return cls._schema_on_200_201
class AccountsCreateOrUpdate(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass @property def content(self): pass def on_200_201(self, session): pass @classmethod def _build_schema_on_200_201(cls): pass
19
0
17
1
16
0
2
0
1
0
0
0
9
1
10
10
189
21
168
35
149
0
73
26
62
3
1
1
15
10,235
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/quota/_show.py
azext_playwright_cli_extension.aaz.latest.playwright_testing.quota._show.Show.QuotasGet
class QuotasGet(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName}", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "location", self.ctx.args.location, required=True, ), **self.serialize_url_param( "quotaName", self.ctx.args.quota_name, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-12-01", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.id = AAZStrType( flags={"read_only": True}, ) _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) _schema_on_200.properties = AAZObjectType( flags={"client_flatten": True}, ) _schema_on_200.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _schema_on_200.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200.properties properties.free_trial = AAZObjectType( serialized_name="freeTrial", ) properties.offering_type = AAZStrType( serialized_name="offeringType", flags={"read_only": True}, ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) free_trial = cls._schema_on_200.properties.free_trial free_trial.account_id = AAZStrType( serialized_name="accountId", flags={"read_only": True}, ) free_trial.state = AAZStrType( flags={"read_only": True}, ) system_data = cls._schema_on_200.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", ) system_data.created_by = AAZStrType( serialized_name="createdBy", ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", ) return cls._schema_on_200
class QuotasGet(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
13
1
13
0
1
0
1
0
0
0
8
0
9
9
141
17
124
29
107
0
52
22
42
2
1
1
11
10,236
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/quota/_list.py
azext_playwright_cli_extension.aaz.latest.playwright_testing.quota._list.List.QuotasListBySubscription
class QuotasListBySubscription(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "location", self.ctx.args.location, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-12-01", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.next_link = AAZStrType( serialized_name="nextLink", ) _schema_on_200.value = AAZListType( flags={"required": True}, ) value = cls._schema_on_200.value value.Element = AAZObjectType() _element = cls._schema_on_200.value.Element _element.id = AAZStrType( flags={"read_only": True}, ) _element.name = AAZStrType( flags={"read_only": True}, ) _element.properties = AAZObjectType( flags={"client_flatten": True}, ) _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _element.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200.value.Element.properties properties.free_trial = AAZObjectType( serialized_name="freeTrial", ) properties.offering_type = AAZStrType( serialized_name="offeringType", flags={"read_only": True}, ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) free_trial = cls._schema_on_200.value.Element.properties.free_trial free_trial.account_id = AAZStrType( serialized_name="accountId", flags={"read_only": True}, ) free_trial.state = AAZStrType( flags={"read_only": True}, ) system_data = cls._schema_on_200.value.Element.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", ) system_data.created_by = AAZStrType( serialized_name="createdBy", ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", ) return cls._schema_on_200
class QuotasListBySubscription(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
14
1
13
0
1
0
1
0
0
0
8
0
9
9
148
19
129
31
112
0
57
24
47
2
1
1
11
10,237
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/operations/_buildpack_binding_operations.py
azext_spring.vendored_sdks.appplatform.v2023_12_01.operations._buildpack_binding_operations.BuildpackBindingOperations
class BuildpackBindingOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`buildpack_binding` attribute. """ models = _models def __init__(self, *args, **kwargs): input_args = list(args) self._client = input_args.pop(0) if input_args else kwargs.pop("client") self._config = input_args.pop(0) if input_args else kwargs.pop("config") self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace def list_for_cluster( self, resource_group_name: str, service_name: str, **kwargs: Any ) -> Iterable["_models.BuildpackBindingResource"]: """Get collection of buildpack bindings under all builders. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: An iterator like instance of either BuildpackBindingResource or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.BuildpackBindingResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.BuildpackBindingResourceCollection] = kwargs.pop("cls", None) error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) def prepare_request(next_link=None): if not next_link: _request = build_list_for_cluster_request( resource_group_name=resource_group_name, service_name=service_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version _parsed_next_link = urllib.parse.urlparse(next_link) _next_request_params = case_insensitive_dict( { key: [urllib.parse.quote(v) for v in value] for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() } ) _next_request_params["api-version"] = self._api_version _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request def extract_data(pipeline_response): deserialized = self._deserialize("BuildpackBindingResourceCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) @distributed_trace def get( self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, buildpack_binding_name: str, **kwargs: Any ) -> _models.BuildpackBindingResource: """Get a buildpack binding by name. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param builder_name: The name of the builder resource. Required. :type builder_name: str :param buildpack_binding_name: The name of the Buildpack Binding Name. Required. :type buildpack_binding_name: str :return: BuildpackBindingResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.BuildpackBindingResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.BuildpackBindingResource] = kwargs.pop("cls", None) _request = build_get_request( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, builder_name=builder_name, buildpack_binding_name=buildpack_binding_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("BuildpackBindingResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore def _create_or_update_initial( self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, buildpack_binding_name: str, buildpack_binding: Union[_models.BuildpackBindingResource, IO[bytes]], **kwargs: Any ) -> _models.BuildpackBindingResource: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.BuildpackBindingResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(buildpack_binding, (IOBase, bytes)): _content = buildpack_binding else: _json = self._serialize.body(buildpack_binding, "BuildpackBindingResource") _request = build_create_or_update_request( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, builder_name=builder_name, buildpack_binding_name=buildpack_binding_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("BuildpackBindingResource", pipeline_response) if response.status_code == 201: deserialized = self._deserialize("BuildpackBindingResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, buildpack_binding_name: str, buildpack_binding: _models.BuildpackBindingResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BuildpackBindingResource]: """Create or update a buildpack binding. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param builder_name: The name of the builder resource. Required. :type builder_name: str :param buildpack_binding_name: The name of the Buildpack Binding Name. Required. :type buildpack_binding_name: str :param buildpack_binding: The target buildpack binding for the create or update operation. Required. :type buildpack_binding: ~azure.mgmt.appplatform.v2023_12_01.models.BuildpackBindingResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either BuildpackBindingResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BuildpackBindingResource] :raises ~azure.core.exceptions.HttpResponseError: """ @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, buildpack_binding_name: str, buildpack_binding: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BuildpackBindingResource]: """Create or update a buildpack binding. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param builder_name: The name of the builder resource. Required. :type builder_name: str :param buildpack_binding_name: The name of the Buildpack Binding Name. Required. :type buildpack_binding_name: str :param buildpack_binding: The target buildpack binding for the create or update operation. Required. :type buildpack_binding: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either BuildpackBindingResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BuildpackBindingResource] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def begin_create_or_update( self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, buildpack_binding_name: str, buildpack_binding: Union[_models.BuildpackBindingResource, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.BuildpackBindingResource]: """Create or update a buildpack binding. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param builder_name: The name of the builder resource. Required. :type builder_name: str :param buildpack_binding_name: The name of the Buildpack Binding Name. Required. :type buildpack_binding_name: str :param buildpack_binding: The target buildpack binding for the create or update operation. Is either a BuildpackBindingResource type or a IO[bytes] type. Required. :type buildpack_binding: ~azure.mgmt.appplatform.v2023_12_01.models.BuildpackBindingResource or IO[bytes] :return: An instance of LROPoller that returns either BuildpackBindingResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BuildpackBindingResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.BuildpackBindingResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, builder_name=builder_name, buildpack_binding_name=buildpack_binding_name, buildpack_binding=buildpack_binding, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("BuildpackBindingResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[_models.BuildpackBindingResource].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[_models.BuildpackBindingResource]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, buildpack_binding_name: str, **kwargs: Any ) -> None: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) _request = build_delete_request( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, builder_name=builder_name, buildpack_binding_name=buildpack_binding_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) # type: ignore @distributed_trace def begin_delete( self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, buildpack_binding_name: str, **kwargs: Any ) -> LROPoller[None]: """Operation to delete a Buildpack Binding. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param builder_name: The name of the builder resource. Required. :type builder_name: str :param buildpack_binding_name: The name of the Buildpack Binding Name. Required. :type buildpack_binding_name: str :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._delete_initial( # type: ignore resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, builder_name=builder_name, buildpack_binding_name=buildpack_binding_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace def list( self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, **kwargs: Any ) -> Iterable["_models.BuildpackBindingResource"]: """Handles requests to list all buildpack bindings in a builder. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param builder_name: The name of the builder resource. Required. :type builder_name: str :return: An iterator like instance of either BuildpackBindingResource or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.BuildpackBindingResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.BuildpackBindingResourceCollection] = kwargs.pop("cls", None) error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) def prepare_request(next_link=None): if not next_link: _request = build_list_request( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, builder_name=builder_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version _parsed_next_link = urllib.parse.urlparse(next_link) _next_request_params = case_insensitive_dict( { key: [urllib.parse.quote(v) for v in value] for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() } ) _next_request_params["api-version"] = self._api_version _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request def extract_data(pipeline_response): deserialized = self._deserialize("BuildpackBindingResourceCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data)
class BuildpackBindingOperations: ''' .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`buildpack_binding` attribute. ''' def __init__(self, *args, **kwargs): pass @distributed_trace def list_for_cluster( self, resource_group_name: str, service_name: str, **kwargs: Any ) -> Iterable["_models.BuildpackBindingResource"]: '''Get collection of buildpack bindings under all builders. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: An iterator like instance of either BuildpackBindingResource or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.BuildpackBindingResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def prepare_request(next_link=None): pass def extract_data(pipeline_response): pass def get_next(next_link=None): pass @distributed_trace def get_next(next_link=None): '''Get a buildpack binding by name. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param builder_name: The name of the builder resource. Required. :type builder_name: str :param buildpack_binding_name: The name of the Buildpack Binding Name. Required. :type buildpack_binding_name: str :return: BuildpackBindingResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.BuildpackBindingResource :raises ~azure.core.exceptions.HttpResponseError: ''' pass def _create_or_update_initial( self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, buildpack_binding_name: str, buildpack_binding: Union[_models.BuildpackBindingResource, IO[bytes]], **kwargs: Any ) -> _models.BuildpackBindingResource: pass @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, buildpack_binding_name: str, buildpack_binding: _models.BuildpackBindingResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BuildpackBindingResource]: '''Create or update a buildpack binding. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param builder_name: The name of the builder resource. Required. :type builder_name: str :param buildpack_binding_name: The name of the Buildpack Binding Name. Required. :type buildpack_binding_name: str :param buildpack_binding: The target buildpack binding for the create or update operation. Required. :type buildpack_binding: ~azure.mgmt.appplatform.v2023_12_01.models.BuildpackBindingResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either BuildpackBindingResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BuildpackBindingResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, buildpack_binding_name: str, buildpack_binding: _models.BuildpackBindingResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BuildpackBindingResource]: '''Create or update a buildpack binding. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param builder_name: The name of the builder resource. Required. :type builder_name: str :param buildpack_binding_name: The name of the Buildpack Binding Name. Required. :type buildpack_binding_name: str :param buildpack_binding: The target buildpack binding for the create or update operation. Required. :type buildpack_binding: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either BuildpackBindingResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BuildpackBindingResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def begin_create_or_update( self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, buildpack_binding_name: str, buildpack_binding: _models.BuildpackBindingResource, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BuildpackBindingResource]: '''Create or update a buildpack binding. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param builder_name: The name of the builder resource. Required. :type builder_name: str :param buildpack_binding_name: The name of the Buildpack Binding Name. Required. :type buildpack_binding_name: str :param buildpack_binding: The target buildpack binding for the create or update operation. Is either a BuildpackBindingResource type or a IO[bytes] type. Required. :type buildpack_binding: ~azure.mgmt.appplatform.v2023_12_01.models.BuildpackBindingResource or IO[bytes] :return: An instance of LROPoller that returns either BuildpackBindingResource or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BuildpackBindingResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, buildpack_binding_name: str, **kwargs: Any ) -> None: pass @distributed_trace def begin_delete( self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, buildpack_binding_name: str, **kwargs: Any ) -> LROPoller[None]: '''Operation to delete a Buildpack Binding. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param builder_name: The name of the builder resource. Required. :type builder_name: str :param buildpack_binding_name: The name of the Buildpack Binding Name. Required. :type buildpack_binding_name: str :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass @distributed_trace def list_for_cluster( self, resource_group_name: str, service_name: str, **kwargs: Any ) -> Iterable["_models.BuildpackBindingResource"]: '''Handles requests to list all buildpack bindings in a builder. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param builder_name: The name of the builder resource. Required. :type builder_name: str :return: An iterator like instance of either BuildpackBindingResource or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.BuildpackBindingResource] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def prepare_request(next_link=None): pass def extract_data(pipeline_response): pass def get_next(next_link=None): pass
26
8
39
4
28
9
3
0.38
0
7
0
0
10
5
10
10
625
74
412
181
318
158
196
106
177
6
0
1
48
10,238
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/operations/_build_service_operations.py
azext_spring.vendored_sdks.appplatform.v2023_12_01.operations._build_service_operations.BuildServiceOperations
class BuildServiceOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`build_service` attribute. """ models = _models def __init__(self, *args, **kwargs): input_args = list(args) self._client = input_args.pop(0) if input_args else kwargs.pop("client") self._config = input_args.pop(0) if input_args else kwargs.pop("config") self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace def list_build_services( self, resource_group_name: str, service_name: str, **kwargs: Any ) -> Iterable["_models.BuildService"]: """List build services resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: An iterator like instance of either BuildService or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.BuildService] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.BuildServiceCollection] = kwargs.pop("cls", None) error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) def prepare_request(next_link=None): if not next_link: _request = build_list_build_services_request( resource_group_name=resource_group_name, service_name=service_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version _parsed_next_link = urllib.parse.urlparse(next_link) _next_request_params = case_insensitive_dict( { key: [urllib.parse.quote(v) for v in value] for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() } ) _next_request_params["api-version"] = self._api_version _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request def extract_data(pipeline_response): deserialized = self._deserialize("BuildServiceCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) @distributed_trace def get_build_service( self, resource_group_name: str, service_name: str, build_service_name: str, **kwargs: Any ) -> _models.BuildService: """Get a build service resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :return: BuildService or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.BuildService :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.BuildService] = kwargs.pop("cls", None) _request = build_get_build_service_request( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("BuildService", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore def _create_or_update_initial( self, resource_group_name: str, service_name: str, build_service_name: str, build_service: Union[_models.BuildService, IO[bytes]], **kwargs: Any ) -> _models.BuildService: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.BuildService] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(build_service, (IOBase, bytes)): _content = build_service else: _json = self._serialize.body(build_service, "BuildService") _request = build_create_or_update_request( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("BuildService", pipeline_response) if response.status_code == 201: deserialized = self._deserialize("BuildService", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, build_service_name: str, build_service: _models.BuildService, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BuildService]: """Create a build service resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param build_service: Parameters for the create operation. Required. :type build_service: ~azure.mgmt.appplatform.v2023_12_01.models.BuildService :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either BuildService or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BuildService] :raises ~azure.core.exceptions.HttpResponseError: """ @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, build_service_name: str, build_service: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BuildService]: """Create a build service resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param build_service: Parameters for the create operation. Required. :type build_service: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either BuildService or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BuildService] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def begin_create_or_update( self, resource_group_name: str, service_name: str, build_service_name: str, build_service: Union[_models.BuildService, IO[bytes]], **kwargs: Any ) -> LROPoller[_models.BuildService]: """Create a build service resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param build_service: Parameters for the create operation. Is either a BuildService type or a IO[bytes] type. Required. :type build_service: ~azure.mgmt.appplatform.v2023_12_01.models.BuildService or IO[bytes] :return: An instance of LROPoller that returns either BuildService or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BuildService] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.BuildService] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, build_service=build_service, api_version=api_version, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): deserialized = self._deserialize("BuildService", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized if polling is True: polling_method: PollingMethod = cast( PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) ) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[_models.BuildService].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[_models.BuildService]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) @distributed_trace def list_builds( self, resource_group_name: str, service_name: str, build_service_name: str, **kwargs: Any ) -> Iterable["_models.Build"]: """List KPack builds. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :return: An iterator like instance of either Build or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.Build] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.BuildCollection] = kwargs.pop("cls", None) error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) def prepare_request(next_link=None): if not next_link: _request = build_list_builds_request( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version _parsed_next_link = urllib.parse.urlparse(next_link) _next_request_params = case_insensitive_dict( { key: [urllib.parse.quote(v) for v in value] for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() } ) _next_request_params["api-version"] = self._api_version _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request def extract_data(pipeline_response): deserialized = self._deserialize("BuildCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) @distributed_trace def get_build( self, resource_group_name: str, service_name: str, build_service_name: str, build_name: str, **kwargs: Any ) -> _models.Build: """Get a KPack build. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param build_name: The name of the build resource. Required. :type build_name: str :return: Build or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.Build :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.Build] = kwargs.pop("cls", None) _request = build_get_build_request( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, build_name=build_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("Build", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload def create_or_update_build( self, resource_group_name: str, service_name: str, build_service_name: str, build_name: str, build: _models.Build, *, content_type: str = "application/json", **kwargs: Any ) -> _models.Build: """Create or update a KPack build. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param build_name: The name of the build resource. Required. :type build_name: str :param build: Parameters for the create or update operation. Required. :type build: ~azure.mgmt.appplatform.v2023_12_01.models.Build :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: Build or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.Build :raises ~azure.core.exceptions.HttpResponseError: """ @overload def create_or_update_build( self, resource_group_name: str, service_name: str, build_service_name: str, build_name: str, build: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.Build: """Create or update a KPack build. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param build_name: The name of the build resource. Required. :type build_name: str :param build: Parameters for the create or update operation. Required. :type build: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: Build or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.Build :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace def create_or_update_build( self, resource_group_name: str, service_name: str, build_service_name: str, build_name: str, build: Union[_models.Build, IO[bytes]], **kwargs: Any ) -> _models.Build: """Create or update a KPack build. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param build_name: The name of the build resource. Required. :type build_name: str :param build: Parameters for the create or update operation. Is either a Build type or a IO[bytes] type. Required. :type build: ~azure.mgmt.appplatform.v2023_12_01.models.Build or IO[bytes] :return: Build or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.Build :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Build] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None if isinstance(build, (IOBase, bytes)): _content = build else: _json = self._serialize.body(build, "Build") _request = build_create_or_update_build_request( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, build_name=build_name, subscription_id=self._config.subscription_id, api_version=api_version, content_type=content_type, json=_json, content=_content, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize("Build", pipeline_response) if response.status_code == 201: deserialized = self._deserialize("Build", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore def _delete_build_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, build_service_name: str, build_name: str, **kwargs: Any ) -> None: error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) _request = build_delete_build_request( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, build_name=build_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) response_headers = {} if response.status_code == 202: response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) if cls: return cls(pipeline_response, None, response_headers) # type: ignore @distributed_trace def begin_delete_build( self, resource_group_name: str, service_name: str, build_service_name: str, build_name: str, **kwargs: Any ) -> LROPoller[None]: """delete a KPack build. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param build_name: The name of the build resource. Required. :type build_name: str :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: raw_result = self._delete_build_initial( # type: ignore resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, build_name=build_name, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, params=_params, **kwargs ) kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) ) elif polling is False: polling_method = cast(PollingMethod, NoPolling()) else: polling_method = polling if cont_token: return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace def list_build_results( self, resource_group_name: str, service_name: str, build_service_name: str, build_name: str, **kwargs: Any ) -> Iterable["_models.BuildResult"]: """List KPack build results. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param build_name: The name of the build resource. Required. :type build_name: str :return: An iterator like instance of either BuildResult or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.BuildResult] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.BuildResultCollection] = kwargs.pop("cls", None) error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) def prepare_request(next_link=None): if not next_link: _request = build_list_build_results_request( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, build_name=build_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) else: # make call to next link with the client's api-version _parsed_next_link = urllib.parse.urlparse(next_link) _next_request_params = case_insensitive_dict( { key: [urllib.parse.quote(v) for v in value] for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() } ) _next_request_params["api-version"] = self._api_version _request = HttpRequest( "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _request.method = "GET" return _request def extract_data(pipeline_response): deserialized = self._deserialize("BuildResultCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): _request = prepare_request(next_link) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) @distributed_trace def get_build_result( self, resource_group_name: str, service_name: str, build_service_name: str, build_name: str, build_result_name: str, **kwargs: Any ) -> _models.BuildResult: """Get a KPack build result. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param build_name: The name of the build resource. Required. :type build_name: str :param build_result_name: The name of the build result resource. Required. :type build_result_name: str :return: BuildResult or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.BuildResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.BuildResult] = kwargs.pop("cls", None) _request = build_get_build_result_request( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, build_name=build_name, build_result_name=build_result_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("BuildResult", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @distributed_trace def get_build_result_log( self, resource_group_name: str, service_name: str, build_service_name: str, build_name: str, build_result_name: str, **kwargs: Any ) -> _models.BuildResultLog: """Get a KPack build result log download URL. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param build_name: The name of the build resource. Required. :type build_name: str :param build_result_name: The name of the build result resource. Required. :type build_result_name: str :return: BuildResultLog or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.BuildResultLog :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.BuildResultLog] = kwargs.pop("cls", None) _request = build_get_build_result_log_request( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, build_name=build_name, build_result_name=build_result_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("BuildResultLog", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @distributed_trace def get_resource_upload_url( self, resource_group_name: str, service_name: str, build_service_name: str, **kwargs: Any ) -> _models.ResourceUploadDefinition: """Get an resource upload URL for build service, which may be artifacts or source archive. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :return: ResourceUploadDefinition or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.ResourceUploadDefinition :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.ResourceUploadDefinition] = kwargs.pop("cls", None) _request = build_get_resource_upload_url_request( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("ResourceUploadDefinition", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @distributed_trace def list_supported_buildpacks( self, resource_group_name: str, service_name: str, build_service_name: str, **kwargs: Any ) -> _models.SupportedBuildpacksCollection: """Get all supported buildpacks. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :return: SupportedBuildpacksCollection or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.SupportedBuildpacksCollection :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.SupportedBuildpacksCollection] = kwargs.pop("cls", None) _request = build_list_supported_buildpacks_request( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("SupportedBuildpacksCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @distributed_trace def get_supported_buildpack( self, resource_group_name: str, service_name: str, build_service_name: str, buildpack_name: str, **kwargs: Any ) -> _models.SupportedBuildpackResource: """Get the supported buildpack resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param buildpack_name: The name of the buildpack resource. Required. :type buildpack_name: str :return: SupportedBuildpackResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.SupportedBuildpackResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.SupportedBuildpackResource] = kwargs.pop("cls", None) _request = build_get_supported_buildpack_request( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, buildpack_name=buildpack_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("SupportedBuildpackResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @distributed_trace def list_supported_stacks( self, resource_group_name: str, service_name: str, build_service_name: str, **kwargs: Any ) -> _models.SupportedStacksCollection: """Get all supported stacks. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :return: SupportedStacksCollection or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.SupportedStacksCollection :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.SupportedStacksCollection] = kwargs.pop("cls", None) _request = build_list_supported_stacks_request( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("SupportedStacksCollection", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @distributed_trace def get_supported_stack( self, resource_group_name: str, service_name: str, build_service_name: str, stack_name: str, **kwargs: Any ) -> _models.SupportedStackResource: """Get the supported stack resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param stack_name: The name of the stack resource. Required. :type stack_name: str :return: SupportedStackResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.SupportedStackResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-12-01")) cls: ClsType[_models.SupportedStackResource] = kwargs.pop("cls", None) _request = build_get_supported_stack_request( resource_group_name=resource_group_name, service_name=service_name, build_service_name=build_service_name, stack_name=stack_name, subscription_id=self._config.subscription_id, api_version=api_version, headers=_headers, params=_params, ) _request = _convert_request(_request) _request.url = self._client.format_url(_request.url) _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize("SupportedStackResource", pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized
class BuildServiceOperations: ''' .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.appplatform.v2023_12_01.AppPlatformManagementClient`'s :attr:`build_service` attribute. ''' def __init__(self, *args, **kwargs): pass @distributed_trace def list_build_services( self, resource_group_name: str, service_name: str, **kwargs: Any ) -> Iterable["_models.BuildService"]: '''List build services resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :return: An iterator like instance of either BuildService or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.BuildService] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def prepare_request(next_link=None): pass def extract_data(pipeline_response): pass def get_next(next_link=None): pass @distributed_trace def get_build_service( self, resource_group_name: str, service_name: str, build_service_name: str, **kwargs: Any ) -> _models.BuildService: '''Get a build service resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :return: BuildService or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.BuildService :raises ~azure.core.exceptions.HttpResponseError: ''' pass def _create_or_update_initial( self, resource_group_name: str, service_name: str, build_service_name: str, build_service: Union[_models.BuildService, IO[bytes]], **kwargs: Any ) -> _models.BuildService: pass @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, build_service_name: str, build_service: _models.BuildService, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BuildService]: '''Create a build service resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param build_service: Parameters for the create operation. Required. :type build_service: ~azure.mgmt.appplatform.v2023_12_01.models.BuildService :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either BuildService or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BuildService] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload def begin_create_or_update( self, resource_group_name: str, service_name: str, build_service_name: str, build_service: _models.BuildService, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BuildService]: '''Create a build service resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param build_service: Parameters for the create operation. Required. :type build_service: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either BuildService or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BuildService] :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def begin_create_or_update( self, resource_group_name: str, service_name: str, build_service_name: str, build_service: _models.BuildService, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.BuildService]: '''Create a build service resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param build_service: Parameters for the create operation. Is either a BuildService type or a IO[bytes] type. Required. :type build_service: ~azure.mgmt.appplatform.v2023_12_01.models.BuildService or IO[bytes] :return: An instance of LROPoller that returns either BuildService or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.v2023_12_01.models.BuildService] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass @distributed_trace def list_builds( self, resource_group_name: str, service_name: str, build_service_name: str, **kwargs: Any ) -> Iterable["_models.Build"]: '''List KPack builds. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :return: An iterator like instance of either Build or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.Build] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def prepare_request(next_link=None): pass def extract_data(pipeline_response): pass def get_next(next_link=None): pass @distributed_trace def get_build_service( self, resource_group_name: str, service_name: str, build_service_name: str, **kwargs: Any ) -> _models.BuildService: '''Get a KPack build. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param build_name: The name of the build resource. Required. :type build_name: str :return: Build or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.Build :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload def create_or_update_build( self, resource_group_name: str, service_name: str, build_service_name: str, build_name: str, build: _models.Build, *, content_type: str = "application/json", **kwargs: Any ) -> _models.Build: '''Create or update a KPack build. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param build_name: The name of the build resource. Required. :type build_name: str :param build: Parameters for the create or update operation. Required. :type build: ~azure.mgmt.appplatform.v2023_12_01.models.Build :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: Build or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.Build :raises ~azure.core.exceptions.HttpResponseError: ''' pass @overload def create_or_update_build( self, resource_group_name: str, service_name: str, build_service_name: str, build_name: str, build: _models.Build, *, content_type: str = "application/json", **kwargs: Any ) -> _models.Build: '''Create or update a KPack build. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param build_name: The name of the build resource. Required. :type build_name: str :param build: Parameters for the create or update operation. Required. :type build: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str :return: Build or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.Build :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def create_or_update_build( self, resource_group_name: str, service_name: str, build_service_name: str, build_name: str, build: _models.Build, *, content_type: str = "application/json", **kwargs: Any ) -> _models.Build: '''Create or update a KPack build. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param build_name: The name of the build resource. Required. :type build_name: str :param build: Parameters for the create or update operation. Is either a Build type or a IO[bytes] type. Required. :type build: ~azure.mgmt.appplatform.v2023_12_01.models.Build or IO[bytes] :return: Build or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.Build :raises ~azure.core.exceptions.HttpResponseError: ''' pass def _delete_build_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, service_name: str, build_service_name: str, build_name: str, **kwargs: Any ) -> None: pass @distributed_trace def begin_delete_build( self, resource_group_name: str, service_name: str, build_service_name: str, build_name: str, **kwargs: Any ) -> LROPoller[None]: '''delete a KPack build. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param build_name: The name of the build resource. Required. :type build_name: str :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def get_long_running_output(pipeline_response): pass @distributed_trace def list_build_results( self, resource_group_name: str, service_name: str, build_service_name: str, build_name: str, **kwargs: Any ) -> Iterable["_models.BuildResult"]: '''List KPack build results. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param build_name: The name of the build resource. Required. :type build_name: str :return: An iterator like instance of either BuildResult or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.v2023_12_01.models.BuildResult] :raises ~azure.core.exceptions.HttpResponseError: ''' pass def prepare_request(next_link=None): pass def extract_data(pipeline_response): pass def get_next(next_link=None): pass @distributed_trace def get_build_result( self, resource_group_name: str, service_name: str, build_service_name: str, build_name: str, build_result_name: str, **kwargs: Any ) -> _models.BuildResult: '''Get a KPack build result. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param build_name: The name of the build resource. Required. :type build_name: str :param build_result_name: The name of the build result resource. Required. :type build_result_name: str :return: BuildResult or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.BuildResult :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def get_build_result_log( self, resource_group_name: str, service_name: str, build_service_name: str, build_name: str, build_result_name: str, **kwargs: Any ) -> _models.BuildResultLog: '''Get a KPack build result log download URL. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param build_name: The name of the build resource. Required. :type build_name: str :param build_result_name: The name of the build result resource. Required. :type build_result_name: str :return: BuildResultLog or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.BuildResultLog :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def get_resource_upload_url( self, resource_group_name: str, service_name: str, build_service_name: str, **kwargs: Any ) -> _models.ResourceUploadDefinition: '''Get an resource upload URL for build service, which may be artifacts or source archive. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :return: ResourceUploadDefinition or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.ResourceUploadDefinition :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def list_supported_buildpacks( self, resource_group_name: str, service_name: str, build_service_name: str, **kwargs: Any ) -> _models.SupportedBuildpacksCollection: '''Get all supported buildpacks. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :return: SupportedBuildpacksCollection or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.SupportedBuildpacksCollection :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def get_supported_buildpack( self, resource_group_name: str, service_name: str, build_service_name: str, buildpack_name: str, **kwargs: Any ) -> _models.SupportedBuildpackResource: '''Get the supported buildpack resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param buildpack_name: The name of the buildpack resource. Required. :type buildpack_name: str :return: SupportedBuildpackResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.SupportedBuildpackResource :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def list_supported_stacks( self, resource_group_name: str, service_name: str, build_service_name: str, **kwargs: Any ) -> _models.SupportedStacksCollection: '''Get all supported stacks. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :return: SupportedStacksCollection or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.SupportedStacksCollection :raises ~azure.core.exceptions.HttpResponseError: ''' pass @distributed_trace def get_supported_stack( self, resource_group_name: str, service_name: str, build_service_name: str, stack_name: str, **kwargs: Any ) -> _models.SupportedStackResource: '''Get the supported stack resource. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param service_name: The name of the Service resource. Required. :type service_name: str :param build_service_name: The name of the build service resource. Required. :type build_service_name: str :param stack_name: The name of the stack resource. Required. :type stack_name: str :return: SupportedStackResource or the result of cls(response) :rtype: ~azure.mgmt.appplatform.v2023_12_01.models.SupportedStackResource :raises ~azure.core.exceptions.HttpResponseError: ''' pass
53
20
44
6
30
10
3
0.4
0
7
0
0
22
5
22
22
1,335
193
853
348
700
337
427
229
393
6
0
1
88
10,239
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/playwright-cli-extension/azext_playwright_cli_extension/aaz/latest/playwright_testing/workspace/_update.py
azext_playwright_cli_extension.aaz.latest.playwright_testing.workspace._update.Update.AccountsCreateOrUpdate
class AccountsCreateOrUpdate(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [202]: return self.client.build_lro_polling( self.ctx.args.no_wait, session, self.on_200_201, self.on_error, lro_options={"final-state-via": "azure-async-operation"}, path_format_arguments=self.url_parameters, ) if session.http_response.status_code in [200, 201]: return self.client.build_lro_polling( self.ctx.args.no_wait, session, self.on_200_201, self.on_error, lro_options={"final-state-via": "azure-async-operation"}, path_format_arguments=self.url_parameters, ) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}", **self.url_parameters ) @property def method(self): return "PUT" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "accountName", self.ctx.args.workspace_name, required=True, ), **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-12-01", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Content-Type", "application/json", ), **self.serialize_header_param( "Accept", "application/json", ), } return parameters @property def content(self): _content_value, _builder = self.new_content_builder( self.ctx.args, value=self.ctx.vars.instance, ) return self.serialize_content(_content_value) def on_200_201(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200_201 ) _schema_on_200_201 = None @classmethod def _build_schema_on_200_201(cls): if cls._schema_on_200_201 is not None: return cls._schema_on_200_201 cls._schema_on_200_201 = AAZObjectType() _UpdateHelper._build_schema_account_read(cls._schema_on_200_201) return cls._schema_on_200_201
class AccountsCreateOrUpdate(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass @property def content(self): pass def on_200_201(self, session): pass @classmethod def _build_schema_on_200_201(cls): pass
19
0
9
0
8
0
1
0
1
1
1
0
9
1
10
10
110
15
95
29
76
0
38
20
27
3
1
1
13
10,240
Azure/azure-cli-extensions
src/spring/azext_spring/vendored_sdks/appplatform/v2023_12_01/models/_models_py3.py
azext_spring.vendored_sdks.appplatform.v2023_12_01.models._models_py3.SupportedApmTypes
class SupportedApmTypes(_serialization.Model): """Supported APM types payload. :ivar value: Collection of the supported APM type. :vartype value: list[~azure.mgmt.appplatform.v2023_12_01.models.SupportedApmType] :ivar next_link: URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. :vartype next_link: str """ _attribute_map = { "value": {"key": "value", "type": "[SupportedApmType]"}, "next_link": {"key": "nextLink", "type": "str"}, } def __init__( self, *, value: Optional[List["_models.SupportedApmType"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: """ :keyword value: Collection of the supported APM type. :paramtype value: list[~azure.mgmt.appplatform.v2023_12_01.models.SupportedApmType] :keyword next_link: URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. :paramtype next_link: str """ super().__init__(**kwargs) self.value = value self.next_link = next_link
class SupportedApmTypes(_serialization.Model): '''Supported APM types payload. :ivar value: Collection of the supported APM type. :vartype value: list[~azure.mgmt.appplatform.v2023_12_01.models.SupportedApmType] :ivar next_link: URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. :vartype next_link: str ''' def __init__( self, *, value: Optional[List["_models.SupportedApmType"]] = None, next_link: Optional[str] = None, **kwargs: Any ) -> None: ''' :keyword value: Collection of the supported APM type. :paramtype value: list[~azure.mgmt.appplatform.v2023_12_01.models.SupportedApmType] :keyword next_link: URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. :paramtype next_link: str ''' pass
2
2
17
0
10
7
1
0.93
1
3
0
0
1
2
1
16
32
3
15
11
7
14
6
5
4
1
2
0
1
10,241
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/providerhub/azext_providerhub/aaz/latest/providerhub/operation/_update.py
azext_providerhub.aaz.latest.providerhub.operation._update.Update.InstanceUpdateByJson
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): def __call__(self, *args, **kwargs): self._update_instance(self.ctx.vars.instance) def _update_instance(self, instance): _instance_value, _builder = self.new_content_builder( self.ctx.args, value=instance, typ=AAZObjectType ) _builder.set_prop("properties", AAZObjectType) properties = _builder.get(".properties") if properties is not None: properties.set_prop("contents", AAZListType, ".contents") contents = _builder.get(".properties.contents") if contents is not None: contents.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.contents[]") if _elements is not None: _elements.set_prop("actionType", AAZStrType, ".action_type") _elements.set_prop("display", AAZObjectType, ".display", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop( "isDataAction", AAZBoolType, ".is_data_action") _elements.set_prop("name", AAZStrType, ".name", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("origin", AAZStrType, ".origin") display = _builder.get(".properties.contents[].display") if display is not None: display.set_prop("cs", AAZObjectType, ".cs") display.set_prop("de", AAZObjectType, ".de") display.set_prop("default", AAZObjectType, ".default", typ_kwargs={ "flags": {"required": True}}) display.set_prop("en", AAZObjectType, ".en") display.set_prop("es", AAZObjectType, ".es") display.set_prop("fr", AAZObjectType, ".fr") display.set_prop("hu", AAZObjectType, ".hu") display.set_prop("it", AAZObjectType, ".it") display.set_prop("ja", AAZObjectType, ".ja") display.set_prop("ko", AAZObjectType, ".ko") display.set_prop("nl", AAZObjectType, ".nl") display.set_prop("pl", AAZObjectType, ".pl") display.set_prop("ptBR", AAZObjectType, ".pt_br") display.set_prop("ptPT", AAZObjectType, ".pt_pt") display.set_prop("ru", AAZObjectType, ".ru") display.set_prop("sv", AAZObjectType, ".sv") display.set_prop("zhHans", AAZObjectType, ".zh_hans") display.set_prop("zhHant", AAZObjectType, ".zh_hant") cs = _builder.get(".properties.contents[].display.cs") if cs is not None: cs.set_prop("description", AAZStrType, ".description", typ_kwargs={"flags": {"required": True}}) cs.set_prop("operation", AAZStrType, ".operation", typ_kwargs={"flags": {"required": True}}) cs.set_prop("provider", AAZStrType, ".provider", typ_kwargs={"flags": {"required": True}}) cs.set_prop("resource", AAZStrType, ".resource", typ_kwargs={"flags": {"required": True}}) de = _builder.get(".properties.contents[].display.de") if de is not None: de.set_prop("description", AAZStrType, ".description", typ_kwargs={"flags": {"required": True}}) de.set_prop("operation", AAZStrType, ".operation", typ_kwargs={"flags": {"required": True}}) de.set_prop("provider", AAZStrType, ".provider", typ_kwargs={"flags": {"required": True}}) de.set_prop("resource", AAZStrType, ".resource", typ_kwargs={"flags": {"required": True}}) default = _builder.get(".properties.contents[].display.default") if default is not None: default.set_prop("description", AAZStrType, ".description", typ_kwargs={ "flags": {"required": True}}) default.set_prop("operation", AAZStrType, ".operation", typ_kwargs={ "flags": {"required": True}}) default.set_prop("provider", AAZStrType, ".provider", typ_kwargs={ "flags": {"required": True}}) default.set_prop("resource", AAZStrType, ".resource", typ_kwargs={ "flags": {"required": True}}) en = _builder.get(".properties.contents[].display.en") if en is not None: en.set_prop("description", AAZStrType, ".description", typ_kwargs={"flags": {"required": True}}) en.set_prop("operation", AAZStrType, ".operation", typ_kwargs={"flags": {"required": True}}) en.set_prop("provider", AAZStrType, ".provider", typ_kwargs={"flags": {"required": True}}) en.set_prop("resource", AAZStrType, ".resource", typ_kwargs={"flags": {"required": True}}) es = _builder.get(".properties.contents[].display.es") if es is not None: es.set_prop("description", AAZStrType, ".description", typ_kwargs={"flags": {"required": True}}) es.set_prop("operation", AAZStrType, ".operation", typ_kwargs={"flags": {"required": True}}) es.set_prop("provider", AAZStrType, ".provider", typ_kwargs={"flags": {"required": True}}) es.set_prop("resource", AAZStrType, ".resource", typ_kwargs={"flags": {"required": True}}) fr = _builder.get(".properties.contents[].display.fr") if fr is not None: fr.set_prop("description", AAZStrType, ".description", typ_kwargs={"flags": {"required": True}}) fr.set_prop("operation", AAZStrType, ".operation", typ_kwargs={"flags": {"required": True}}) fr.set_prop("provider", AAZStrType, ".provider", typ_kwargs={"flags": {"required": True}}) fr.set_prop("resource", AAZStrType, ".resource", typ_kwargs={"flags": {"required": True}}) hu = _builder.get(".properties.contents[].display.hu") if hu is not None: hu.set_prop("description", AAZStrType, ".description", typ_kwargs={"flags": {"required": True}}) hu.set_prop("operation", AAZStrType, ".operation", typ_kwargs={"flags": {"required": True}}) hu.set_prop("provider", AAZStrType, ".provider", typ_kwargs={"flags": {"required": True}}) hu.set_prop("resource", AAZStrType, ".resource", typ_kwargs={"flags": {"required": True}}) it = _builder.get(".properties.contents[].display.it") if it is not None: it.set_prop("description", AAZStrType, ".description", typ_kwargs={"flags": {"required": True}}) it.set_prop("operation", AAZStrType, ".operation", typ_kwargs={"flags": {"required": True}}) it.set_prop("provider", AAZStrType, ".provider", typ_kwargs={"flags": {"required": True}}) it.set_prop("resource", AAZStrType, ".resource", typ_kwargs={"flags": {"required": True}}) ja = _builder.get(".properties.contents[].display.ja") if ja is not None: ja.set_prop("description", AAZStrType, ".description", typ_kwargs={"flags": {"required": True}}) ja.set_prop("operation", AAZStrType, ".operation", typ_kwargs={"flags": {"required": True}}) ja.set_prop("provider", AAZStrType, ".provider", typ_kwargs={"flags": {"required": True}}) ja.set_prop("resource", AAZStrType, ".resource", typ_kwargs={"flags": {"required": True}}) ko = _builder.get(".properties.contents[].display.ko") if ko is not None: ko.set_prop("description", AAZStrType, ".description", typ_kwargs={"flags": {"required": True}}) ko.set_prop("operation", AAZStrType, ".operation", typ_kwargs={"flags": {"required": True}}) ko.set_prop("provider", AAZStrType, ".provider", typ_kwargs={"flags": {"required": True}}) ko.set_prop("resource", AAZStrType, ".resource", typ_kwargs={"flags": {"required": True}}) nl = _builder.get(".properties.contents[].display.nl") if nl is not None: nl.set_prop("description", AAZStrType, ".description", typ_kwargs={"flags": {"required": True}}) nl.set_prop("operation", AAZStrType, ".operation", typ_kwargs={"flags": {"required": True}}) nl.set_prop("provider", AAZStrType, ".provider", typ_kwargs={"flags": {"required": True}}) nl.set_prop("resource", AAZStrType, ".resource", typ_kwargs={"flags": {"required": True}}) pl = _builder.get(".properties.contents[].display.pl") if pl is not None: pl.set_prop("description", AAZStrType, ".description", typ_kwargs={"flags": {"required": True}}) pl.set_prop("operation", AAZStrType, ".operation", typ_kwargs={"flags": {"required": True}}) pl.set_prop("provider", AAZStrType, ".provider", typ_kwargs={"flags": {"required": True}}) pl.set_prop("resource", AAZStrType, ".resource", typ_kwargs={"flags": {"required": True}}) pt_br = _builder.get(".properties.contents[].display.ptBR") if pt_br is not None: pt_br.set_prop("description", AAZStrType, ".description", typ_kwargs={ "flags": {"required": True}}) pt_br.set_prop("operation", AAZStrType, ".operation", typ_kwargs={ "flags": {"required": True}}) pt_br.set_prop("provider", AAZStrType, ".provider", typ_kwargs={"flags": {"required": True}}) pt_br.set_prop("resource", AAZStrType, ".resource", typ_kwargs={"flags": {"required": True}}) pt_pt = _builder.get(".properties.contents[].display.ptPT") if pt_pt is not None: pt_pt.set_prop("description", AAZStrType, ".description", typ_kwargs={ "flags": {"required": True}}) pt_pt.set_prop("operation", AAZStrType, ".operation", typ_kwargs={ "flags": {"required": True}}) pt_pt.set_prop("provider", AAZStrType, ".provider", typ_kwargs={"flags": {"required": True}}) pt_pt.set_prop("resource", AAZStrType, ".resource", typ_kwargs={"flags": {"required": True}}) ru = _builder.get(".properties.contents[].display.ru") if ru is not None: ru.set_prop("description", AAZStrType, ".description", typ_kwargs={"flags": {"required": True}}) ru.set_prop("operation", AAZStrType, ".operation", typ_kwargs={"flags": {"required": True}}) ru.set_prop("provider", AAZStrType, ".provider", typ_kwargs={"flags": {"required": True}}) ru.set_prop("resource", AAZStrType, ".resource", typ_kwargs={"flags": {"required": True}}) sv = _builder.get(".properties.contents[].display.sv") if sv is not None: sv.set_prop("description", AAZStrType, ".description", typ_kwargs={"flags": {"required": True}}) sv.set_prop("operation", AAZStrType, ".operation", typ_kwargs={"flags": {"required": True}}) sv.set_prop("provider", AAZStrType, ".provider", typ_kwargs={"flags": {"required": True}}) sv.set_prop("resource", AAZStrType, ".resource", typ_kwargs={"flags": {"required": True}}) zh_hans = _builder.get(".properties.contents[].display.zhHans") if zh_hans is not None: zh_hans.set_prop("description", AAZStrType, ".description", typ_kwargs={ "flags": {"required": True}}) zh_hans.set_prop("operation", AAZStrType, ".operation", typ_kwargs={ "flags": {"required": True}}) zh_hans.set_prop("provider", AAZStrType, ".provider", typ_kwargs={ "flags": {"required": True}}) zh_hans.set_prop("resource", AAZStrType, ".resource", typ_kwargs={ "flags": {"required": True}}) zh_hant = _builder.get(".properties.contents[].display.zhHant") if zh_hant is not None: zh_hant.set_prop("description", AAZStrType, ".description", typ_kwargs={ "flags": {"required": True}}) zh_hant.set_prop("operation", AAZStrType, ".operation", typ_kwargs={ "flags": {"required": True}}) zh_hant.set_prop("provider", AAZStrType, ".provider", typ_kwargs={ "flags": {"required": True}}) zh_hant.set_prop("resource", AAZStrType, ".resource", typ_kwargs={ "flags": {"required": True}}) return _instance_value
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): def __call__(self, *args, **kwargs): pass def _update_instance(self, instance): pass
3
0
87
12
76
0
12
0
1
0
0
0
2
0
2
2
177
25
152
26
149
0
148
26
145
23
1
1
24
10,242
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/providerhub/azext_providerhub/aaz/latest/providerhub/operation/_update.py
azext_providerhub.aaz.latest.providerhub.operation._update.Update.OperationsListByProviderRegistration
class OperationsListByProviderRegistration(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/operations/default", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "providerNamespace", self.ctx.args.provider_namespace, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-04-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.contents = AAZListType() _schema_on_200.id = AAZStrType( flags={"read_only": True}, ) _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) _schema_on_200.type = AAZStrType( flags={"read_only": True}, ) contents = cls._schema_on_200.contents contents.Element = AAZObjectType() _element = cls._schema_on_200.contents.Element _element.action_type = AAZStrType( serialized_name="actionType", ) _element.display = AAZObjectType( flags={"required": True}, ) _element.is_data_action = AAZBoolType( serialized_name="isDataAction", ) _element.name = AAZStrType( flags={"required": True}, ) _element.origin = AAZStrType() display = cls._schema_on_200.contents.Element.display display.description = AAZStrType( flags={"required": True}, ) display.operation = AAZStrType( flags={"required": True}, ) display.provider = AAZStrType( flags={"required": True}, ) display.resource = AAZStrType( flags={"required": True}, ) return cls._schema_on_200
class OperationsListByProviderRegistration(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
11
1
10
0
1
0
1
0
0
0
8
0
9
9
121
17
104
29
87
0
50
22
40
2
1
1
11
10,243
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/quota/azext_quota/aaz/latest/quota/_update.py
azext_quota.aaz.latest.quota._update.Update.QuotaUpdate
class QuotaUpdate(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [202]: return self.client.build_lro_polling( self.ctx.args.no_wait, session, self.on_200, self.on_error, lro_options={"final-state-via": "original-uri"}, path_format_arguments=self.url_parameters, ) if session.http_response.status_code in [200]: return self.client.build_lro_polling( self.ctx.args.no_wait, session, self.on_200, self.on_error, lro_options={"final-state-via": "original-uri"}, path_format_arguments=self.url_parameters, ) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/{scope}/providers/Microsoft.Quota/quotas/{resourceName}", **self.url_parameters ) @property def method(self): return "PATCH" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "resourceName", self.ctx.args.resource_name, required=True, ), **self.serialize_url_param( "scope", self.ctx.args.scope, skip_quote=True, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2023-02-01", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Content-Type", "application/json", ), **self.serialize_header_param( "Accept", "application/json", ), } return parameters @property def content(self): _content_value, _builder = self.new_content_builder( self.ctx.args, typ=AAZObjectType, typ_kwargs={ "flags": {"required": True, "client_flatten": True}} ) _builder.set_prop("properties", AAZObjectType) properties = _builder.get(".properties") if properties is not None: properties.set_prop("limit", AAZObjectType) properties.set_prop("name", AAZObjectType, ".name") properties.set_prop( "properties", AAZFreeFormDictType, ".properties") properties.set_prop( "resourceType", AAZStrType, ".resource_type") limit = _builder.get(".properties.limit") if limit is not None: limit.set_const("limitObjectType", "LimitValue", AAZStrType, ".limit_object", typ_kwargs={"flags": {"required": True}}) limit.discriminate_by("limitObjectType", "LimitValue") disc_limit_value = _builder.get( ".properties.limit{limitObjectType:LimitValue}") if disc_limit_value is not None: disc_limit_value.set_prop( "limitType", AAZStrType, ".limit_object.limit_type") disc_limit_value.set_prop("value", AAZIntType, ".limit_object.value", typ_kwargs={ "flags": {"required": True}}) name = _builder.get(".properties.name") if name is not None: name.set_prop("value", AAZStrType, ".value") properties = _builder.get(".properties.properties") if properties is not None: properties.set_anytype_elements(".") return self.serialize_content(_content_value) def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.id = AAZStrType( flags={"read_only": True}, ) _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) _schema_on_200.properties = AAZObjectType() _schema_on_200.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200.properties properties.is_quota_applicable = AAZBoolType( serialized_name="isQuotaApplicable", flags={"read_only": True}, ) properties.limit = AAZObjectType() properties.name = AAZObjectType() properties.properties = AAZFreeFormDictType() properties.quota_period = AAZStrType( serialized_name="quotaPeriod", flags={"read_only": True}, ) properties.resource_type = AAZStrType( serialized_name="resourceType", ) properties.unit = AAZStrType( flags={"read_only": True}, ) limit = cls._schema_on_200.properties.limit limit.limit_object_type = AAZStrType( serialized_name="limitObjectType", flags={"required": True}, ) disc_limit_value = cls._schema_on_200.properties.limit.discriminate_by( "limit_object_type", "LimitValue") disc_limit_value.limit_type = AAZStrType( serialized_name="limitType", ) disc_limit_value.value = AAZIntType( flags={"required": True}, ) name = cls._schema_on_200.properties.name name.localized_value = AAZStrType( serialized_name="localizedValue", flags={"read_only": True}, ) name.value = AAZStrType() return cls._schema_on_200
class QuotaUpdate(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass @property def content(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
19
0
16
1
15
0
2
0
1
0
0
0
9
1
10
10
185
25
160
38
141
0
79
29
68
6
1
1
18
10,244
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/quota/azext_quota/aaz/latest/quota/_show.py
azext_quota.aaz.latest.quota._show.Show.QuotaGet
class QuotaGet(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/{scope}/providers/Microsoft.Quota/quotas/{resourceName}", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "resourceName", self.ctx.args.resource_name, required=True, ), **self.serialize_url_param( "scope", self.ctx.args.scope, skip_quote=True, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2023-02-01", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.id = AAZStrType( flags={"read_only": True}, ) _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) _schema_on_200.properties = AAZObjectType() _schema_on_200.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200.properties properties.is_quota_applicable = AAZBoolType( serialized_name="isQuotaApplicable", flags={"read_only": True}, ) properties.limit = AAZObjectType() properties.name = AAZObjectType() properties.properties = AAZFreeFormDictType() properties.quota_period = AAZStrType( serialized_name="quotaPeriod", flags={"read_only": True}, ) properties.resource_type = AAZStrType( serialized_name="resourceType", ) properties.unit = AAZStrType( flags={"read_only": True}, ) limit = cls._schema_on_200.properties.limit limit.limit_object_type = AAZStrType( serialized_name="limitObjectType", flags={"required": True}, ) disc_limit_value = cls._schema_on_200.properties.limit.discriminate_by( "limit_object_type", "LimitValue") disc_limit_value.limit_type = AAZStrType( serialized_name="limitType", ) disc_limit_value.value = AAZIntType( flags={"required": True}, ) name = cls._schema_on_200.properties.name name.localized_value = AAZStrType( serialized_name="localizedValue", flags={"read_only": True}, ) name.value = AAZStrType() return cls._schema_on_200
class QuotaGet(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
12
1
11
0
1
0
1
0
0
0
8
0
9
9
130
18
112
30
95
0
53
23
43
2
1
1
11
10,245
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/quota/azext_quota/aaz/latest/quota/_list.py
azext_quota.aaz.latest.quota._list.List.QuotaList
class QuotaList(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/{scope}/providers/Microsoft.Quota/quotas", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "scope", self.ctx.args.scope, skip_quote=True, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2023-02-01", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.next_link = AAZStrType( serialized_name="nextLink", ) _schema_on_200.value = AAZListType() value = cls._schema_on_200.value value.Element = AAZObjectType() _element = cls._schema_on_200.value.Element _element.id = AAZStrType( flags={"read_only": True}, ) _element.name = AAZStrType( flags={"read_only": True}, ) _element.properties = AAZObjectType() _element.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200.value.Element.properties properties.is_quota_applicable = AAZBoolType( serialized_name="isQuotaApplicable", flags={"read_only": True}, ) properties.limit = AAZObjectType() properties.name = AAZObjectType() properties.properties = AAZFreeFormDictType() properties.quota_period = AAZStrType( serialized_name="quotaPeriod", flags={"read_only": True}, ) properties.resource_type = AAZStrType( serialized_name="resourceType", ) properties.unit = AAZStrType( flags={"read_only": True}, ) limit = cls._schema_on_200.value.Element.properties.limit limit.limit_object_type = AAZStrType( serialized_name="limitObjectType", flags={"required": True}, ) disc_limit_value = cls._schema_on_200.value.Element.properties.limit.discriminate_by( "limit_object_type", "LimitValue") disc_limit_value.limit_type = AAZStrType( serialized_name="limitType", ) disc_limit_value.value = AAZIntType( flags={"required": True}, ) name = cls._schema_on_200.value.Element.properties.name name.localized_value = AAZStrType( serialized_name="localizedValue", flags={"read_only": True}, ) name.value = AAZStrType() return cls._schema_on_200
class QuotaList(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
13
1
12
0
1
0
1
0
0
0
8
0
9
9
135
20
115
32
98
0
58
25
48
2
1
1
11
10,246
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/quota/azext_quota/aaz/latest/quota/_create.py
azext_quota.aaz.latest.quota._create.Create.QuotaCreateOrUpdate
class QuotaCreateOrUpdate(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [202]: return self.client.build_lro_polling( self.ctx.args.no_wait, session, self.on_200, self.on_error, lro_options={"final-state-via": "original-uri"}, path_format_arguments=self.url_parameters, ) if session.http_response.status_code in [200]: return self.client.build_lro_polling( self.ctx.args.no_wait, session, self.on_200, self.on_error, lro_options={"final-state-via": "original-uri"}, path_format_arguments=self.url_parameters, ) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/{scope}/providers/Microsoft.Quota/quotas/{resourceName}", **self.url_parameters ) @property def method(self): return "PUT" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "resourceName", self.ctx.args.resource_name, required=True, ), **self.serialize_url_param( "scope", self.ctx.args.scope, skip_quote=True, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2023-02-01", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Content-Type", "application/json", ), **self.serialize_header_param( "Accept", "application/json", ), } return parameters @property def content(self): _content_value, _builder = self.new_content_builder( self.ctx.args, typ=AAZObjectType, typ_kwargs={ "flags": {"required": True, "client_flatten": True}} ) _builder.set_prop("properties", AAZObjectType) properties = _builder.get(".properties") if properties is not None: properties.set_prop("limit", AAZObjectType) properties.set_prop("name", AAZObjectType, ".name") properties.set_prop( "properties", AAZFreeFormDictType, ".properties") properties.set_prop( "resourceType", AAZStrType, ".resource_type") limit = _builder.get(".properties.limit") if limit is not None: limit.set_const("limitObjectType", "LimitValue", AAZStrType, ".limit_object", typ_kwargs={"flags": {"required": True}}) limit.discriminate_by("limitObjectType", "LimitValue") disc_limit_value = _builder.get( ".properties.limit{limitObjectType:LimitValue}") if disc_limit_value is not None: disc_limit_value.set_prop( "limitType", AAZStrType, ".limit_object.limit_type") disc_limit_value.set_prop("value", AAZIntType, ".limit_object.value", typ_kwargs={ "flags": {"required": True}}) name = _builder.get(".properties.name") if name is not None: name.set_prop("value", AAZStrType, ".value") properties = _builder.get(".properties.properties") if properties is not None: properties.set_anytype_elements(".") return self.serialize_content(_content_value) def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.id = AAZStrType( flags={"read_only": True}, ) _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) _schema_on_200.properties = AAZObjectType() _schema_on_200.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200.properties properties.is_quota_applicable = AAZBoolType( serialized_name="isQuotaApplicable", flags={"read_only": True}, ) properties.limit = AAZObjectType() properties.name = AAZObjectType() properties.properties = AAZFreeFormDictType() properties.quota_period = AAZStrType( serialized_name="quotaPeriod", flags={"read_only": True}, ) properties.resource_type = AAZStrType( serialized_name="resourceType", ) properties.unit = AAZStrType( flags={"read_only": True}, ) limit = cls._schema_on_200.properties.limit limit.limit_object_type = AAZStrType( serialized_name="limitObjectType", flags={"required": True}, ) disc_limit_value = cls._schema_on_200.properties.limit.discriminate_by( "limit_object_type", "LimitValue") disc_limit_value.limit_type = AAZStrType( serialized_name="limitType", ) disc_limit_value.value = AAZIntType( flags={"required": True}, ) name = cls._schema_on_200.properties.name name.localized_value = AAZStrType( serialized_name="localizedValue", flags={"read_only": True}, ) name.value = AAZStrType() return cls._schema_on_200
class QuotaCreateOrUpdate(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass @property def content(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
19
0
16
1
15
0
2
0
1
0
0
0
9
1
10
10
185
25
160
38
141
0
79
29
68
6
1
1
18
10,247
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/qumulo/azext_qumulo/tests/latest/test_qumulo.py
azext_qumulo.tests.latest.test_qumulo.QumuloScenario
class QumuloScenario(ScenarioTest): @live_only() @ResourceGroupPreparer(location='eastus') def test_file_system(self): email = self.cmd('account show').get_output_in_json()['user']['name'] self.kwargs.update({ 'vnet': self.create_random_name('vnet', 10), 'subnet': self.create_random_name('subnet', 15), 'sys_name': self.create_random_name('sys', 10), 'email': email }) self.cmd( 'network vnet create -n {vnet} -g {rg} --address-prefix 20.0.0.0/24') subnet_id = self.cmd( 'network vnet subnet create -n {subnet} -g {rg} --address-prefix 20.0.0.0/24 --vnet-name {vnet} --delegations Qumulo.Storage/fileSystems').get_output_in_json()['id'] self.kwargs.update({ 'subnet_id': subnet_id }) self.cmd('qumulo storage file-system create -n {sys_name} -g {rg} --admin-password Password01! ' '--delegated-subnet-id {subnet_id} ' '--marketplace-details {{offerId:qumulo-saas-mpp,planId:azure-native-qumulo-v3%%gmz7xq9ge3py%%P1M,publisherId:qumulo1584033880660}} ' '--storage-sku Hot --user-details "{{email:{email}}}" ' '--availability-zone 1 --tags {{ProvisionResource:55e031c5d497a3508838f44ec8767c84}}', checks=[ self.check('name', '{sys_name}'), self.check('marketplaceDetails.planId', 'azure-native-qumulo-v3'), self.check('marketplaceDetails.offerId', 'qumulo-saas-mpp'), self.check('marketplaceDetails.publisherId', 'qumulo1584033880660'), self.check('delegatedSubnetId', '{subnet_id}'), self.check('storageSku', 'Hot'), self.check('availabilityZone', '1'), self.check('tags.provisionResource', '55e031c5d497a3508838f44ec8767c84') ]) self.cmd('qumulo storage file-system show -n {sys_name} -g {rg}', checks=[ self.check('name', '{sys_name}'), self.check('marketplaceDetails.planId', 'azure-native-qumulo-v3'), self.check('marketplaceDetails.offerId', 'qumulo-saas-mpp'), self.check('marketplaceDetails.publisherId', 'qumulo1584033880660'), self.check('delegatedSubnetId', '{subnet_id}'), self.check('storageSku', 'Hot'), self.check('availabilityZone', '1'), self.check('tags.provisionResource', '55e031c5d497a3508838f44ec8767c84') ]) self.cmd('qumulo storage file-system list -g {rg}', checks=[ self.check('[0].name', '{sys_name}'), self.check('[0].marketplaceDetails.planId', 'azure-native-qumulo-v3'), self.check('[0].marketplaceDetails.offerId', 'qumulo-saas-mpp'), self.check('[0].marketplaceDetails.publisherId', 'qumulo1584033880660'), self.check('[0].delegatedSubnetId', '{subnet_id}'), self.check('[0].storageSku', 'Hot'), self.check('[0].availabilityZone', '1'), self.check('[0].tags.provisionResource', '55e031c5d497a3508838f44ec8767c84') ]) self.cmd('qumulo storage file-system delete -n {sys_name} -g {rg} -y')
class QumuloScenario(ScenarioTest): @live_only() @ResourceGroupPreparer(location='eastus') def test_file_system(self): pass
4
0
49
0
49
0
1
0
1
0
0
0
1
0
1
1
53
1
52
5
48
0
11
4
9
1
1
0
1
10,248
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/qumulo/azext_qumulo/aaz/latest/qumulo/storage/file_system/_wait.py
azext_qumulo.aaz.latest.qumulo.storage.file_system._wait.Wait.FileSystemsGet
class FileSystemsGet(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Qumulo.Storage/fileSystems/{fileSystemName}", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "fileSystemName", self.ctx.args.file_system_name, required=True, ), **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-06-19", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.id = AAZStrType( flags={"read_only": True}, ) _schema_on_200.identity = AAZIdentityObjectType() _schema_on_200.location = AAZStrType( flags={"required": True}, ) _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) _schema_on_200.properties = AAZObjectType( flags={"client_flatten": True}, ) _schema_on_200.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _schema_on_200.tags = AAZDictType() _schema_on_200.type = AAZStrType( flags={"read_only": True}, ) identity = cls._schema_on_200.identity identity.principal_id = AAZStrType( serialized_name="principalId", flags={"read_only": True}, ) identity.tenant_id = AAZStrType( serialized_name="tenantId", flags={"read_only": True}, ) identity.type = AAZStrType( flags={"required": True}, ) identity.user_assigned_identities = AAZDictType( serialized_name="userAssignedIdentities", ) user_assigned_identities = cls._schema_on_200.identity.user_assigned_identities user_assigned_identities.Element = AAZObjectType() _element = cls._schema_on_200.identity.user_assigned_identities.Element _element.client_id = AAZStrType( serialized_name="clientId", flags={"read_only": True}, ) _element.principal_id = AAZStrType( serialized_name="principalId", flags={"read_only": True}, ) properties = cls._schema_on_200.properties properties.admin_password = AAZStrType( serialized_name="adminPassword", flags={"secret": True}, ) properties.availability_zone = AAZStrType( serialized_name="availabilityZone", ) properties.cluster_login_url = AAZStrType( serialized_name="clusterLoginUrl", ) properties.delegated_subnet_id = AAZStrType( serialized_name="delegatedSubnetId", flags={"required": True}, ) properties.marketplace_details = AAZObjectType( serialized_name="marketplaceDetails", flags={"required": True}, ) properties.private_ips = AAZListType( serialized_name="privateIPs", ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) properties.storage_sku = AAZStrType( serialized_name="storageSku", flags={"required": True}, ) properties.user_details = AAZObjectType( serialized_name="userDetails", flags={"required": True}, ) marketplace_details = cls._schema_on_200.properties.marketplace_details marketplace_details.marketplace_subscription_id = AAZStrType( serialized_name="marketplaceSubscriptionId", ) marketplace_details.marketplace_subscription_status = AAZStrType( serialized_name="marketplaceSubscriptionStatus", flags={"read_only": True}, ) marketplace_details.offer_id = AAZStrType( serialized_name="offerId", flags={"required": True}, ) marketplace_details.plan_id = AAZStrType( serialized_name="planId", flags={"required": True}, ) marketplace_details.publisher_id = AAZStrType( serialized_name="publisherId", ) marketplace_details.term_unit = AAZStrType( serialized_name="termUnit", ) private_ips = cls._schema_on_200.properties.private_ips private_ips.Element = AAZStrType() user_details = cls._schema_on_200.properties.user_details user_details.email = AAZStrType( flags={"secret": True}, ) system_data = cls._schema_on_200.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", ) system_data.created_by = AAZStrType( serialized_name="createdBy", ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", ) tags = cls._schema_on_200.tags tags.Element = AAZStrType() return cls._schema_on_200
class FileSystemsGet(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
22
1
21
0
1
0
1
0
0
0
8
0
9
9
222
23
199
35
182
0
81
28
71
2
1
1
11
10,249
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/qumulo/azext_qumulo/aaz/latest/qumulo/storage/file_system/_list.py
azext_qumulo.aaz.latest.qumulo.storage.file_system._list.List.FileSystemsListBySubscription
class FileSystemsListBySubscription(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/providers/Qumulo.Storage/fileSystems", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-06-19", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.next_link = AAZStrType( serialized_name="nextLink", ) _schema_on_200.value = AAZListType( flags={"required": True}, ) value = cls._schema_on_200.value value.Element = AAZObjectType() _element = cls._schema_on_200.value.Element _element.id = AAZStrType( flags={"read_only": True}, ) _element.identity = AAZIdentityObjectType() _element.location = AAZStrType( flags={"required": True}, ) _element.name = AAZStrType( flags={"read_only": True}, ) _element.properties = AAZObjectType( flags={"client_flatten": True}, ) _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _element.tags = AAZDictType() _element.type = AAZStrType( flags={"read_only": True}, ) identity = cls._schema_on_200.value.Element.identity identity.principal_id = AAZStrType( serialized_name="principalId", flags={"read_only": True}, ) identity.tenant_id = AAZStrType( serialized_name="tenantId", flags={"read_only": True}, ) identity.type = AAZStrType( flags={"required": True}, ) identity.user_assigned_identities = AAZDictType( serialized_name="userAssignedIdentities", ) user_assigned_identities = cls._schema_on_200.value.Element.identity.user_assigned_identities user_assigned_identities.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element _element.client_id = AAZStrType( serialized_name="clientId", flags={"read_only": True}, ) _element.principal_id = AAZStrType( serialized_name="principalId", flags={"read_only": True}, ) properties = cls._schema_on_200.value.Element.properties properties.admin_password = AAZStrType( serialized_name="adminPassword", flags={"secret": True}, ) properties.availability_zone = AAZStrType( serialized_name="availabilityZone", ) properties.cluster_login_url = AAZStrType( serialized_name="clusterLoginUrl", ) properties.delegated_subnet_id = AAZStrType( serialized_name="delegatedSubnetId", flags={"required": True}, ) properties.marketplace_details = AAZObjectType( serialized_name="marketplaceDetails", flags={"required": True}, ) properties.private_ips = AAZListType( serialized_name="privateIPs", ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) properties.storage_sku = AAZStrType( serialized_name="storageSku", flags={"required": True}, ) properties.user_details = AAZObjectType( serialized_name="userDetails", flags={"required": True}, ) marketplace_details = cls._schema_on_200.value.Element.properties.marketplace_details marketplace_details.marketplace_subscription_id = AAZStrType( serialized_name="marketplaceSubscriptionId", ) marketplace_details.marketplace_subscription_status = AAZStrType( serialized_name="marketplaceSubscriptionStatus", flags={"read_only": True}, ) marketplace_details.offer_id = AAZStrType( serialized_name="offerId", flags={"required": True}, ) marketplace_details.plan_id = AAZStrType( serialized_name="planId", flags={"required": True}, ) marketplace_details.publisher_id = AAZStrType( serialized_name="publisherId", ) marketplace_details.term_unit = AAZStrType( serialized_name="termUnit", ) private_ips = cls._schema_on_200.value.Element.properties.private_ips private_ips.Element = AAZStrType() user_details = cls._schema_on_200.value.Element.properties.user_details user_details.email = AAZStrType( flags={"secret": True}, ) system_data = cls._schema_on_200.value.Element.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", ) system_data.created_by = AAZStrType( serialized_name="createdBy", ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", ) tags = cls._schema_on_200.value.Element.tags tags.Element = AAZStrType() return cls._schema_on_200
class FileSystemsListBySubscription(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
23
2
21
0
1
0
1
0
0
0
8
0
9
9
225
25
200
36
183
0
86
29
76
2
1
1
11
10,250
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/qumulo/azext_qumulo/aaz/latest/qumulo/storage/file_system/_list.py
azext_qumulo.aaz.latest.qumulo.storage.file_system._list.List.FileSystemsListByResourceGroup
class FileSystemsListByResourceGroup(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Qumulo.Storage/fileSystems", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-06-19", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.next_link = AAZStrType( serialized_name="nextLink", ) _schema_on_200.value = AAZListType( flags={"required": True}, ) value = cls._schema_on_200.value value.Element = AAZObjectType() _element = cls._schema_on_200.value.Element _element.id = AAZStrType( flags={"read_only": True}, ) _element.identity = AAZIdentityObjectType() _element.location = AAZStrType( flags={"required": True}, ) _element.name = AAZStrType( flags={"read_only": True}, ) _element.properties = AAZObjectType( flags={"client_flatten": True}, ) _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _element.tags = AAZDictType() _element.type = AAZStrType( flags={"read_only": True}, ) identity = cls._schema_on_200.value.Element.identity identity.principal_id = AAZStrType( serialized_name="principalId", flags={"read_only": True}, ) identity.tenant_id = AAZStrType( serialized_name="tenantId", flags={"read_only": True}, ) identity.type = AAZStrType( flags={"required": True}, ) identity.user_assigned_identities = AAZDictType( serialized_name="userAssignedIdentities", ) user_assigned_identities = cls._schema_on_200.value.Element.identity.user_assigned_identities user_assigned_identities.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element _element.client_id = AAZStrType( serialized_name="clientId", flags={"read_only": True}, ) _element.principal_id = AAZStrType( serialized_name="principalId", flags={"read_only": True}, ) properties = cls._schema_on_200.value.Element.properties properties.admin_password = AAZStrType( serialized_name="adminPassword", flags={"secret": True}, ) properties.availability_zone = AAZStrType( serialized_name="availabilityZone", ) properties.cluster_login_url = AAZStrType( serialized_name="clusterLoginUrl", ) properties.delegated_subnet_id = AAZStrType( serialized_name="delegatedSubnetId", flags={"required": True}, ) properties.marketplace_details = AAZObjectType( serialized_name="marketplaceDetails", flags={"required": True}, ) properties.private_ips = AAZListType( serialized_name="privateIPs", ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) properties.storage_sku = AAZStrType( serialized_name="storageSku", flags={"required": True}, ) properties.user_details = AAZObjectType( serialized_name="userDetails", flags={"required": True}, ) marketplace_details = cls._schema_on_200.value.Element.properties.marketplace_details marketplace_details.marketplace_subscription_id = AAZStrType( serialized_name="marketplaceSubscriptionId", ) marketplace_details.marketplace_subscription_status = AAZStrType( serialized_name="marketplaceSubscriptionStatus", flags={"read_only": True}, ) marketplace_details.offer_id = AAZStrType( serialized_name="offerId", flags={"required": True}, ) marketplace_details.plan_id = AAZStrType( serialized_name="planId", flags={"required": True}, ) marketplace_details.publisher_id = AAZStrType( serialized_name="publisherId", ) marketplace_details.term_unit = AAZStrType( serialized_name="termUnit", ) private_ips = cls._schema_on_200.value.Element.properties.private_ips private_ips.Element = AAZStrType() user_details = cls._schema_on_200.value.Element.properties.user_details user_details.email = AAZStrType( flags={"secret": True}, ) system_data = cls._schema_on_200.value.Element.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", ) system_data.created_by = AAZStrType( serialized_name="createdBy", ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", ) tags = cls._schema_on_200.value.Element.tags tags.Element = AAZStrType() return cls._schema_on_200
class FileSystemsListByResourceGroup(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
23
2
22
0
1
0
1
0
0
0
8
0
9
9
229
25
204
36
187
0
86
29
76
2
1
1
11
10,251
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/qumulo/azext_qumulo/aaz/latest/qumulo/storage/file_system/_delete.py
azext_qumulo.aaz.latest.qumulo.storage.file_system._delete.Delete.FileSystemsDelete
class FileSystemsDelete(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [202]: return self.client.build_lro_polling( self.ctx.args.no_wait, session, self.on_200_201, self.on_error, lro_options={"final-state-via": "location"}, path_format_arguments=self.url_parameters, ) if session.http_response.status_code in [204]: return self.client.build_lro_polling( self.ctx.args.no_wait, session, self.on_204, self.on_error, lro_options={"final-state-via": "location"}, path_format_arguments=self.url_parameters, ) if session.http_response.status_code in [200, 201]: return self.client.build_lro_polling( self.ctx.args.no_wait, session, self.on_200_201, self.on_error, lro_options={"final-state-via": "location"}, path_format_arguments=self.url_parameters, ) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Qumulo.Storage/fileSystems/{fileSystemName}", **self.url_parameters ) @property def method(self): return "DELETE" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "fileSystemName", self.ctx.args.file_system_name, required=True, ), **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-06-19", required=True, ), } return parameters def on_204(self, session): pass def on_200_201(self, session): pass
class FileSystemsDelete(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass def on_204(self, session): pass def on_200_201(self, session): pass
14
0
9
0
9
0
1
0
1
0
0
0
8
1
8
8
84
9
75
20
61
0
28
14
19
4
1
1
11
10,252
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/qumulo/azext_qumulo/aaz/latest/qumulo/storage/file_system/_create.py
azext_qumulo.aaz.latest.qumulo.storage.file_system._create.Create.FileSystemsCreateOrUpdate
class FileSystemsCreateOrUpdate(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [202]: return self.client.build_lro_polling( self.ctx.args.no_wait, session, self.on_200_201, self.on_error, lro_options={"final-state-via": "azure-async-operation"}, path_format_arguments=self.url_parameters, ) if session.http_response.status_code in [200, 201]: return self.client.build_lro_polling( self.ctx.args.no_wait, session, self.on_200_201, self.on_error, lro_options={"final-state-via": "azure-async-operation"}, path_format_arguments=self.url_parameters, ) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Qumulo.Storage/fileSystems/{fileSystemName}", **self.url_parameters ) @property def method(self): return "PUT" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "fileSystemName", self.ctx.args.file_system_name, required=True, ), **self.serialize_url_param( "resourceGroupName", self.ctx.args.resource_group, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-06-19", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Content-Type", "application/json", ), **self.serialize_header_param( "Accept", "application/json", ), } return parameters @property def content(self): _content_value, _builder = self.new_content_builder( self.ctx.args, typ=AAZObjectType, typ_kwargs={ "flags": {"required": True, "client_flatten": True}} ) _builder.set_prop("identity", AAZIdentityObjectType) _builder.set_prop("location", AAZStrType, ".location", typ_kwargs={ "flags": {"required": True}}) _builder.set_prop("properties", AAZObjectType, typ_kwargs={ "flags": {"client_flatten": True}}) _builder.set_prop("tags", AAZDictType, ".tags") identity = _builder.get(".identity") if identity is not None: identity.set_prop("userAssigned", AAZListType, ".mi_user_assigned", typ_kwargs={ "flags": {"action": "create"}}) identity.set_prop("systemAssigned", AAZStrType, ".mi_system_assigned", typ_kwargs={ "flags": {"action": "create"}}) user_assigned = _builder.get(".identity.userAssigned") if user_assigned is not None: user_assigned.set_elements(AAZStrType, ".") properties = _builder.get(".properties") if properties is not None: properties.set_prop("adminPassword", AAZStrType, ".admin_password", typ_kwargs={ "flags": {"secret": True}}) properties.set_prop("availabilityZone", AAZStrType, ".availability_zone") properties.set_prop("clusterLoginUrl", AAZStrType, ".cluster_login_url") properties.set_prop("delegatedSubnetId", AAZStrType, ".delegated_subnet_id", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("marketplaceDetails", AAZObjectType, ".marketplace_details", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("privateIPs", AAZListType, ".private_ips") properties.set_prop("storageSku", AAZStrType, ".storage_sku", typ_kwargs={ "flags": {"required": True}}) properties.set_prop("userDetails", AAZObjectType, ".user_details", typ_kwargs={ "flags": {"required": True}}) marketplace_details = _builder.get( ".properties.marketplaceDetails") if marketplace_details is not None: marketplace_details.set_prop( "marketplaceSubscriptionId", AAZStrType, ".marketplace_subscription_id") marketplace_details.set_prop("offerId", AAZStrType, ".offer_id", typ_kwargs={ "flags": {"required": True}}) marketplace_details.set_prop("planId", AAZStrType, ".plan_id", typ_kwargs={ "flags": {"required": True}}) marketplace_details.set_prop( "publisherId", AAZStrType, ".publisher_id") marketplace_details.set_prop( "termUnit", AAZStrType, ".term_unit") private_ips = _builder.get(".properties.privateIPs") if private_ips is not None: private_ips.set_elements(AAZStrType, ".") user_details = _builder.get(".properties.userDetails") if user_details is not None: user_details.set_prop("email", AAZStrType, ".email", typ_kwargs={ "flags": {"secret": True}}) tags = _builder.get(".tags") if tags is not None: tags.set_elements(AAZStrType, ".") return self.serialize_content(_content_value) def on_200_201(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200_201 ) _schema_on_200_201 = None @classmethod def _build_schema_on_200_201(cls): if cls._schema_on_200_201 is not None: return cls._schema_on_200_201 cls._schema_on_200_201 = AAZObjectType() _schema_on_200_201 = cls._schema_on_200_201 _schema_on_200_201.id = AAZStrType( flags={"read_only": True}, ) _schema_on_200_201.identity = AAZIdentityObjectType() _schema_on_200_201.location = AAZStrType( flags={"required": True}, ) _schema_on_200_201.name = AAZStrType( flags={"read_only": True}, ) _schema_on_200_201.properties = AAZObjectType( flags={"client_flatten": True}, ) _schema_on_200_201.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _schema_on_200_201.tags = AAZDictType() _schema_on_200_201.type = AAZStrType( flags={"read_only": True}, ) identity = cls._schema_on_200_201.identity identity.principal_id = AAZStrType( serialized_name="principalId", flags={"read_only": True}, ) identity.tenant_id = AAZStrType( serialized_name="tenantId", flags={"read_only": True}, ) identity.type = AAZStrType( flags={"required": True}, ) identity.user_assigned_identities = AAZDictType( serialized_name="userAssignedIdentities", ) user_assigned_identities = cls._schema_on_200_201.identity.user_assigned_identities user_assigned_identities.Element = AAZObjectType() _element = cls._schema_on_200_201.identity.user_assigned_identities.Element _element.client_id = AAZStrType( serialized_name="clientId", flags={"read_only": True}, ) _element.principal_id = AAZStrType( serialized_name="principalId", flags={"read_only": True}, ) properties = cls._schema_on_200_201.properties properties.admin_password = AAZStrType( serialized_name="adminPassword", flags={"secret": True}, ) properties.availability_zone = AAZStrType( serialized_name="availabilityZone", ) properties.cluster_login_url = AAZStrType( serialized_name="clusterLoginUrl", ) properties.delegated_subnet_id = AAZStrType( serialized_name="delegatedSubnetId", flags={"required": True}, ) properties.marketplace_details = AAZObjectType( serialized_name="marketplaceDetails", flags={"required": True}, ) properties.private_ips = AAZListType( serialized_name="privateIPs", ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) properties.storage_sku = AAZStrType( serialized_name="storageSku", flags={"required": True}, ) properties.user_details = AAZObjectType( serialized_name="userDetails", flags={"required": True}, ) marketplace_details = cls._schema_on_200_201.properties.marketplace_details marketplace_details.marketplace_subscription_id = AAZStrType( serialized_name="marketplaceSubscriptionId", ) marketplace_details.marketplace_subscription_status = AAZStrType( serialized_name="marketplaceSubscriptionStatus", flags={"read_only": True}, ) marketplace_details.offer_id = AAZStrType( serialized_name="offerId", flags={"required": True}, ) marketplace_details.plan_id = AAZStrType( serialized_name="planId", flags={"required": True}, ) marketplace_details.publisher_id = AAZStrType( serialized_name="publisherId", ) marketplace_details.term_unit = AAZStrType( serialized_name="termUnit", ) private_ips = cls._schema_on_200_201.properties.private_ips private_ips.Element = AAZStrType() user_details = cls._schema_on_200_201.properties.user_details user_details.email = AAZStrType( flags={"secret": True}, ) system_data = cls._schema_on_200_201.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", ) system_data.created_by = AAZStrType( serialized_name="createdBy", ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", ) tags = cls._schema_on_200_201.tags tags.Element = AAZStrType() return cls._schema_on_200_201
class FileSystemsCreateOrUpdate(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass @property def content(self): pass def on_200_201(self, session): pass @classmethod def _build_schema_on_200_201(cls): pass
19
0
27
2
25
0
2
0
1
0
0
0
9
1
10
10
295
32
263
46
244
0
123
37
112
8
1
1
20
10,253
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/quantum/azext_quantum/tests/latest/test_quantum_workspace.py
azext_quantum.tests.latest.test_quantum_workspace.QuantumWorkspacesScenarioTest
class QuantumWorkspacesScenarioTest(ScenarioTest): @AllowLargeResponse() @live_only() def test_workspace(self): print("test_workspace") # clear self.cmd('az quantum workspace clear') # initialize values test_location = get_test_workspace_location() test_workspace = get_test_workspace() test_resource_group = get_test_resource_group() # list workspaces = self.cmd( f'az quantum workspace list -l {test_location} -o json').get_output_in_json() assert len(workspaces) > 0 self.cmd('az quantum workspace list -o json', checks=[ self.check( f"[?name=='{test_workspace}'].resourceGroup | [0]", test_resource_group) ]) # set self.cmd(f'az quantum workspace set -g {test_resource_group} -w {test_workspace} -l {test_location} -o json', checks=[ self.check("name", test_workspace) ]) # show self.cmd('az quantum workspace show -o json', checks=[ self.check("name", test_workspace) ]) # clear self.cmd('az quantum workspace clear') @live_only() def test_workspace_create_destroy(self): print("test_workspace_create_destroy") # initialize values test_location = get_test_workspace_location() test_resource_group = get_test_resource_group() test_workspace_temp = get_test_workspace_random_name() test_storage_account = get_test_workspace_storage() test_storage_account_grs = get_test_workspace_storage_grs() test_provider_sku_list = get_test_workspace_provider_sku_list() if all_providers_are_in_capabilities(test_provider_sku_list, get_test_capabilities()): # create self.cmd(f'az quantum workspace create -g {test_resource_group} -w {test_workspace_temp} -l {test_location} -a {test_storage_account} -r {test_provider_sku_list} -o json --skip-role-assignment', checks=[ self.check("name", test_workspace_temp), # Status is accepted since we're not linking the storage account. self.check("properties.provisioningState", "Accepted") ]) # set self.cmd(f'az quantum workspace set -g {test_resource_group} -w {test_workspace_temp} -l {test_location} -o json', checks=[ self.check("name", test_workspace_temp) ]) # list quotas results = self.cmd( 'az quantum workspace quotas -o json').get_output_in_json() assert len(results) > 0 assert len(results[0]["dimension"]) > 0 assert (results[0]["holds"]) >= 0.0 # delete self.cmd(f'az quantum workspace delete -g {test_resource_group} -w {test_workspace_temp} -o json', checks=[ self.check("name", test_workspace_temp), self.check("properties.provisioningState", "Deleting") ]) # Create workspace with "--skip-role-assignment" and "--skip-autoadd" parameters test_workspace_temp = get_test_workspace_random_name() self.cmd(f'az quantum workspace create --skip-autoadd -g {test_resource_group} -w {test_workspace_temp} -l {test_location} -a {test_storage_account} -r {test_provider_sku_list} -o json --skip-role-assignment', checks=[ self.check("name", test_workspace_temp), # Status is accepted since we're not linking the storage account. self.check("properties.provisioningState", "Accepted") ]) # delete self.cmd(f'az quantum workspace delete -g {test_resource_group} -w {test_workspace_temp} -o json', checks=[ self.check("name", test_workspace_temp), self.check("properties.provisioningState", "Deleting") ]) # Repeat without the "--skip-role-assignment" or "--skip-autoadd" parameters (Uses ARM template and adds C4A plans) test_workspace_temp = get_test_workspace_random_name() self.cmd(f'az quantum workspace create -g {test_resource_group} -w {test_workspace_temp} -l {test_location} -a {test_storage_account} -r {test_provider_sku_list} -o json', checks=[ self.check("name", DEPLOYMENT_NAME_PREFIX + test_workspace_temp), ]) # delete self.cmd(f'az quantum workspace delete -g {test_resource_group} -w {test_workspace_temp} -o json', checks=[ self.check("name", test_workspace_temp), self.check("properties.provisioningState", "Deleting") ]) # Create a workspace specifying "--skip-autoadd" test_workspace_temp = get_test_workspace_random_name() self.cmd(f'az quantum workspace create --skip-autoadd -g {test_resource_group} -w {test_workspace_temp} -l {test_location} -a {test_storage_account} -r {test_provider_sku_list} -o json', checks=[ self.check("name", DEPLOYMENT_NAME_PREFIX + test_workspace_temp), ]) # delete self.cmd(f'az quantum workspace delete -g {test_resource_group} -w {test_workspace_temp} -o json', checks=[ self.check("name", test_workspace_temp), self.check("properties.provisioningState", "Deleting") ]) # Create a workspace specifying a storage account that is not Standard_LRS test_workspace_temp = get_test_workspace_random_name() self.cmd(f'az quantum workspace create --skip-autoadd -g {test_resource_group} -w {test_workspace_temp} -l {test_location} -a {test_storage_account_grs} -r {test_provider_sku_list} -o json', checks=[ self.check("name", DEPLOYMENT_NAME_PREFIX + test_workspace_temp), ]) # delete self.cmd(f'az quantum workspace delete -g {test_resource_group} -w {test_workspace_temp} -o json', checks=[ self.check("name", test_workspace_temp), self.check("properties.provisioningState", "Deleting") ]) # Create a workspace with a maximum length name, but make sure the deployment name was truncated to a valid length test_workspace_temp = get_test_workspace_random_long_name() self.cmd(f'az quantum workspace create --skip-autoadd -g {test_resource_group} -w {test_workspace_temp} -l {test_location} -a {test_storage_account_grs} -r {test_provider_sku_list} -o json', checks=[ self.check("name", (DEPLOYMENT_NAME_PREFIX + test_workspace_temp)[:64]), ]) # delete self.cmd(f'az quantum workspace delete -g {test_resource_group} -w {test_workspace_temp} -o json', checks=[ self.check("name", test_workspace_temp), self.check("properties.provisioningState", "Deleting") ]) else: self.skipTest( f"Skipping test_workspace_create_destroy: One or more providers in '{test_provider_sku_list}' not found in AZURE_QUANTUM_CAPABILITIES") @live_only() def test_workspace_keys(self): print("test_workspace_keys") # initialize values test_location = get_test_workspace_location() test_resource_group = get_test_resource_group() test_workspace_temp = get_test_workspace_random_name() test_storage_account = get_test_workspace_storage() test_provider_sku_list = get_test_workspace_provider_sku_list() # create self.cmd(f'az quantum workspace create -g {test_resource_group} -w {test_workspace_temp} -l {test_location} -a {test_storage_account} -r {test_provider_sku_list} -o json', checks=[ self.check("properties.provisioningState", "Succeeded") ]) # set self.cmd(f'az quantum workspace set -g {test_resource_group} -w {test_workspace_temp} -l {test_location} -o json', checks=[ self.check("name", test_workspace_temp) ]) # enable api keys self.cmd('az quantum workspace update --enable-api-key True -o json', checks=[ self.check("properties.apiKeyEnabled", True) ]) # list keys self.cmd('az quantum workspace keys list -o json', checks=[ self.check("apiKeyEnabled", True) ]) # regenerate primary keys self.cmd('az quantum workspace keys regenerate --key-type Primary -o json', expect_failure=False) # regenerate secondary keys self.cmd('az quantum workspace keys regenerate --key-type Secondary -o json', expect_failure=False) # regenerate primary and secondary keys self.cmd('az quantum workspace keys regenerate --key-type Primary,Secondary -o json', expect_failure=False) # disable api keys self.cmd('az quantum workspace update --enable-api-key False -o json') self.cmd('az quantum workspace keys list -o json', checks=[ self.check("apiKeyEnabled", False) ]) # delete self.cmd(f'az quantum workspace delete -g {test_resource_group} -w {test_workspace_temp} -o json', checks=[ self.check("name", test_workspace_temp), self.check("properties.provisioningState", "Deleting") ]) # @pytest.fixture(autouse=True) # def _pass_fixtures(self, capsys): # self.capsys = capsys # # See "TODO" in issue_cmd_with_param_missing in utils.py @live_only() def test_workspace_errors(self): print("test_workspace_errors") # initialize values test_location = get_test_workspace_location() test_resource_group = get_test_resource_group() test_workspace_temp = get_test_workspace_random_name() # Attempt to create workspace, but omit the storage account parameter issue_cmd_with_param_missing(self, f'az quantum workspace create -w {test_workspace_temp} -l {test_location} -g {test_resource_group} -r "microsoft-qc/learn-and-develop"', 'az quantum workspace create -g MyResourceGroup -w MyWorkspace -l MyLocation -r "MyProvider1 / MySKU1, MyProvider2 / MySKU2" -a MyStorageAccountName To display a list of available providers and their SKUs, use the following command: az quantum offerings list -l MyLocation -o table\nCreate a new Azure Quantum workspace with a specific list of providers.') @live_only() def test_version_check(self): print("test_version_check") # initialize values test_old_date = "2021-04-01" test_today = str(datetime.today()).split(' ')[0] test_old_reported_version = "0.1.0" test_current_reported_version = CLI_REPORTED_VERSION test_none_version = None test_config = None message = check_version( test_config, test_current_reported_version, test_old_date) assert message is None message = check_version( test_config, test_old_reported_version, test_old_date) assert message is None # NOTE: The behavior of this test case changed during April 2022, cause unknown. # Temporary fix was: # assert message == f"\nVersion {test_old_reported_version} of the quantum extension is installed locally, but version {test_current_reported_version} is now available.\nYou can use 'az extension update -n quantum' to upgrade.\n" # No message is generated if either version number is unavailable. message = check_version(test_config, test_none_version, test_today) assert message is None def test_validate_storage_account(self): print("test_validate_storage_account") # Calls with valid parameters should not raise errors _validate_storage_account( 'tier', 'Standard', SUPPORTED_STORAGE_SKU_TIERS) _validate_storage_account('kind', 'Storage', SUPPORTED_STORAGE_KINDS) _validate_storage_account('kind', 'StorageV2', SUPPORTED_STORAGE_KINDS) # Invalid parameters should raise errors try: _validate_storage_account( 'tier', 'Premium', SUPPORTED_STORAGE_SKU_TIERS) assert False except InvalidArgumentValueError as e: assert str( e) == "Storage account tier 'Premium' is not supported.\nStorage account tier currently supported: Standard" try: _validate_storage_account( 'kind', 'BlobStorage', SUPPORTED_STORAGE_KINDS) assert False except InvalidArgumentValueError as e: assert str( e) == "Storage account kind 'BlobStorage' is not supported.\nStorage account kinds currently supported: Storage, StorageV2" def test_autoadd_providers(self): print("test_autoadd_providers") test_managed_application = TestManagedApplicationDescription( None, None) test_skus = [TestSkuDescription(None, False)] test_provider_properties = TestPropertyDescription( test_managed_application, test_skus) test_provider = TestProviderDescription("", test_provider_properties) # Populate providers_in_region with an auto_add provider: test_provider.id = "foo" test_provider.properties.managed_application.offer_id = "foo_offer" test_provider.properties.managed_application.publisher_id = "foo0123456789" test_provider.properties.skus[0].id = "foo_credits_for_all_plan" test_provider.properties.skus[0].auto_add = True providers_in_region = [] providers_in_region.append(test_provider) providers_selected = [] cmd = None workspace_location = None _autoadd_providers(cmd, providers_in_region, providers_selected, workspace_location, True) assert providers_selected[0] == { "provider_id": "foo", "sku": "foo_credits_for_all_plan", "offer_id": "foo_offer", "publisher_id": "foo0123456789"}
class QuantumWorkspacesScenarioTest(ScenarioTest): @AllowLargeResponse() @live_only() def test_workspace(self): pass @live_only() def test_workspace_create_destroy(self): pass @live_only() def test_workspace_keys(self): pass @live_only() def test_workspace_errors(self): pass @live_only() def test_version_check(self): pass def test_validate_storage_account(self): pass def test_autoadd_providers(self): pass
14
0
35
5
24
6
1
0.27
1
6
4
0
7
0
7
7
264
44
175
48
161
47
115
42
107
3
1
1
10
10,254
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/quantum/azext_quantum/tests/latest/test_quantum_targets.py
azext_quantum.tests.latest.test_quantum_targets.QuantumTargetsScenarioTest
class QuantumTargetsScenarioTest(ScenarioTest): @live_only() def test_targets(self): # set current workspace: self.cmd( f'az quantum workspace set -g {get_test_resource_group()} -w {get_test_workspace()} -l {get_test_workspace_location()}') # clear current target self.cmd('az quantum target clear') # list targets = self.cmd( 'az quantum target list -o json').get_output_in_json() assert len(targets) > 0 # set self.cmd('az quantum target set -t microsoft.dft -o json', checks=[ self.check("targetId", "microsoft.dft") ]) # show self.cmd('az quantum target show -o json', checks=[ self.check("targetId", "microsoft.dft") ]) # clear self.cmd('az quantum target clear') # show self.cmd('az quantum target show -t microsoft.dft -o json', checks=[ self.check("targetId", "microsoft.dft") ]) def test_target_errors(self): self.cmd('az quantum target clear') issue_cmd_with_param_missing( self, "az quantum target set", "az quantum target set -t target-id\nSelect a default when submitting jobs to Azure Quantum.") @live_only() def test_get_provider(self): test_resource_group = get_test_resource_group() test_location = get_test_workspace_location() test_storage = get_test_workspace_storage() test_target_provider_sku_list = get_test_target_provider_sku_list() test_workspace_temp = get_test_workspace_random_name() self.cmd( f'az quantum workspace create -g {test_resource_group} -w {test_workspace_temp} -l {test_location} -a {test_storage} -r "{test_target_provider_sku_list}"') test_target = get_test_target_target() test_expected_provider = get_test_target_provider() test_returned_provider = get_provider( self, test_target, test_resource_group, test_workspace_temp, test_location) assert test_returned_provider == test_expected_provider test_target = "nonexistant.target" test_expected_provider = None test_returned_provider = get_provider( self, test_target, test_resource_group, test_workspace_temp, test_location) assert test_returned_provider == test_expected_provider self.cmd( f'az quantum workspace delete -g {test_resource_group} -w {test_workspace_temp}')
class QuantumTargetsScenarioTest(ScenarioTest): @live_only() def test_targets(self): pass def test_target_errors(self): pass @live_only() def test_get_provider(self): pass
6
0
17
3
11
2
1
0.19
1
0
0
0
3
0
3
3
57
13
37
15
31
7
29
13
25
1
1
0
3
10,255
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/quantum/azext_quantum/tests/latest/test_quantum_jobs.py
azext_quantum.tests.latest.test_quantum_jobs.QuantumJobsScenarioTest
class QuantumJobsScenarioTest(ScenarioTest): @live_only() def test_jobs(self): # set current workspace: self.cmd( f'az quantum workspace set -g {get_test_resource_group()} -w {get_test_workspace()} -l {get_test_workspace_location()}') # list targets = self.cmd( 'az quantum target list -o json').get_output_in_json() assert len(targets) > 0 # @pytest.fixture(autouse=True) # def _pass_fixtures(self, capsys): # self.capsys = capsys # # See "TODO" in issue_cmd_with_param_missing un utils.py def test_job_errors(self): issue_cmd_with_param_missing( self, "az quantum job cancel", "az quantum job cancel -g MyResourceGroup -w MyWorkspace -l MyLocation -j yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy\nCancel an Azure Quantum job by id.") issue_cmd_with_param_missing( self, "az quantum job output", "az quantum job output -g MyResourceGroup -w MyWorkspace -l MyLocation -j yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy -o table\nPrint the results of a successful Azure Quantum job.") issue_cmd_with_param_missing( self, "az quantum job show", "az quantum job show -g MyResourceGroup -w MyWorkspace -l MyLocation -j yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --query status\nGet the status of an Azure Quantum job.") issue_cmd_with_param_missing( self, "az quantum job wait", "az quantum job wait -g MyResourceGroup -w MyWorkspace -l MyLocation -j yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --max-poll-wait-secs 60 -o table\nWait for completion of a job, check at 60 second intervals.") def test_parse_blob_url(self): sas = "sv=2018-03-28&sr=c&sig=some-sig&sp=racwl" url = f"https://accountname.blob.core.windows.net/containername/rawOutputData?{sas}" args = _parse_blob_url(url) self.assertEqual(args['account_name'], "accountname") self.assertEqual(args['container'], "containername") self.assertEqual(args['blob'], "rawOutputData") self.assertEqual(args['sas_token'], sas) def test_transform_output(self): # Call with a good histogram test_job_results = '{"Histogram":["[0,0,0]",0.125,"[1,0,0]",0.125,"[0,1,0]",0.125,"[1,1,0]",0.125]}' table = transform_output(json.loads(test_job_results)) table_row = table[0] hist_row = table_row[''] second_char = hist_row[1] # Expecting a "Full Block" character here self.assertEqual(second_char, "\u2588") # Give it a malformed histogram test_job_results = '{"Histogram":["[0,0,0]",0.125,"[1,0,0]",0.125,"[0,1,0]",0.125,"[1,1,0]"]}' table = transform_output(json.loads(test_job_results)) # No transform should be done if input param is bad self.assertEqual(table, json.loads(test_job_results)) # Call with output from a failed job test_job_results = \ '{\ "beginExecutionTime": "2022-02-25T18:57:26.093000+00:00",\ "cancellationTime": null,\ "containerUri": "https://foo...",\ "costEstimate": null,\ "creationTime": "2022-02-25T18:56:53.275035+00:00",\ "endExecutionTime": "2022-02-25T18:57:26.093000+00:00",\ "errorData": {\ "code": "InsufficientResources",\ "message": "Too many qubits requested"\ },\ "id": "11111111-2222-3333-4444-555555555555",\ "inputDataFormat": "microsoft.ionq-ir.v2",\ "inputDataUri": "https://bar...",\ "inputParams": {\ "shots": "500"\ },\ "isCancelling": false,\ "metadata": {\ "entryPointInput": {\"Qubits\":null},\ "outputMappingBlobUri": "https://baz..."\ },\ "name": "",\ "outputDataFormat": "microsoft.quantum-results.v1",\ "outputDataUri": "https://quux...",\ "providerId": "ionq",\ "status": "Failed",\ "tags": [],\ "target": "ionq.simulator"\ }' table = transform_output(json.loads(test_job_results)) self.assertEqual(table['Status'], "Failed") self.assertEqual(table['Error Code'], "InsufficientResources") self.assertEqual(table['Error Message'], "Too many qubits requested") self.assertEqual(table['Target'], "ionq.simulator") self.assertEqual( table['Job ID'], "11111111-2222-3333-4444-555555555555") self.assertEqual(table['Submission Time'], "2022-02-25T18:56:53.275035+00:00") # Call with missing "status", "code", "message", "target", "id", and "creationTime" test_job_results = \ '{\ "beginExecutionTime": "2022-02-25T18:57:26.093000+00:00",\ "cancellationTime": null,\ "containerUri": "https://foo...",\ "costEstimate": null,\ "endExecutionTime": "2022-02-25T18:57:26.093000+00:00",\ "errorData": {\ },\ "inputDataFormat": "microsoft.ionq-ir.v2",\ "inputDataUri": "https://bar...",\ "inputParams": {\ "shots": "500"\ },\ "isCancelling": false,\ "metadata": {\ "entryPointInput": {\"Qubits\":null},\ "outputMappingBlobUri": "https://baz..."\ },\ "name": "",\ "outputDataFormat": "microsoft.quantum-results.v1",\ "outputDataUri": "https://quux...",\ "providerId": "ionq",\ "tags": []\ }' table = transform_output(json.loads(test_job_results)) notFound = "Not found" self.assertEqual(table['Status'], notFound) self.assertEqual(table['Error Code'], notFound) self.assertEqual(table['Error Message'], notFound) self.assertEqual(table['Target'], notFound) self.assertEqual(table['Job ID'], notFound) self.assertEqual(table['Submission Time'], notFound) def test_validate_max_poll_wait_secs(self): wait_secs = _validate_max_poll_wait_secs(1) self.assertEqual(type(wait_secs), float) self.assertEqual(wait_secs, 1.0) wait_secs = _validate_max_poll_wait_secs("60") self.assertEqual(type(wait_secs), float) self.assertEqual(wait_secs, 60.0) # Invalid values should raise errors try: wait_secs = _validate_max_poll_wait_secs(0.999999999) assert False except InvalidArgumentValueError as e: assert str( e) == "--max-poll-wait-secs parameter is not valid: 0.999999999" try: wait_secs = _validate_max_poll_wait_secs(-1.0) assert False except InvalidArgumentValueError as e: assert str(e) == "--max-poll-wait-secs parameter is not valid: -1.0" try: wait_secs = _validate_max_poll_wait_secs("foobar") assert False except InvalidArgumentValueError as e: assert str( e) == "--max-poll-wait-secs parameter is not valid: foobar" def test_convert_numeric_params(self): # Show that it converts numeric strings, but doesn't modify params that are already numeric test_job_params = {"integer1": "1", "float1.5": "1.5", "integer2": 2, "float2.5": 2.5, "integer3": "3", "float3.5": "3.5"} _convert_numeric_params(test_job_params) assert test_job_params == {"integer1": 1, "float1.5": 1.5, "integer2": 2, "float2.5": 2.5, "integer3": 3, "float3.5": 3.5} # Make sure it doesn't modify non-numeric strings test_job_params = {"string1": "string_value1", "string2": "string_value2", "string3": "string_value3"} _convert_numeric_params(test_job_params) assert test_job_params == {"string1": "string_value1", "string2": "string_value2", "string3": "string_value3"} # Make sure it doesn't modify the "tags" list test_job_params = {"string1": "string_value1", "tags": [ "tag1", "tag2", "3", "4"], "integer1": "1"} _convert_numeric_params(test_job_params) assert test_job_params == {"string1": "string_value1", "tags": [ "tag1", "tag2", "3", "4"], "integer1": 1} # Make sure it doesn't modify nested dict like metadata uses test_job_params = {"string1": "string_value1", "metadata": { "meta1": "meta_value1", "meta2": "2"}, "integer1": "1"} _convert_numeric_params(test_job_params) assert test_job_params == {"string1": "string_value1", "metadata": { "meta1": "meta_value1", "meta2": "2"}, "integer1": 1} @live_only() def test_submit(self): test_location = get_test_workspace_location() test_resource_group = get_test_resource_group() test_workspace_temp = get_test_workspace_random_name() test_provider_sku_list = "rigetti/azure-quantum-credits,ionq/aq-internal-testing" test_storage = get_test_workspace_storage() self.cmd( f"az quantum workspace create -g {test_resource_group} -w {test_workspace_temp} -l {test_location} -a {test_storage} -r {test_provider_sku_list} --skip-autoadd") self.cmd( f"az quantum workspace set -g {test_resource_group} -w {test_workspace_temp} -l {test_location}") # Submit a job to Rigetti and look for SAS tokens in URIs in the output results = self.cmd("az quantum job submit -t rigetti.sim.qvm --job-input-format rigetti.quil.v1 -t rigetti.sim.qvm --job-input-file src/quantum/azext_quantum/tests/latest/input_data/bell-state.quil --job-output-format rigetti.quil-results.v1 -o json").get_output_in_json() self.assertIn("?sv=", results["containerUri"]) self.assertIn("&st=", results["containerUri"]) self.assertIn("&se=", results["containerUri"]) self.assertIn("&sp=", results["containerUri"]) self.assertIn("&sig=", results["containerUri"]) self.assertIn("?sv=", results["inputDataUri"]) self.assertIn("&st=", results["inputDataUri"]) self.assertIn("&se=", results["inputDataUri"]) self.assertIn("&sp=", results["inputDataUri"]) self.assertIn("&sig=", results["inputDataUri"]) self.assertIn("?sv=", results["outputDataUri"]) self.assertIn("&st=", results["outputDataUri"]) self.assertIn("&se=", results["outputDataUri"]) self.assertIn("&sp=", results["outputDataUri"]) self.assertIn("&sig=", results["outputDataUri"]) # Run a Quil pass-through job on Rigetti results = self.cmd("az quantum run -t rigetti.sim.qvm --job-input-format rigetti.quil.v1 -t rigetti.sim.qvm --job-input-file src/quantum/azext_quantum/tests/latest/input_data/bell-state.quil --job-output-format rigetti.quil-results.v1 -o json").get_output_in_json() self.assertIn("ro", results) # Run a Qiskit pass-through job on IonQ results = self.cmd("az quantum run -t ionq.simulator --shots 100 --job-input-format ionq.circuit.v1 --job-input-file src/quantum/azext_quantum/tests/latest/input_data/Qiskit-3-qubit-GHZ-circuit.json --job-output-format ionq.quantum-results.v1 --job-params count=100 content-type=application/json -o json").get_output_in_json() self.assertIn("histogram", results) # Test "az quantum job list" output, for filter-params, --skip, --top, and --orderby results = self.cmd( "az quantum job list --provider-id rigetti -o json").get_output_in_json() self.assertIn("rigetti", str(results)) results = self.cmd( "az quantum job list --target-id ionq.simulator -o json").get_output_in_json() self.assertIn("ionq.simulator", str(results)) results = str( self.cmd("az quantum job list --top 1 -o json").get_output_in_json()) self.assertIn("rigetti", results) self.assertTrue("ionq" not in results) results = str( self.cmd("az quantum job list --skip 1 -o json").get_output_in_json()) self.assertIn("ionq", results) results = str(self.cmd( "az quantum job list --orderby Target --skip 1 -o json").get_output_in_json()) self.assertIn("rigetti", results) self.assertTrue("ionq" not in results) self.cmd( f'az quantum workspace delete -g {test_resource_group} -w {test_workspace_temp}') @live_only() def test_submit_dft(self): elements_provider_name = "microsoft-elements" elements_capability_name = f"submit.{elements_provider_name}" test_capabilities = get_test_capabilities() if elements_capability_name not in test_capabilities.split(";"): self.skipTest( f"Skipping test_submit_dft: \"{elements_capability_name}\" capability was not found in \"AZURE_QUANTUM_CAPABILITIES\" env variable.") test_location = get_test_workspace_location_for_dft() test_resource_group = get_test_resource_group() test_workspace_temp = get_test_workspace_random_name() test_provider_sku_list = f"{elements_provider_name}/elements-internal-testing" test_storage = get_test_workspace_storage() self.cmd( f"az quantum workspace create -g {test_resource_group} -w {test_workspace_temp} -l {test_location} -a {test_storage} -r \"{test_provider_sku_list}\" --skip-autoadd") self.cmd( f"az quantum workspace set -g {test_resource_group} -w {test_workspace_temp} -l {test_location}") # Run a "microsoft.dft" job to test that successful job returns proper output results = self.cmd( "az quantum run -t microsoft.dft --job-input-format microsoft.xyz.v1 --job-output-format microsoft.dft-results.v1 --job-input-file src/quantum/azext_quantum/tests/latest/input_data/dft_molecule_success.xyz --job-params {{\\\"tasks\\\":[{{\\\"taskType\\\":\\\"spe\\\",\\\"basisSet\\\":{{\\\"name\\\":\\\"def2-svp\\\",\\\"cartesian\\\":false}},\\\"xcFunctional\\\":{{\\\"name\\\":\\\"m06-2x\\\",\\\"gridLevel\\\":4}},\\\"scf\\\":{{\\\"method\\\":\\\"rks\\\",\\\"maxSteps\\\":100,\\\"convergeThreshold\\\":1e-8}}}}]}} -o json").get_output_in_json() self.assertIsNotNone(results["results"]) self.assertTrue(len(results["results"]) == 1) self.assertTrue(results["results"][0]["success"]) # Run a "microsoft.dft" job to test that failed run returns "Job"-object if job didn't produce any output # In the test case below the run doesn't produce any output since the job fails on input parameter validation (i.e. taskType: "invalidTask") results = self.cmd( "az quantum run -t microsoft.dft --job-input-format microsoft.xyz.v1 --job-output-format microsoft.dft-results.v1 --job-input-file src/quantum/azext_quantum/tests/latest/input_data/dft_molecule_success.xyz --job-params {{\\\"tasks\\\":[{{\\\"taskType\\\":\\\"invalidTask\\\",\\\"basisSet\\\":{{\\\"name\\\":\\\"def2-svp\\\",\\\"cartesian\\\":false}},\\\"xcFunctional\\\":{{\\\"name\\\":\\\"m06-2x\\\",\\\"gridLevel\\\":4}},\\\"scf\\\":{{\\\"method\\\":\\\"rks\\\",\\\"maxSteps\\\":100,\\\"convergeThreshold\\\":1e-8}}}}]}} -o json").get_output_in_json() # the object is a "Job"-object self.assertEqual("Job", results["itemType"]) self.assertEqual("Failed", results["status"]) self.assertIsNotNone(results["errorData"]) self.assertEqual("InvalidInputData", results["errorData"]["code"]) self.assertEqual("microsoft.dft", results["target"]) # Run a "microsoft.dft" job to test that failed run returns output if it was produced by the job # In the test case below the job fails to converge in "maxSteps", but it still produces the output with a detailed message results = self.cmd( "az quantum run -t microsoft.dft --job-input-format microsoft.xyz.v1 --job-output-format microsoft.dft-results.v1 --job-input-file src/quantum/azext_quantum/tests/latest/input_data/dft_molecule_failure.xyz --job-params {{\\\"tasks\\\":[{{\\\"taskType\\\":\\\"go\\\",\\\"basisSet\\\":{{\\\"name\\\":\\\"def2-tzvpp\\\",\\\"cartesian\\\":false}},\\\"xcFunctional\\\":{{\\\"name\\\":\\\"m06-2x\\\",\\\"gridLevel\\\":4}},\\\"scf\\\":{{\\\"method\\\":\\\"rks\\\",\\\"maxSteps\\\":5,\\\"convergeThreshold\\\":1e-8}},\\\"geometryOptimization\\\":{{\\\"gdiis\\\":false}}}}]}} -o json").get_output_in_json() # the object is not a "Job"-object self.assertTrue( "itemType" not in results or results["itemType"] != "Job") self.assertIsNotNone(results["results"]) self.assertTrue(len(results["results"]) == 1) self.assertFalse(results["results"][0]["success"]) self.cmd( f'az quantum workspace delete -g {test_resource_group} -w {test_workspace_temp}') def test_job_list_param_formating(self): # Validate filter query formatting for each param # # Should return None if params are set to None job_type = None item_type = None provider_id = None target_id = None job_status = None created_after = None created_before = None job_name = None query = _construct_filter_query( job_type, item_type, provider_id, target_id, job_status, created_after, created_before, job_name) assert query is None job_type = "QuantumComputing" query = _construct_filter_query( job_type, item_type, provider_id, target_id, job_status, created_after, created_before, job_name) assert query == "JobType eq 'QuantumComputing'" job_type = None item_type = "job" query = _construct_filter_query( job_type, item_type, provider_id, target_id, job_status, created_after, created_before, job_name) assert query == "ItemType eq 'job'" item_type = None provider_id = "Microsoft" query = _construct_filter_query( job_type, item_type, provider_id, target_id, job_status, created_after, created_before, job_name) assert query == "ProviderId eq 'Microsoft'" provider_id = None target_id = "Awesome.Quantum.SuperComputer" query = _construct_filter_query( job_type, item_type, provider_id, target_id, job_status, created_after, created_before, job_name) assert query == "Target eq 'Awesome.Quantum.SuperComputer'" target_id = None job_status = "Succeeded" query = _construct_filter_query( job_type, item_type, provider_id, target_id, job_status, created_after, created_before, job_name) assert query == "State eq 'Succeeded'" job_status = None created_after = "2025-01-27" query = _construct_filter_query( job_type, item_type, provider_id, target_id, job_status, created_after, created_before, job_name) assert query == "CreationTime ge 2025-01-27" created_after = None created_before = "2025-01-27" query = _construct_filter_query( job_type, item_type, provider_id, target_id, job_status, created_after, created_before, job_name) assert query == "CreationTime le 2025-01-27" created_before = None job_name = "TestJob" query = _construct_filter_query( job_type, item_type, provider_id, target_id, job_status, created_after, created_before, job_name) assert query == "startswith(Name, 'TestJob')" job_name = None # Validate orderby expression formatting # Should return None if params are set to None orderby = None order = None orderby_expression = _construct_orderby_expression(orderby, order) assert orderby_expression is None # Test valid params orderby = "Target" orderby_expression = _construct_orderby_expression(orderby, order) assert orderby_expression == "Target" order = "asc" orderby_expression = _construct_orderby_expression(orderby, order) assert orderby_expression == "Target asc" order = "desc" orderby_expression = _construct_orderby_expression(orderby, order) assert orderby_expression == "Target desc" # Test orderby/order errors orderby = "Target" order = "foo" try: orderby_expression = _construct_orderby_expression(orderby, order) assert False except InvalidArgumentValueError as e: assert str(e) == ERROR_MSG_INVALID_ORDER_ARGUMENT orderby = "" order = "desc" try: orderby_expression = _construct_orderby_expression(orderby, order) assert False except RequiredArgumentMissingError as e: assert str(e) == ERROR_MSG_MISSING_ORDERBY_ARGUMENT
class QuantumJobsScenarioTest(ScenarioTest): @live_only() def test_jobs(self): pass def test_job_errors(self): pass def test_parse_blob_url(self): pass def test_transform_output(self): pass def test_validate_max_poll_wait_secs(self): pass def test_convert_numeric_params(self): pass @live_only() def test_submit(self): pass @live_only() def test_submit_dft(self): pass def test_job_list_param_formating(self): pass
13
0
37
5
29
3
2
0.13
1
3
0
0
9
0
9
9
348
56
262
54
249
34
205
49
195
4
1
1
15
10,256
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/purview/azext_purview/tests/latest/test_purview_scenario.py
azext_purview.tests.latest.test_purview_scenario.TestPurviewScenario
class TestPurviewScenario(ScenarioTest): @ResourceGroupPreparer(name_prefix='cli_test_purview', location='eastus2') def test_purview_account(self, resource_group): self.kwargs.update({ 'purview': self.create_random_name('pv-', 10) }) purview_account = self.cmd('purview account create -n {purview} -g {rg}', checks=[ self.check('friendlyName', '{purview}'), self.check( "contains(id, 'resourceGroups/{rg}/providers/Microsoft.Purview/accounts/{purview}')", True), self.check('name', '{purview}'), self.check('tags', None), self.check('location', 'eastus2'), self.check('resourceGroup', '{rg}'), self.check('provisioningState', 'Creating') ]).get_output_in_json() self.cmd('purview account wait --created -g {rg} -n {purview}') self.cmd('purview account update -n {purview} -g {rg} --tags tag=test', checks=[ self.check('friendlyName', '{purview}'), self.check( "contains(id, 'resourceGroups/{rg}/providers/Microsoft.Purview/accounts/{purview}')", True), self.check('name', '{purview}'), self.check('tags', {'tag': 'test'}) ]) self.kwargs.update({ 'purview_id': purview_account['createdByObjectId'] }) self.cmd( 'purview account add-root-collection-admin -n {purview} -g {rg} --object-id {purview_id}') self.cmd('purview account list-key -n {purview} -g {rg}', checks=[ self.check("length(@)", 2), ]) self.cmd('purview account show -n {purview} -g {rg}', checks=[ self.check('createdByObjectId', purview_account['createdByObjectId']), self.check('friendlyName', '{purview}'), self.check( "contains(id, 'resourceGroups/{rg}/providers/Microsoft.Purview/accounts/{purview}')", True), self.check('name', '{purview}') ]) self.cmd('purview account list', checks=[ self.check('type(@)', 'array') ]) self.cmd('purview account delete -g {rg} -n {purview} --y') @ResourceGroupPreparer(name_prefix='cli_test_purview', location='eastus2') def test_purview_default_account(self, resource_group): self.kwargs.update({ 'purview': self.create_random_name('pv-', 10) }) purview_account = self.cmd('purview account create -n {purview} -g {rg}', checks=[ self.check('friendlyName', '{purview}'), self.check( "contains(id, 'resourceGroups/{rg}/providers/Microsoft.Purview/accounts/{purview}')", True), self.check('name', '{purview}'), self.check('tags', None), self.check('location', 'eastus2'), self.check('resourceGroup', '{rg}'), self.check('provisioningState', 'Creating') ]).get_output_in_json() self.cmd('purview account wait --created -g {rg} -n {purview}') self.kwargs.update({ 'tenant_id': purview_account['identity']['tenantId'] }) self.cmd('purview default-account set -n {purview} -g {rg} ' '--subscription-id 0b1f6471-1bf0-4dda-aec3-cb9272f09590 --scope-tenant-id {tenant_id}', checks=[ self.check('accountName', '{purview}'), self.check('resourceGroupName', '{rg}'), self.check('scopeTenantId', purview_account['identity']['tenantId']), self.check('scopeType', 'Tenant') ]) self.cmd('purview default-account show --scope-tenant-id {tenant_id} --scope-type Tenant', checks=[ self.check('accountName', '{purview}'), self.check('resourceGroupName', '{rg}'), self.check('scopeTenantId', purview_account['identity']['tenantId']), self.check('scopeType', 'Tenant') ]) self.cmd( 'purview default-account remove --scope-tenant-id {tenant_id} --scope-type Tenant') self.cmd('purview account delete -g {rg} -n {purview} --y')
class TestPurviewScenario(ScenarioTest): @ResourceGroupPreparer(name_prefix='cli_test_purview', location='eastus2') def test_purview_account(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_purview', location='eastus2') def test_purview_default_account(self, resource_group): pass
5
0
39
5
35
0
1
0
1
0
0
0
2
0
2
2
84
12
72
7
67
0
21
5
18
1
1
0
2
10,257
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/providerhub/azext_providerhub/tests/latest/test_providerhub_scenario_updated.py
azext_providerhub.tests.latest.test_providerhub_scenario_updated.ProviderHubScenario
class ProviderHubScenario(ScenarioTest): def __init__(self, method_name, config_file=None, recording_dir=None, recording_name=None, recording_processors=None, replay_processors=None, recording_patches=None, replay_patches=None): super(ProviderHubScenario, self).__init__( method_name ) self.kwargs.update({ 'subscription_id': self.get_subscription_id() }) self.kwargs.update({ 'providerNamespace': 'Private.VPTest', 'resourceType': 'employees', 'customRolloutName': 'canaryTesting01', 'defaultRolloutName': 'cliDefaultRollout', 'region': 'eastus2euap', 'notificationRegistration': 'testNotificationRegistration', 'nestedResourceType': 'nestedResourceType', 'skuName': 'default' }) # EXAMPLE: /providerhub/post/GenerateManifest @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_manifest') def test_step_manifest_generate(self, resource_group): self.cmd( 'az providerhub manifest generate --provider-namespace "{providerNamespace}"') # EXAMPLE: /providerhub/post/CheckinManifest @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_manifest') def test_step_manifest_checkin(self, resource_group): self.cmd( 'az providerhub manifest checkin --provider-namespace "{providerNamespace}" --environment "Canary"') @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_authorized_application') def test_step_authorized_application_create(self, resource_group): self.cmd('az providerhub authorized-application create ' '-n "8b51e6a7-7814-42bd-aa17-3fb1837b3b7a" ' '--data-authorizations "[{{role:ServiceOwner}}]" ' '--provider-namespace "{providerNamespace}" ') @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_authorized_application') def test_step_authorized_application_show(self, resource_group): self.cmd('az providerhub authorized-application show ' '-n "8b51e6a7-7814-42bd-aa17-3fb1837b3b7a" ' '--provider-namespace "{providerNamespace}"') @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_authorized_application') def test_step_authorized_application_list(self, resource_group): self.cmd('az providerhub authorized-application list ' '--provider-namespace "{providerNamespace}"') @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_authorized_application') def test_step_authorized_application_delete(self, resource_group): self.cmd('az providerhub authorized-application delete -y ' '-n "8b51e6a7-7814-42bd-aa17-3fb1837b3b7a" ' '--provider-namespace "{providerNamespace}" ') # EXAMPLE: /CustomRollouts/put/CustomRollouts_CreateOrUpdate @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_custom_rollout') def test_step_custom_rollout_create(self, resource_group): self.cmd('az providerhub custom-rollout create ' '--provider-namespace "{providerNamespace}" ' '--rollout-name "{customRolloutName}" ' '--canary region="EastUS2EUAP" region="centraluseuap"') # EXAMPLE: /CustomRollouts/get/CustomRollouts_Get @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_custom_rollout') def test_step_custom_rollout_show(self, resource_group): self.cmd('az providerhub custom-rollout show ' '--provider-namespace "{providerNamespace}" ' '--rollout-name "{customRolloutName}"') # EXAMPLE: /CustomRollouts/get/CustomRollouts_ListByProviderRegistration @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_custom_rollout') def test_step_custom_rollout_list(self, resource_group): self.cmd('az providerhub custom-rollout list ' '--provider-namespace "{providerNamespace}"') # EXAMPLE: /DefaultRollouts/put/DefaultRollouts_CreateOrUpdate @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_default_rollout') def test_step_default_rollout_create(self, resource_group): self.cmd('az providerhub default-rollout create ' '--provider-namespace "{providerNamespace}" ' '--rollout-name "{defaultRolloutName}" ') # EXAMPLE: /DefaultRollouts/get/DefaultRollouts_Get @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_default_rollout') def test_step_default_rollout_show(self, resource_group): self.cmd('az providerhub default-rollout show ' '--provider-namespace "{providerNamespace}" ' '--rollout-name "{defaultRolloutName}"') # EXAMPLE: /DefaultRollouts/get/DefaultRollouts_ListByProviderRegistration @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_default_rollout') def test_step_default_rollout_list(self, resource_group): self.cmd('az providerhub default-rollout list ' '--provider-namespace "{providerNamespace}"') # EXAMPLE: /DefaultRollouts/post/DefaultRollouts_Stop @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_default_rollout') def test_step_default_rollout_stop(self, resource_group): self.cmd('az providerhub default-rollout stop ' '--provider-namespace "{providerNamespace}" ' '--rollout-name "{defaultRolloutName}"') # EXAMPLE: /DefaultRollouts/delete/DefaultRollouts_Delete @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_default_rollout') def test_step_default_rollout_delete(self, resource_group): self.cmd('az providerhub default-rollout delete -y ' '--provider-namespace "{providerNamespace}" ' '--rollout-name "{defaultRolloutName}"') # EXAMPLE: /Operations/put/Operations_CreateOrUpdate @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_operations') def test_step_operation_create(self, resource_group): self.cmd('az providerhub operation create ' '--contents "[{{\\"name\\":\\"Private.VPTest/Employees/Read\\",\\"display\\":{{\\"default\\":{{\\"description\\":\\"Rea' 'd employees\\",\\"operation\\":\\"Gets/List employee resources\\",\\"provider\\":\\"Private.VPTest\\",' '\\"resource\\":\\"Employees\\"}}}}}}]" --provider-namespace "{providerNamespace}"') # EXAMPLE: /Operations/get/Operations_ListByProviderRegistration @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_operations') def test_step_operation_list(self, resource_group): self.cmd('az providerhub operation list ' '--provider-namespace "{providerNamespace}"') # EXAMPLE: /Operations/delete/Operations_Delete @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_operations') def test_step_operation_delete(self, resource_group): self.cmd('az providerhub operation delete -y ' '--provider-namespace "{providerNamespace}"') # EXAMPLE: /ProviderRegistrations/put/ProviderRegistrations_CreateOrUpdate @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_provider_registration') def test_step_provider_registration_create(self, resource_group): self.cmd('az providerhub provider-registration create ' '--token-auth-configuration authentication-scheme="PoP" signed-request-scope="ResourceUri" ' '--service-tree-infos service-id="d1b7d8ba-05e2-48e6-90d6-d781b99c6e69" ' 'component-id="d1b7d8ba-05e2-48e6-90d6-d781b99c6e69" ' '--capabilities effect="Allow" quota-id="CSP_2015-05-01" ' '--capabilities effect="Allow" quota-id="CSP_MG_2017-12-01" ' '--manifest-owners "SPARTA-PlatformServiceAdministrator" ' '--incident-contact-email "rpaascore@microsoft.com" ' '--incident-routing-service "Resource Provider Service as a Service" ' '--incident-routing-team "RPaaS" ' '--provider-version "2.0" ' '--provider-type "Hidden, Internal" ' '--provider-namespace "{providerNamespace}" ' '--metadata {{\\"BypassManifestValidation\\":true}}') # EXAMPLE: /ProviderRegistrations/put/ProviderRegistrations_CreateOrUpdate @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_provider_registration') def test_step_provider_registration_update(self, resource_group): self.cmd('az providerhub provider-registration update ' '--token-auth-configuration authentication-scheme="PoP" signed-request-scope="ResourceUri" ' '--service-tree-infos service-id="d1b7d8ba-05e2-48e6-90d6-d781b99c6e69" ' 'component-id="d1b7d8ba-05e2-48e6-90d6-d781b99c6e69" ' '--capabilities effect="Allow" quota-id="CSP_2015-05-01" ' '--capabilities effect="Allow" quota-id="CSP_MG_2017-12-01" ' '--manifest-owners "SPARTA-PlatformServiceAdministrator" ' '--incident-contact-email "rpaascore@microsoft.com" ' '--incident-routing-service "Resource Provider Service as a Service" ' '--incident-routing-team "RPaaS" ' '--provider-version "2.0" ' '--provider-type "Hidden, Internal" ' '--provider-namespace "{providerNamespace}" ' '--metadata {{\\"BypassManifestValidation\\":true}}') # EXAMPLE: /ProviderRegistrations/get/ProviderRegistrations_Get @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_provider_registration') def test_step_provider_registration_show(self, resource_group): self.cmd('az providerhub provider-registration show ' '--provider-namespace "{providerNamespace}"') # EXAMPLE: /ProviderRegistrations/get/ProviderRegistrations_List @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_provider_registration') def test_step_provider_registration_list(self, resource_group): self.cmd('az providerhub provider-registration list') # EXAMPLE: /ProviderRegistrations/post/ProviderRegistrations_GenerateOperations @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_provider_registration') def test_step_provider_registration_generate_operation(self, resource_group): self.cmd('az providerhub provider-registration generate-operation ' '--provider-namespace "{providerNamespace}"') # EXAMPLE: /ProviderRegistrations/delete/ProviderRegistrations_Delete @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_provider_registration') def test_step_provider_registration_delete(self, resource_group): with self.assertRaises(HttpResponseError): self.cmd('az providerhub provider-registration delete -y ' '--provider-namespace "{providerNamespace}" ') # EXAMPLE: /ResourceTypeRegistration/put/ResourceTypeRegistration_CreateOrUpdate @AllowLargeResponse(size_kb=10240) @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_resource_type_registration') def test_step_resource_type_registration_create(self, resource_group): self.cmd('az providerhub resource-type-registration create ' '--endpoints "[{{api-versions:[2019-01-01],locations:[WestUS]}}]" ' '--regionality "Regional" ' '--provider-namespace "{providerNamespace}" ' '--resource-type "extensionresourcetype" ' '--routing-type "ProxyOnly, Extension" ') # EXAMPLE: /ResourceTypeRegistration/put/ResourceTypeRegistration_CreateOrUpdate @AllowLargeResponse(size_kb=10240) @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_resource_type_registration') def test_step_resource_type_registration_update(self, resource_group): self.cmd('az providerhub resource-type-registration update ' '--endpoints "[{{api-versions:[2019-01-01],locations:[WestUS]}}]" ' '--regionality "Regional" ' '--provider-namespace "{providerNamespace}" ' '--resource-type "extensionresourcetype" ' '--routing-type "ProxyOnly, Extension" ') # EXAMPLE: /ResourceTypeRegistrations/get/ResourceTypeRegistrations_ListByProviderRegistration @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_resource_type_registration') def test_step_resource_type_registration_list(self, resource_group): self.cmd('az providerhub resource-type-registration list ' '--provider-namespace "{providerNamespace}"') # EXAMPLE: /ResourceTypeRegistrations/get/ResourceTypeRegistrations_Get @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_resource_type_registration') def test_step_resource_type_registration_show(self, resource_group): self.cmd('az providerhub resource-type-registration show ' '--provider-namespace "{providerNamespace}" ' '--resource-type "extensionresourcetype"') # EXAMPLE: /ResourceTypeRegistrations/get/ResourceTypeRegistrations_Get @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_resource_type_registration') def test_step_resource_type_registration_delete(self, resource_group): self.cmd('az providerhub resource-type-registration delete -y ' '--provider-namespace "{providerNamespace}" ' '--resource-type "extensionresourcetype"') # EXAMPLE: /ResourceTypeRegistration/put/ResourceTypeRegistration_CreateOrUpdate @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_resource_type_registration') def test_step_nested_resource_type_registration_create(self, resource_group): self.cmd('az providerhub resource-type-registration create ' '--endpoints "[{{api-versions:[2019-01-01],locations:[WestUS]}}]" ' '--regionality "Regional" ' '--routing-type "ProxyOnly" ' '--provider-namespace "{providerNamespace}" ' '--enable-async-operation false ' '--template-deployment-options {{preflight-supported:true,preflight-options:[DefaultValidationOnly,continueDeploymentOnFailure]}} ' '--resource-type "employees/resourcetyperegistrations/{nestedResourceType}"', checks=[ self.check("name", "employees/NestedResourceType", case_sensitive=False), self.check("properties.routingType", "ProxyOnly", case_sensitive=False), self.check("properties.regionality", "Regional", case_sensitive=False) ]) # EXAMPLE: /ResourceTypeRegistration/put/ResourceTypeRegistration_CreateOrUpdate @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_resource_type_registration') def test_step_nested_resource_type_registration_extensions_create(self, resource_group): self.cmd('az providerhub resource-type-registration create ' '--endpoints "[{{\\"api-versions\\":[\\"2019-01-01\\"],\\"locations\\":[\\"WestUS\\"],\\"extensions\\":[{{\\"endpointUri\\":\\"https://contoso-test-extension-endpoint.com\\",\\"extensionCategories\\":[\\"ResourceReadValidate\\",\\"ResourceDeletionValidate\\"]}}]}}]" ' '--regionality "Regional" ' '--routing-type "ProxyOnly" ' '--provider-namespace "{providerNamespace}" ' '--enable-async-operation false ' '--template-deployment-options {{preflight-supported:true,preflight-options:[DefaultValidationOnly,continueDeploymentOnFailure]}} ' '--resource-type "employees/resourcetyperegistrations/{nestedResourceType}"', checks=[ self.check("name", "employees/NestedResourceType", case_sensitive=False), self.check("properties.routingType", "ProxyOnly", case_sensitive=False), self.check("properties.regionality", "Regional", case_sensitive=False) ]) # EXAMPLE: /ResourceTypeRegistration/delete/ResourceTypeRegistration_Delete @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_resource_type_registration') def test_step_nested_resource_type_registration_delete(self, resource_group): self.cmd('az providerhub resource-type-registration delete -y ' '--provider-namespace "{providerNamespace}" ' '--resource-type "{resourceType}/resourcetyperegistrations/{nestedResourceType}"') # EXAMPLE: /ResourceTypeRegistrations/get/ResourceTypeRegistrations_Get @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_resource_type_registration') def test_step_nested_resource_type_registration_show(self, resource_group): self.cmd('az providerhub resource-type-registration show ' '--provider-namespace "{providerNamespace}" ' '--resource-type "{resourceType}/resourcetyperegistrations/nestedResourceTypeFirst"') # EXAMPLE: /NotificationRegistrations/put/NotificationRegistrations_CreateOrUpdate @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_notification') def test_step_notification_registration_create(self, resource_group): self.cmd('az providerhub notification-registration create ' '--name "{notificationRegistration}" ' '--included-events "*/write" "Microsoft.Contoso/employees/delete" ' '--message-scope "RegisteredSubscriptions" ' '--notification-endpoints "[{{notification-destination:/subscriptions/ac6bcfb5-3dc1-491f-95a6-646b89bf3e88/resourceGroups/mgmtexp-eastus/providers/Microsoft.EventHub/namespaces/unitedstates-mgmtexpint/eventhubs/armlinkednotifications,locations:[EastUS]}}]" ' '--notification-mode "EventHub" ' '--provider-namespace "{providerNamespace}"', checks=[ self.check( "name", "{notificationRegistration}", case_sensitive=False), self.check("properties.messageScope", "RegisteredSubscriptions", case_sensitive=False), self.check("properties.notificationMode", "EventHub", case_sensitive=False) ]) # EXAMPLE: /NotificationRegistrations/get/NotificationRegistrations_Get @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_notification') def test_step_notification_registration_show(self, resource_group): self.cmd('az providerhub notification-registration show ' '--name "{notificationRegistration}" ' '--provider-namespace "{providerNamespace}"', checks=[ self.check( "name", "{notificationRegistration}", case_sensitive=False), self.check("properties.messageScope", "RegisteredSubscriptions", case_sensitive=False), self.check("properties.notificationMode", "EventHub", case_sensitive=False), ]) # EXAMPLE: /NotificationRegistrations/get/NotificationRegistrations_ListByProviderRegistration @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_notification') def test_step_notification_registration_list(self, resource_group): self.cmd('az providerhub notification-registration list ' '--provider-namespace "{providerNamespace}"', checks=[ self.check('length(@)', 1), ]) # EXAMPLE: /NotificationRegistrations/delete/NotificationRegistrations_Delete @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_notification') def test_step_notification_registration_delete(self, resource_group): self.cmd('az providerhub notification-registration delete -y ' '--name "{notificationRegistration}" ' '--provider-namespace "{providerNamespace}"') # EXAMPLE: /Skus/put/Skus_CreateOrUpdate @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_create(self, resource_group): self.cmd('az providerhub sku create ' '--sku-settings "[{{\\"name\\":\\"freeSku\\"}}]" ' '--provider-namespace "{providerNamespace}" ' '--resource-type "{resourceType}" ' '--sku "{skuName}"') # EXAMPLE: /Skus/put/Skus_CreateOrUpdateNestedResourceTypeFirst @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_create2(self, resource_group): self.cmd('az providerhub sku nested-resource-type-first create ' '--nested-resource-type-first "nestedResourceTypeFirst" ' '--sku-settings "[{{\\"name\\":\\"freeSku\\",\\"kind\\":\\"Standard\\",\\"tier\\":\\"Tier1\\"}},{{\\"name' '\\":\\"premiumSku\\",\\"costs\\":[{{\\"meterId\\":\\"xxx\\"}}],\\"kind\\":\\"Premium\\",\\"tier\\":\\"Tie' 'r2\\"}}]" ' '--provider-namespace "{providerNamespace}" ' '--resource-type "{resourceType}" ' '--sku "{skuName}"') # EXAMPLE: /Skus/put/Skus_CreateOrUpdateNestedResourceTypeSecond @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_create3(self, resource_group): self.cmd('az providerhub sku nested-resource-type-second create ' '--nested-resource-type-first "nestedResourceTypeFirst" ' '--nested-resource-type-second "nestedResourceTypeSecond" ' '--sku-settings "[{{\\"name\\":\\"freeSku\\",\\"kind\\":\\"Standard\\",\\"tier\\":\\"Tier1\\"}},{{\\"name' '\\":\\"premiumSku\\",\\"costs\\":[{{\\"meterId\\":\\"xxx\\"}}],\\"kind\\":\\"Premium\\",\\"tier\\":\\"Tie' 'r2\\"}}]" ' '--provider-namespace "{providerNamespace}" ' '--resource-type "{resourceType}" ' '--sku "{skuName}"') # EXAMPLE: /Skus/put/Skus_CreateOrUpdateNestedResourceTypeThird @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_create4(self, resource_group): self.cmd('az providerhub sku nested-resource-type-third create ' '--nested-resource-type-first "nestedResourceTypeFirst" ' '--nested-resource-type-second "nestedResourceTypeSecond" ' '--nested-resource-type-third "nestedResourceTypeThird" ' '--sku-settings "[{{\\"name\\":\\"freeSku\\",\\"kind\\":\\"Standard\\",\\"tier\\":\\"Tier1\\"}},{{\\"name' '\\":\\"premiumSku\\",\\"costs\\":[{{\\"meterId\\":\\"xxx\\"}}],\\"kind\\":\\"Premium\\",\\"tier\\":\\"Tie' 'r2\\"}}]" ' '--provider-namespace "{providerNamespace}" ' '--resource-type "{resourceType}" ' '--sku "{skuName}"') # EXAMPLE: /Skus/get/Skus_Get @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_show(self, resource_group): self.cmd('az providerhub sku show ' '--provider-namespace "{providerNamespace}" ' '--resource-type "{resourceType}" ' '--sku "{skuName}"') # EXAMPLE: /Skus/get/Skus_GetNestedResourceTypeFirst @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_show_nested_resource_type_first(self, resource_group): self.cmd('az providerhub sku nested-resource-type-first show ' '--nested-resource-type-first "nestedResourceTypeFirst" ' '--provider-namespace "{providerNamespace}" ' '--resource-type "{resourceType}" ' '--sku "{skuName}"') # EXAMPLE: /Skus/get/Skus_GetNestedResourceTypeSecond @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_show_nested_resource_type_second(self, resource_group): self.cmd('az providerhub sku nested-resource-type-second show ' '--nested-resource-type-first "nestedResourceTypeFirst" ' '--nested-resource-type-second "nestedResourceTypeSecond" ' '--provider-namespace "{providerNamespace}" ' '--resource-type "{resourceType}" ' '--sku "{skuName}"') # EXAMPLE: /Skus/get/Skus_GetNestedResourceTypeThird @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_show_nested_resource_type_third(self, resource_group): self.cmd('az providerhub sku nested-resource-type-third show ' '--nested-resource-type-first "nestedResourceTypeFirst" ' '--nested-resource-type-second "nestedResourceTypeSecond" ' '--nested-resource-type-third "nestedResourceTypeThird" ' '--provider-namespace "{providerNamespace}" ' '--resource-type "{resourceType}" ' '--sku "{skuName}"') # EXAMPLE: /Skus/get/Skus_ListByResourceTypeRegistrations @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_list(self, resource_group): self.cmd('az providerhub sku list ' '--provider-namespace "{providerNamespace}" ' '--resource-type "{resourceType}"') # EXAMPLE: /Skus/get/Skus_ListByResourceTypeRegistrationsNestedResourceTypeFirst @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_list2(self, resource_group): self.cmd('az providerhub sku nested-resource-type-first list ' '--nested-resource-type-first "nestedResourceTypeFirst" ' '--provider-namespace "{providerNamespace}" ' '--resource-type "{resourceType}"') # EXAMPLE: /Skus/get/Skus_ListByResourceTypeRegistrationsNestedResourceTypeSecond @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_list3(self, resource_group): self.cmd('az providerhub sku nested-resource-type-second list ' '--nested-resource-type-first "nestedResourceTypeFirst" ' '--nested-resource-type-second "nestedResourceTypeSecond" ' '--provider-namespace "{providerNamespace}" ' '--resource-type "{resourceType}"') # EXAMPLE: /Skus/get/Skus_ListByResourceTypeRegistrationsNestedResourceTypeThird @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_list4(self, resource_group): self.cmd('az providerhub sku nested-resource-type-third list ' '--nested-resource-type-first "nestedResourceTypeFirst" ' '--nested-resource-type-second "nestedResourceTypeSecond" ' '--nested-resource-type-third "nestedResourceTypeThird" ' '--provider-namespace "{providerNamespace}" ' '--resource-type "{resourceType}"') # EXAMPLE: /Skus/delete/Skus_Delete @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_delete(self, resource_group): self.cmd('az providerhub sku delete -y ' '--provider-namespace "{providerNamespace}" ' '--resource-type "{resourceType}" ' '--sku "{skuName}"') # EXAMPLE: /Skus/delete/Skus_DeleteNestedResourceTypeFirst @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_delete2(self, resource_group): self.cmd('az providerhub sku nested-resource-type-first delete -y ' '--nested-resource-type-first "nestedResourceTypeFirst" ' '--provider-namespace "{providerNamespace}" ' '--resource-type "{resourceType}" ' '--sku "{skuName}"') # EXAMPLE: /Skus/delete/Skus_DeleteNestedResourceTypeSecond @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_delete3(self, resource_group): self.cmd('az providerhub sku nested-resource-type-second delete -y ' '--nested-resource-type-first "nestedResourceTypeFirst" ' '--nested-resource-type-second "nestedResourceTypeSecond" ' '--provider-namespace "{providerNamespace}" ' '--resource-type "{resourceType}" ' '--sku "{skuName}"') # EXAMPLE: /Skus/delete/Skus_DeleteNestedResourceTypeThird @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_delete4(self, resource_group): self.cmd('az providerhub sku nested-resource-type-third delete -y ' '--nested-resource-type-first "nestedResourceTypeFirst" ' '--nested-resource-type-second "nestedResourceTypeSecond" ' '--nested-resource-type-third "nestedResourceTypeThird" ' '--provider-namespace "{providerNamespace}" ' '--resource-type "{resourceType}" ' '--sku "{skuName}"')
class ProviderHubScenario(ScenarioTest): def __init__(self, method_name, config_file=None, recording_dir=None, recording_name=None, recording_processors=None, replay_processors=None, recording_patches=None, replay_patches=None): pass @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_manifest') def test_step_manifest_generate(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_manifest') def test_step_manifest_checkin(self, resource_group): pass @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_authorized_application') def test_step_authorized_application_create(self, resource_group): pass @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_authorized_application') def test_step_authorized_application_show(self, resource_group): pass @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_authorized_application') def test_step_authorized_application_list(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_authorized_application') def test_step_authorized_application_delete(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_custom_rollout') def test_step_custom_rollout_create(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_custom_rollout') def test_step_custom_rollout_show(self, resource_group): pass @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_custom_rollout') def test_step_custom_rollout_list(self, resource_group): pass @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_default_rollout') def test_step_default_rollout_create(self, resource_group): pass @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_default_rollout') def test_step_default_rollout_show(self, resource_group): pass @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_default_rollout') def test_step_default_rollout_list(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_default_rollout') def test_step_default_rollout_stop(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_default_rollout') def test_step_default_rollout_delete(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_operations') def test_step_operation_create(self, resource_group): pass @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_operations') def test_step_operation_list(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_operations') def test_step_operation_delete(self, resource_group): pass @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_provider_registration') def test_step_provider_registration_create(self, resource_group): pass @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_provider_registration') def test_step_provider_registration_update(self, resource_group): pass @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_provider_registration') def test_step_provider_registration_show(self, resource_group): pass @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_provider_registration') def test_step_provider_registration_list(self, resource_group): pass @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_provider_registration') def test_step_provider_registration_generate_operation(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_provider_registration') def test_step_provider_registration_delete(self, resource_group): pass @AllowLargeResponse(size_kb=10240) @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_resource_type_registration') def test_step_resource_type_registration_create(self, resource_group): pass @AllowLargeResponse(size_kb=10240) @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_resource_type_registration') def test_step_resource_type_registration_update(self, resource_group): pass @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_resource_type_registration') def test_step_resource_type_registration_list(self, resource_group): pass @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_resource_type_registration') def test_step_resource_type_registration_show(self, resource_group): pass @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_resource_type_registration') def test_step_resource_type_registration_delete(self, resource_group): pass @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_resource_type_registration') def test_step_nested_resource_type_registration_create(self, resource_group): pass @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_resource_type_registration') def test_step_nested_resource_type_registration_extensions_create(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_resource_type_registration') def test_step_nested_resource_type_registration_delete(self, resource_group): pass @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_resource_type_registration') def test_step_nested_resource_type_registration_show(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_notification') def test_step_notification_registration_create(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_notification') def test_step_notification_registration_show(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_notification') def test_step_notification_registration_list(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_notification') def test_step_notification_registration_delete(self, resource_group): pass @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_create(self, resource_group): pass @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_create2(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_create3(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_create4(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_show(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_show_nested_resource_type_first(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_show_nested_resource_type_second(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_show_nested_resource_type_third(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_list(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_list2(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_list3(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_list4(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_delete(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_delete2(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_delete3(self, resource_group): pass @ResourceGroupPreparer(name_prefix='cli_test_azure_providerhub_sku') def test_step_sku_delete4(self, resource_group): pass
130
0
6
0
6
0
1
0.12
1
1
0
0
51
0
51
51
505
85
374
104
248
46
106
52
54
1
1
1
51
10,258
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/providerhub/azext_providerhub/aaz/latest/providerhub/sku/nested_resource_type_third/_update.py
azext_providerhub.aaz.latest.providerhub.sku.nested_resource_type_third._update.Update.SkusGetNestedResourceTypeThird
class SkusGetNestedResourceTypeThird(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/resourcetypeRegistrations/{nestedResourceTypeSecond}/resourcetypeRegistrations/{nestedResourceTypeThird}/skus/{sku}", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "nestedResourceTypeFirst", self.ctx.args.nested_resource_type_first, required=True, ), **self.serialize_url_param( "nestedResourceTypeSecond", self.ctx.args.nested_resource_type_second, required=True, ), **self.serialize_url_param( "nestedResourceTypeThird", self.ctx.args.nested_resource_type_third, required=True, ), **self.serialize_url_param( "providerNamespace", self.ctx.args.provider_namespace, required=True, ), **self.serialize_url_param( "resourceType", self.ctx.args.resource_type, required=True, ), **self.serialize_url_param( "sku", self.ctx.args.name, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-04-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _UpdateHelper._build_schema_sku_resource_read(cls._schema_on_200) return cls._schema_on_200
class SkusGetNestedResourceTypeThird(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
9
0
8
0
1
0
1
1
1
0
8
0
9
9
98
13
85
25
68
0
33
18
23
2
1
1
11
10,259
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/providerhub/azext_providerhub/aaz/latest/providerhub/sku/nested_resource_type_third/_update.py
azext_providerhub.aaz.latest.providerhub.sku.nested_resource_type_third._update.Update.SkusCreateOrUpdateNestedResourceTypeThird
class SkusCreateOrUpdateNestedResourceTypeThird(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/resourcetypeRegistrations/{nestedResourceTypeSecond}/resourcetypeRegistrations/{nestedResourceTypeThird}/skus/{sku}", **self.url_parameters ) @property def method(self): return "PUT" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "nestedResourceTypeFirst", self.ctx.args.nested_resource_type_first, required=True, ), **self.serialize_url_param( "nestedResourceTypeSecond", self.ctx.args.nested_resource_type_second, required=True, ), **self.serialize_url_param( "nestedResourceTypeThird", self.ctx.args.nested_resource_type_third, required=True, ), **self.serialize_url_param( "providerNamespace", self.ctx.args.provider_namespace, required=True, ), **self.serialize_url_param( "resourceType", self.ctx.args.resource_type, required=True, ), **self.serialize_url_param( "sku", self.ctx.args.name, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-04-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Content-Type", "application/json", ), **self.serialize_header_param( "Accept", "application/json", ), } return parameters @property def content(self): _content_value, _builder = self.new_content_builder( self.ctx.args, value=self.ctx.vars.instance, ) return self.serialize_content(_content_value) def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _UpdateHelper._build_schema_sku_resource_read(cls._schema_on_200) return cls._schema_on_200
class SkusCreateOrUpdateNestedResourceTypeThird(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass @property def content(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
19
0
9
0
8
0
1
0
1
1
1
0
9
0
10
10
110
15
95
28
76
0
36
20
25
2
1
1
12
10,260
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/quota/azext_quota/aaz/latest/quota/request/_list.py
azext_quota.aaz.latest.quota.request._list.List.QuotaRequestStatusList
class QuotaRequestStatusList(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/{scope}/providers/Microsoft.Quota/quotaRequests", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "scope", self.ctx.args.scope, skip_quote=True, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "$filter", self.ctx.args.filter, ), **self.serialize_query_param( "$skiptoken", self.ctx.args.skiptoken, ), **self.serialize_query_param( "$top", self.ctx.args.top, ), **self.serialize_query_param( "api-version", "2023-02-01", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.next_link = AAZStrType( serialized_name="nextLink", ) _schema_on_200.value = AAZListType() value = cls._schema_on_200.value value.Element = AAZObjectType() _element = cls._schema_on_200.value.Element _element.id = AAZStrType( flags={"read_only": True}, ) _element.name = AAZStrType( flags={"read_only": True}, ) _element.properties = AAZObjectType( flags={"client_flatten": True}, ) _element.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200.value.Element.properties properties.error = AAZObjectType() _ListHelper._build_schema_service_error_detail_read( properties.error) properties.message = AAZStrType( flags={"read_only": True}, ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) properties.request_submit_time = AAZStrType( serialized_name="requestSubmitTime", flags={"read_only": True}, ) properties.value = AAZListType() value = cls._schema_on_200.value.Element.properties.value value.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.value.Element _element.limit = AAZObjectType() _element.message = AAZStrType( flags={"read_only": True}, ) _element.name = AAZObjectType() _element.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) _element.resource_type = AAZStrType( serialized_name="resourceType", flags={"read_only": True}, ) _element.sub_request_id = AAZStrType( serialized_name="subRequestId", flags={"read_only": True}, ) _element.unit = AAZStrType() limit = cls._schema_on_200.value.Element.properties.value.Element.limit limit.limit_object_type = AAZStrType( serialized_name="limitObjectType", flags={"required": True}, ) disc_limit_value = cls._schema_on_200.value.Element.properties.value.Element.limit.discriminate_by( "limit_object_type", "LimitValue") disc_limit_value.limit_type = AAZStrType( serialized_name="limitType", ) disc_limit_value.value = AAZIntType( flags={"required": True}, ) name = cls._schema_on_200.value.Element.properties.value.Element.name name.localized_value = AAZStrType( serialized_name="localizedValue", flags={"read_only": True}, ) name.value = AAZStrType() return cls._schema_on_200
class QuotaRequestStatusList(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
16
1
15
0
1
0
1
1
1
0
8
0
9
9
166
22
144
32
127
0
67
25
57
2
1
1
11
10,261
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/providerhub/azext_providerhub/aaz/latest/providerhub/sku/nested_resource_type_third/_update.py
azext_providerhub.aaz.latest.providerhub.sku.nested_resource_type_third._update.Update.InstanceUpdateByJson
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): def __call__(self, *args, **kwargs): self._update_instance(self.ctx.vars.instance) def _update_instance(self, instance): _instance_value, _builder = self.new_content_builder( self.ctx.args, value=instance, typ=AAZObjectType ) _builder.set_prop("properties", AAZObjectType) properties = _builder.get(".properties") if properties is not None: properties.set_prop("skuSettings", AAZListType, ".sku_settings", typ_kwargs={ "flags": {"required": True}}) sku_settings = _builder.get(".properties.skuSettings") if sku_settings is not None: sku_settings.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.skuSettings[]") if _elements is not None: _elements.set_prop( "capabilities", AAZListType, ".capabilities") _elements.set_prop("capacity", AAZObjectType, ".capacity") _elements.set_prop("costs", AAZListType, ".costs") _elements.set_prop("family", AAZStrType, ".family") _elements.set_prop("kind", AAZStrType, ".kind") _elements.set_prop( "locationInfo", AAZListType, ".location_info") _elements.set_prop("locations", AAZListType, ".locations") _elements.set_prop("name", AAZStrType, ".name", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("requiredFeatures", AAZListType, ".required_features") _elements.set_prop("requiredQuotaIds", AAZListType, ".required_quota_ids") _elements.set_prop("size", AAZStrType, ".size") _elements.set_prop("tier", AAZStrType, ".tier") capabilities = _builder.get( ".properties.skuSettings[].capabilities") if capabilities is not None: _UpdateHelper._build_schema_sku_capability_update( capabilities.set_elements(AAZObjectType, ".")) capacity = _builder.get(".properties.skuSettings[].capacity") if capacity is not None: capacity.set_prop("default", AAZIntType, ".default") capacity.set_prop("maximum", AAZIntType, ".maximum") capacity.set_prop("minimum", AAZIntType, ".minimum", typ_kwargs={ "flags": {"required": True}}) capacity.set_prop("scaleType", AAZStrType, ".scale_type") costs = _builder.get(".properties.skuSettings[].costs") if costs is not None: costs.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.skuSettings[].costs[]") if _elements is not None: _elements.set_prop( "extendedUnit", AAZStrType, ".extended_unit") _elements.set_prop("meterId", AAZStrType, ".meter_id", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("quantity", AAZIntType, ".quantity") location_info = _builder.get( ".properties.skuSettings[].locationInfo") if location_info is not None: location_info.set_elements(AAZObjectType, ".") _elements = _builder.get( ".properties.skuSettings[].locationInfo[]") if _elements is not None: _elements.set_prop("extendedLocations", AAZListType, ".extended_locations") _elements.set_prop("location", AAZStrType, ".location", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("type", AAZStrType, ".type") _elements.set_prop("zoneDetails", AAZListType, ".zone_details") _elements.set_prop("zones", AAZListType, ".zones") extended_locations = _builder.get( ".properties.skuSettings[].locationInfo[].extendedLocations") if extended_locations is not None: extended_locations.set_elements(AAZStrType, ".") zone_details = _builder.get( ".properties.skuSettings[].locationInfo[].zoneDetails") if zone_details is not None: zone_details.set_elements(AAZObjectType, ".") _elements = _builder.get( ".properties.skuSettings[].locationInfo[].zoneDetails[]") if _elements is not None: _elements.set_prop( "capabilities", AAZListType, ".capabilities") _elements.set_prop("name", AAZListType, ".name") capabilities = _builder.get( ".properties.skuSettings[].locationInfo[].zoneDetails[].capabilities") if capabilities is not None: _UpdateHelper._build_schema_sku_capability_update( capabilities.set_elements(AAZObjectType, ".")) name = _builder.get( ".properties.skuSettings[].locationInfo[].zoneDetails[].name") if name is not None: name.set_elements(AAZStrType, ".") zones = _builder.get( ".properties.skuSettings[].locationInfo[].zones") if zones is not None: zones.set_elements(AAZStrType, ".") locations = _builder.get(".properties.skuSettings[].locations") if locations is not None: locations.set_elements(AAZStrType, ".") required_features = _builder.get( ".properties.skuSettings[].requiredFeatures") if required_features is not None: required_features.set_elements(AAZStrType, ".") required_quota_ids = _builder.get( ".properties.skuSettings[].requiredQuotaIds") if required_quota_ids is not None: required_quota_ids.set_elements(AAZStrType, ".") return _instance_value
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): def __call__(self, *args, **kwargs): pass def _update_instance(self, instance): pass
3
0
52
10
43
0
10
0
1
1
1
0
2
0
2
2
107
21
86
18
83
0
82
18
79
19
1
1
20
10,262
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/quota/azext_quota/aaz/latest/quota/request/_show.py
azext_quota.aaz.latest.quota.request._show.Show.QuotaRequestStatusGet
class QuotaRequestStatusGet(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/{scope}/providers/Microsoft.Quota/quotaRequests/{id}", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "ODataV4Format" @property def url_parameters(self): parameters = { **self.serialize_url_param( "id", self.ctx.args.id, required=True, ), **self.serialize_url_param( "scope", self.ctx.args.scope, skip_quote=True, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2023-02-01", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.id = AAZStrType( flags={"read_only": True}, ) _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) _schema_on_200.properties = AAZObjectType( flags={"client_flatten": True}, ) _schema_on_200.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200.properties properties.error = AAZObjectType() _ShowHelper._build_schema_service_error_detail_read( properties.error) properties.message = AAZStrType( flags={"read_only": True}, ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) properties.request_submit_time = AAZStrType( serialized_name="requestSubmitTime", flags={"read_only": True}, ) properties.value = AAZListType() value = cls._schema_on_200.properties.value value.Element = AAZObjectType() _element = cls._schema_on_200.properties.value.Element _element.limit = AAZObjectType() _element.message = AAZStrType( flags={"read_only": True}, ) _element.name = AAZObjectType() _element.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) _element.resource_type = AAZStrType( serialized_name="resourceType", flags={"read_only": True}, ) _element.sub_request_id = AAZStrType( serialized_name="subRequestId", flags={"read_only": True}, ) _element.unit = AAZStrType() limit = cls._schema_on_200.properties.value.Element.limit limit.limit_object_type = AAZStrType( serialized_name="limitObjectType", flags={"required": True}, ) disc_limit_value = cls._schema_on_200.properties.value.Element.limit.discriminate_by( "limit_object_type", "LimitValue") disc_limit_value.limit_type = AAZStrType( serialized_name="limitType", ) disc_limit_value.value = AAZIntType( flags={"required": True}, ) name = cls._schema_on_200.properties.value.Element.name name.localized_value = AAZStrType( serialized_name="localizedValue", flags={"read_only": True}, ) name.value = AAZStrType() return cls._schema_on_200
class QuotaRequestStatusGet(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
15
1
14
0
1
0
1
1
1
0
8
0
9
9
152
20
132
32
115
0
62
25
52
2
1
1
11
10,263
Azure/azure-cli-extensions
src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/models/_models.py
azext_costmanagement.vendored_sdks.costmanagement.models._models.ReportConfigGrouping
class ReportConfigGrouping(msrest.serialization.Model): """The group by expression to be used in the report. All required parameters must be populated in order to send to Azure. :param type: Required. Has type of the column to group. Possible values include: "Tag", "Dimension". :type type: str or ~azure.mgmt.costmanagement.models.ReportConfigColumnType :param name: Required. The name of the column to group. This version supports subscription lowest possible grain. :type name: str """ _validation = { 'type': {'required': True}, 'name': {'required': True}, } _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, } def __init__( self, **kwargs ): super(ReportConfigGrouping, self).__init__(**kwargs) self.type = kwargs['type'] self.name = kwargs['name']
class ReportConfigGrouping(msrest.serialization.Model): '''The group by expression to be used in the report. All required parameters must be populated in order to send to Azure. :param type: Required. Has type of the column to group. Possible values include: "Tag", "Dimension". :type type: str or ~azure.mgmt.costmanagement.models.ReportConfigColumnType :param name: Required. The name of the column to group. This version supports subscription lowest possible grain. :type name: str ''' def __init__( self, **kwargs ): pass
2
1
7
0
7
0
1
0.56
1
1
0
0
1
2
1
1
30
5
16
9
11
9
7
6
5
1
1
0
1
10,264
Azure/azure-cli-extensions
src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/models/_models.py
azext_costmanagement.vendored_sdks.costmanagement.models._models.QueryColumn
class QueryColumn(msrest.serialization.Model): """QueryColumn. :param name: The name of column. :type name: str :param type: The type of column. :type type: str """ _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, } def __init__( self, **kwargs ): super(QueryColumn, self).__init__(**kwargs) self.name = kwargs.get('name', None) self.type = kwargs.get('type', None)
class QueryColumn(msrest.serialization.Model): '''QueryColumn. :param name: The name of column. :type name: str :param type: The type of column. :type type: str ''' def __init__( self, **kwargs ): pass
2
1
7
0
7
0
1
0.5
1
1
0
0
1
2
1
1
21
3
12
8
7
6
6
5
4
1
1
0
1
10,265
Azure/azure-cli-extensions
src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/models/_models.py
azext_costmanagement.vendored_sdks.costmanagement.models._models.QueryComparisonExpression
class QueryComparisonExpression(msrest.serialization.Model): """The comparison expression to be used in the query. All required parameters must be populated in order to send to Azure. :param name: Required. The name of the column to use in comparison. :type name: str :param operator: Required. The operator to use for comparison. Possible values include: "In". :type operator: str or ~azure.mgmt.costmanagement.models.QueryOperatorType :param values: Required. Array of values to use for comparison. :type values: list[str] """ _validation = { 'name': {'required': True}, 'operator': {'required': True}, 'values': {'required': True, 'min_items': 1}, } _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'operator': {'key': 'operator', 'type': 'str'}, 'values': {'key': 'values', 'type': '[str]'}, } def __init__( self, **kwargs ): super(QueryComparisonExpression, self).__init__(**kwargs) self.name = kwargs['name'] self.operator = kwargs['operator'] self.values = kwargs['values']
class QueryComparisonExpression(msrest.serialization.Model): '''The comparison expression to be used in the query. All required parameters must be populated in order to send to Azure. :param name: Required. The name of the column to use in comparison. :type name: str :param operator: Required. The operator to use for comparison. Possible values include: "In". :type operator: str or ~azure.mgmt.costmanagement.models.QueryOperatorType :param values: Required. Array of values to use for comparison. :type values: list[str] ''' def __init__( self, **kwargs ): pass
2
1
8
0
8
0
1
0.47
1
1
0
0
1
3
1
1
33
5
19
10
14
9
8
7
6
1
1
0
1
10,266
Azure/azure-cli-extensions
src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/models/_models.py
azext_costmanagement.vendored_sdks.costmanagement.models._models.QueryDataset
class QueryDataset(msrest.serialization.Model): """The definition of data present in the query. :param granularity: The granularity of rows in the query. Possible values include: "Daily". :type granularity: str or ~azure.mgmt.costmanagement.models.GranularityType :param configuration: Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided. :type configuration: ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration :param aggregation: Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses. :type aggregation: dict[str, ~azure.mgmt.costmanagement.models.QueryAggregation] :param grouping: Array of group by expression to use in the query. Query can have up to 2 group by clauses. :type grouping: list[~azure.mgmt.costmanagement.models.QueryGrouping] :param filter: Has filter expression to use in the query. :type filter: ~azure.mgmt.costmanagement.models.QueryFilter """ _validation = { 'grouping': {'max_items': 2, 'min_items': 0}, } _attribute_map = { 'granularity': {'key': 'granularity', 'type': 'str'}, 'configuration': {'key': 'configuration', 'type': 'QueryDatasetConfiguration'}, 'aggregation': {'key': 'aggregation', 'type': '{QueryAggregation}'}, 'grouping': {'key': 'grouping', 'type': '[QueryGrouping]'}, 'filter': {'key': 'filter', 'type': 'QueryFilter'}, } def __init__( self, **kwargs ): super(QueryDataset, self).__init__(**kwargs) self.granularity = kwargs.get('granularity', None) self.configuration = kwargs.get('configuration', None) self.aggregation = kwargs.get('aggregation', None) self.grouping = kwargs.get('grouping', None) self.filter = kwargs.get('filter', None)
class QueryDataset(msrest.serialization.Model): '''The definition of data present in the query. :param granularity: The granularity of rows in the query. Possible values include: "Daily". :type granularity: str or ~azure.mgmt.costmanagement.models.GranularityType :param configuration: Has configuration information for the data in the export. The configuration will be ignored if aggregation and grouping are provided. :type configuration: ~azure.mgmt.costmanagement.models.QueryDatasetConfiguration :param aggregation: Dictionary of aggregation expression to use in the query. The key of each item in the dictionary is the alias for the aggregated column. Query can have up to 2 aggregation clauses. :type aggregation: dict[str, ~azure.mgmt.costmanagement.models.QueryAggregation] :param grouping: Array of group by expression to use in the query. Query can have up to 2 group by clauses. :type grouping: list[~azure.mgmt.costmanagement.models.QueryGrouping] :param filter: Has filter expression to use in the query. :type filter: ~azure.mgmt.costmanagement.models.QueryFilter ''' def __init__( self, **kwargs ): pass
2
1
10
0
10
0
1
0.76
1
1
0
0
1
5
1
1
41
4
21
12
16
16
10
9
8
1
1
0
1
10,267
Azure/azure-cli-extensions
src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/models/_models.py
azext_costmanagement.vendored_sdks.costmanagement.models._models.QueryDatasetConfiguration
class QueryDatasetConfiguration(msrest.serialization.Model): """The configuration of dataset in the query. :param columns: Array of column names to be included in the query. Any valid query column name is allowed. If not provided, then query includes all columns. :type columns: list[str] """ _attribute_map = { 'columns': {'key': 'columns', 'type': '[str]'}, } def __init__( self, **kwargs ): super(QueryDatasetConfiguration, self).__init__(**kwargs) self.columns = kwargs.get('columns', None)
class QueryDatasetConfiguration(msrest.serialization.Model): '''The configuration of dataset in the query. :param columns: Array of column names to be included in the query. Any valid query column name is allowed. If not provided, then query includes all columns. :type columns: list[str] ''' def __init__( self, **kwargs ): pass
2
1
6
0
6
0
1
0.5
1
1
0
0
1
1
1
1
18
3
10
7
5
5
5
4
3
1
1
0
1
10,268
Azure/azure-cli-extensions
src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/models/_models.py
azext_costmanagement.vendored_sdks.costmanagement.models._models.QueryDefinition
class QueryDefinition(msrest.serialization.Model): """The definition of a query. All required parameters must be populated in order to send to Azure. :param type: Required. The type of the query. Possible values include: "Usage", "ActualCost", "AmortizedCost". :type type: str or ~azure.mgmt.costmanagement.models.ExportType :param timeframe: Required. The time frame for pulling data for the query. If custom, then a specific time period must be provided. Possible values include: "MonthToDate", "BillingMonthToDate", "TheLastMonth", "TheLastBillingMonth", "WeekToDate", "Custom". :type timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType :param time_period: Has time period for pulling data for the query. :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod :param dataset: Has definition for data in this query. :type dataset: ~azure.mgmt.costmanagement.models.QueryDataset """ _validation = { 'type': {'required': True}, 'timeframe': {'required': True}, } _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, 'timeframe': {'key': 'timeframe', 'type': 'str'}, 'time_period': {'key': 'timePeriod', 'type': 'QueryTimePeriod'}, 'dataset': {'key': 'dataset', 'type': 'QueryDataset'}, } def __init__( self, **kwargs ): super(QueryDefinition, self).__init__(**kwargs) self.type = kwargs['type'] self.timeframe = kwargs['timeframe'] self.time_period = kwargs.get('time_period', None) self.dataset = kwargs.get('dataset', None)
class QueryDefinition(msrest.serialization.Model): '''The definition of a query. All required parameters must be populated in order to send to Azure. :param type: Required. The type of the query. Possible values include: "Usage", "ActualCost", "AmortizedCost". :type type: str or ~azure.mgmt.costmanagement.models.ExportType :param timeframe: Required. The time frame for pulling data for the query. If custom, then a specific time period must be provided. Possible values include: "MonthToDate", "BillingMonthToDate", "TheLastMonth", "TheLastBillingMonth", "WeekToDate", "Custom". :type timeframe: str or ~azure.mgmt.costmanagement.models.TimeframeType :param time_period: Has time period for pulling data for the query. :type time_period: ~azure.mgmt.costmanagement.models.QueryTimePeriod :param dataset: Has definition for data in this query. :type dataset: ~azure.mgmt.costmanagement.models.QueryDataset ''' def __init__( self, **kwargs ): pass
2
1
9
0
9
0
1
0.7
1
1
0
0
1
4
1
1
39
5
20
11
15
14
9
8
7
1
1
0
1
10,269
Azure/azure-cli-extensions
src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/models/_models.py
azext_costmanagement.vendored_sdks.costmanagement.models._models.QueryFilter
class QueryFilter(msrest.serialization.Model): """The filter expression to be used in the export. :param and_property: The logical "AND" expression. Must have at least 2 items. :type and_property: list[~azure.mgmt.costmanagement.models.QueryFilter] :param or_property: The logical "OR" expression. Must have at least 2 items. :type or_property: list[~azure.mgmt.costmanagement.models.QueryFilter] :param not_property: The logical "NOT" expression. :type not_property: ~azure.mgmt.costmanagement.models.QueryFilter :param dimension: Has comparison expression for a dimension. :type dimension: ~azure.mgmt.costmanagement.models.QueryComparisonExpression :param tag: Has comparison expression for a tag. :type tag: ~azure.mgmt.costmanagement.models.QueryComparisonExpression """ _validation = { 'and_property': {'min_items': 2}, 'or_property': {'min_items': 2}, } _attribute_map = { 'and_property': {'key': 'and', 'type': '[QueryFilter]'}, 'or_property': {'key': 'or', 'type': '[QueryFilter]'}, 'not_property': {'key': 'not', 'type': 'QueryFilter'}, 'dimension': {'key': 'dimension', 'type': 'QueryComparisonExpression'}, 'tag': {'key': 'tag', 'type': 'QueryComparisonExpression'}, } def __init__( self, **kwargs ): super(QueryFilter, self).__init__(**kwargs) self.and_property = kwargs.get('and_property', None) self.or_property = kwargs.get('or_property', None) self.not_property = kwargs.get('not_property', None) self.dimension = kwargs.get('dimension', None) self.tag = kwargs.get('tag', None)
class QueryFilter(msrest.serialization.Model): '''The filter expression to be used in the export. :param and_property: The logical "AND" expression. Must have at least 2 items. :type and_property: list[~azure.mgmt.costmanagement.models.QueryFilter] :param or_property: The logical "OR" expression. Must have at least 2 items. :type or_property: list[~azure.mgmt.costmanagement.models.QueryFilter] :param not_property: The logical "NOT" expression. :type not_property: ~azure.mgmt.costmanagement.models.QueryFilter :param dimension: Has comparison expression for a dimension. :type dimension: ~azure.mgmt.costmanagement.models.QueryComparisonExpression :param tag: Has comparison expression for a tag. :type tag: ~azure.mgmt.costmanagement.models.QueryComparisonExpression ''' def __init__( self, **kwargs ): pass
2
1
10
0
10
0
1
0.55
1
1
0
0
1
5
1
1
38
4
22
12
17
12
10
9
8
1
1
0
1
10,270
Azure/azure-cli-extensions
src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/models/_models.py
azext_costmanagement.vendored_sdks.costmanagement.models._models.QueryGrouping
class QueryGrouping(msrest.serialization.Model): """The group by expression to be used in the query. All required parameters must be populated in order to send to Azure. :param type: Required. Has type of the column to group. Possible values include: "Tag", "Dimension". :type type: str or ~azure.mgmt.costmanagement.models.QueryColumnType :param name: Required. The name of the column to group. :type name: str """ _validation = { 'type': {'required': True}, 'name': {'required': True}, } _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, } def __init__( self, **kwargs ): super(QueryGrouping, self).__init__(**kwargs) self.type = kwargs['type'] self.name = kwargs['name']
class QueryGrouping(msrest.serialization.Model): '''The group by expression to be used in the query. All required parameters must be populated in order to send to Azure. :param type: Required. Has type of the column to group. Possible values include: "Tag", "Dimension". :type type: str or ~azure.mgmt.costmanagement.models.QueryColumnType :param name: Required. The name of the column to group. :type name: str ''' def __init__( self, **kwargs ): pass
2
1
7
0
7
0
1
0.5
1
1
0
0
1
2
1
1
29
5
16
9
11
8
7
6
5
1
1
0
1
10,271
Azure/azure-cli-extensions
src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/models/_models.py
azext_costmanagement.vendored_sdks.costmanagement.models._models.QueryResult
class QueryResult(Resource): """Result of query. It contains all columns listed under groupings and aggregation. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource Id. :vartype id: str :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :param next_link: The link (url) to the next page of results. :type next_link: str :param columns: Array of columns. :type columns: list[~azure.mgmt.costmanagement.models.QueryColumn] :param rows: Array of rows. :type rows: list[list[object]] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'tags': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, 'columns': {'key': 'properties.columns', 'type': '[QueryColumn]'}, 'rows': {'key': 'properties.rows', 'type': '[[object]]'}, } def __init__( self, **kwargs ): super(QueryResult, self).__init__(**kwargs) self.next_link = kwargs.get('next_link', None) self.columns = kwargs.get('columns', None) self.rows = kwargs.get('rows', None)
class QueryResult(Resource): '''Result of query. It contains all columns listed under groupings and aggregation. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource Id. :vartype id: str :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :param next_link: The link (url) to the next page of results. :type next_link: str :param columns: Array of columns. :type columns: list[~azure.mgmt.costmanagement.models.QueryColumn] :param rows: Array of rows. :type rows: list[list[object]] ''' def __init__( self, **kwargs ): pass
2
1
8
0
8
0
1
0.71
1
1
0
0
1
3
1
2
46
5
24
10
19
17
8
7
6
1
2
0
1
10,272
Azure/azure-cli-extensions
src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/models/_models.py
azext_costmanagement.vendored_sdks.costmanagement.models._models.QueryTimePeriod
class QueryTimePeriod(msrest.serialization.Model): """The start and end date for pulling data for the query. All required parameters must be populated in order to send to Azure. :param from_property: Required. The start date to pull data from. :type from_property: ~datetime.datetime :param to: Required. The end date to pull data to. :type to: ~datetime.datetime """ _validation = { 'from_property': {'required': True}, 'to': {'required': True}, } _attribute_map = { 'from_property': {'key': 'from', 'type': 'iso-8601'}, 'to': {'key': 'to', 'type': 'iso-8601'}, } def __init__( self, **kwargs ): super(QueryTimePeriod, self).__init__(**kwargs) self.from_property = kwargs['from_property'] self.to = kwargs['to']
class QueryTimePeriod(msrest.serialization.Model): '''The start and end date for pulling data for the query. All required parameters must be populated in order to send to Azure. :param from_property: Required. The start date to pull data from. :type from_property: ~datetime.datetime :param to: Required. The end date to pull data to. :type to: ~datetime.datetime ''' def __init__( self, **kwargs ): pass
2
1
7
0
7
0
1
0.44
1
1
0
0
1
2
1
1
28
5
16
9
11
7
7
6
5
1
1
0
1
10,273
Azure/azure-cli-extensions
src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/models/_models.py
azext_costmanagement.vendored_sdks.costmanagement.models._models.ReportConfigAggregation
class ReportConfigAggregation(msrest.serialization.Model): """The aggregation expression to be used in the report. All required parameters must be populated in order to send to Azure. :param name: Required. The name of the column to aggregate. :type name: str :param function: Required. The name of the aggregation function to use. Possible values include: "Sum". :type function: str or ~azure.mgmt.costmanagement.models.FunctionType """ _validation = { 'name': {'required': True}, 'function': {'required': True}, } _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'function': {'key': 'function', 'type': 'str'}, } def __init__( self, **kwargs ): super(ReportConfigAggregation, self).__init__(**kwargs) self.name = kwargs['name'] self.function = kwargs['function']
class ReportConfigAggregation(msrest.serialization.Model): '''The aggregation expression to be used in the report. All required parameters must be populated in order to send to Azure. :param name: Required. The name of the column to aggregate. :type name: str :param function: Required. The name of the aggregation function to use. Possible values include: "Sum". :type function: str or ~azure.mgmt.costmanagement.models.FunctionType ''' def __init__( self, **kwargs ): pass
2
1
7
0
7
0
1
0.5
1
1
0
0
1
2
1
1
29
5
16
9
11
8
7
6
5
1
1
0
1
10,274
Azure/azure-cli-extensions
src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/models/_models.py
azext_costmanagement.vendored_sdks.costmanagement.models._models.ReportConfigComparisonExpression
class ReportConfigComparisonExpression(msrest.serialization.Model): """The comparison expression to be used in the report. All required parameters must be populated in order to send to Azure. :param name: Required. The name of the column to use in comparison. :type name: str :param operator: Required. The operator to use for comparison. Possible values include: "In", "Contains". :type operator: str or ~azure.mgmt.costmanagement.models.OperatorType :param values: Required. Array of values to use for comparison. :type values: list[str] """ _validation = { 'name': {'required': True}, 'operator': {'required': True}, 'values': {'required': True, 'min_items': 1}, } _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'operator': {'key': 'operator', 'type': 'str'}, 'values': {'key': 'values', 'type': '[str]'}, } def __init__( self, **kwargs ): super(ReportConfigComparisonExpression, self).__init__(**kwargs) self.name = kwargs['name'] self.operator = kwargs['operator'] self.values = kwargs['values']
class ReportConfigComparisonExpression(msrest.serialization.Model): '''The comparison expression to be used in the report. All required parameters must be populated in order to send to Azure. :param name: Required. The name of the column to use in comparison. :type name: str :param operator: Required. The operator to use for comparison. Possible values include: "In", "Contains". :type operator: str or ~azure.mgmt.costmanagement.models.OperatorType :param values: Required. Array of values to use for comparison. :type values: list[str] ''' def __init__( self, **kwargs ): pass
2
1
8
0
8
0
1
0.53
1
1
0
0
1
3
1
1
34
5
19
10
14
10
8
7
6
1
1
0
1
10,275
Azure/azure-cli-extensions
src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/models/_models.py
azext_costmanagement.vendored_sdks.costmanagement.models._models.ReportConfigDataset
class ReportConfigDataset(msrest.serialization.Model): """The definition of data present in the report. :param granularity: The granularity of rows in the report. Possible values include: "Daily", "Monthly". :type granularity: str or ~azure.mgmt.costmanagement.models.ReportGranularityType :param configuration: Has configuration information for the data in the report. The configuration will be ignored if aggregation and grouping are provided. :type configuration: ~azure.mgmt.costmanagement.models.ReportConfigDatasetConfiguration :param aggregation: Dictionary of aggregation expression to use in the report. The key of each item in the dictionary is the alias for the aggregated column. Report can have up to 2 aggregation clauses. :type aggregation: dict[str, ~azure.mgmt.costmanagement.models.ReportConfigAggregation] :param grouping: Array of group by expression to use in the report. Report can have up to 2 group by clauses. :type grouping: list[~azure.mgmt.costmanagement.models.ReportConfigGrouping] :param sorting: Array of order by expression to use in the report. :type sorting: list[~azure.mgmt.costmanagement.models.ReportConfigSorting] :param filter: Has filter expression to use in the report. :type filter: ~azure.mgmt.costmanagement.models.ReportConfigFilter """ _validation = { 'grouping': {'max_items': 2, 'min_items': 0}, } _attribute_map = { 'granularity': {'key': 'granularity', 'type': 'str'}, 'configuration': {'key': 'configuration', 'type': 'ReportConfigDatasetConfiguration'}, 'aggregation': {'key': 'aggregation', 'type': '{ReportConfigAggregation}'}, 'grouping': {'key': 'grouping', 'type': '[ReportConfigGrouping]'}, 'sorting': {'key': 'sorting', 'type': '[ReportConfigSorting]'}, 'filter': {'key': 'filter', 'type': 'ReportConfigFilter'}, } def __init__( self, **kwargs ): super(ReportConfigDataset, self).__init__(**kwargs) self.granularity = kwargs.get('granularity', None) self.configuration = kwargs.get('configuration', None) self.aggregation = kwargs.get('aggregation', None) self.grouping = kwargs.get('grouping', None) self.sorting = kwargs.get('sorting', None) self.filter = kwargs.get('filter', None)
class ReportConfigDataset(msrest.serialization.Model): '''The definition of data present in the report. :param granularity: The granularity of rows in the report. Possible values include: "Daily", "Monthly". :type granularity: str or ~azure.mgmt.costmanagement.models.ReportGranularityType :param configuration: Has configuration information for the data in the report. The configuration will be ignored if aggregation and grouping are provided. :type configuration: ~azure.mgmt.costmanagement.models.ReportConfigDatasetConfiguration :param aggregation: Dictionary of aggregation expression to use in the report. The key of each item in the dictionary is the alias for the aggregated column. Report can have up to 2 aggregation clauses. :type aggregation: dict[str, ~azure.mgmt.costmanagement.models.ReportConfigAggregation] :param grouping: Array of group by expression to use in the report. Report can have up to 2 group by clauses. :type grouping: list[~azure.mgmt.costmanagement.models.ReportConfigGrouping] :param sorting: Array of order by expression to use in the report. :type sorting: list[~azure.mgmt.costmanagement.models.ReportConfigSorting] :param filter: Has filter expression to use in the report. :type filter: ~azure.mgmt.costmanagement.models.ReportConfigFilter ''' def __init__( self, **kwargs ): pass
2
1
11
0
11
0
1
0.83
1
1
0
0
1
6
1
1
46
4
23
13
18
19
11
10
9
1
1
0
1
10,276
Azure/azure-cli-extensions
src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/models/_models.py
azext_costmanagement.vendored_sdks.costmanagement.models._models.ReportConfigDatasetAutoGenerated
class ReportConfigDatasetAutoGenerated(msrest.serialization.Model): """The definition of data present in the report. :param granularity: The granularity of rows in the report. Possible values include: "Daily", "Monthly". :type granularity: str or ~azure.mgmt.costmanagement.models.ReportGranularityType :param configuration: Has configuration information for the data in the report. The configuration will be ignored if aggregation and grouping are provided. :type configuration: ~azure.mgmt.costmanagement.models.ReportConfigDatasetConfiguration :param aggregation: Dictionary of aggregation expression to use in the report. The key of each item in the dictionary is the alias for the aggregated column. Report can have up to 2 aggregation clauses. :type aggregation: dict[str, ~azure.mgmt.costmanagement.models.ReportConfigAggregation] :param grouping: Array of group by expression to use in the report. Report can have up to 2 group by clauses. :type grouping: list[~azure.mgmt.costmanagement.models.ReportConfigGrouping] :param sorting: Array of order by expression to use in the report. :type sorting: list[~azure.mgmt.costmanagement.models.ReportConfigSorting] :param filter: Has filter expression to use in the report. :type filter: ~azure.mgmt.costmanagement.models.ReportConfigFilterAutoGenerated """ _validation = { 'grouping': {'max_items': 2, 'min_items': 0}, } _attribute_map = { 'granularity': {'key': 'granularity', 'type': 'str'}, 'configuration': {'key': 'configuration', 'type': 'ReportConfigDatasetConfiguration'}, 'aggregation': {'key': 'aggregation', 'type': '{ReportConfigAggregation}'}, 'grouping': {'key': 'grouping', 'type': '[ReportConfigGrouping]'}, 'sorting': {'key': 'sorting', 'type': '[ReportConfigSorting]'}, 'filter': {'key': 'filter', 'type': 'ReportConfigFilterAutoGenerated'}, } def __init__( self, **kwargs ): super(ReportConfigDatasetAutoGenerated, self).__init__(**kwargs) self.granularity = kwargs.get('granularity', None) self.configuration = kwargs.get('configuration', None) self.aggregation = kwargs.get('aggregation', None) self.grouping = kwargs.get('grouping', None) self.sorting = kwargs.get('sorting', None) self.filter = kwargs.get('filter', None)
class ReportConfigDatasetAutoGenerated(msrest.serialization.Model): '''The definition of data present in the report. :param granularity: The granularity of rows in the report. Possible values include: "Daily", "Monthly". :type granularity: str or ~azure.mgmt.costmanagement.models.ReportGranularityType :param configuration: Has configuration information for the data in the report. The configuration will be ignored if aggregation and grouping are provided. :type configuration: ~azure.mgmt.costmanagement.models.ReportConfigDatasetConfiguration :param aggregation: Dictionary of aggregation expression to use in the report. The key of each item in the dictionary is the alias for the aggregated column. Report can have up to 2 aggregation clauses. :type aggregation: dict[str, ~azure.mgmt.costmanagement.models.ReportConfigAggregation] :param grouping: Array of group by expression to use in the report. Report can have up to 2 group by clauses. :type grouping: list[~azure.mgmt.costmanagement.models.ReportConfigGrouping] :param sorting: Array of order by expression to use in the report. :type sorting: list[~azure.mgmt.costmanagement.models.ReportConfigSorting] :param filter: Has filter expression to use in the report. :type filter: ~azure.mgmt.costmanagement.models.ReportConfigFilterAutoGenerated ''' def __init__( self, **kwargs ): pass
2
1
11
0
11
0
1
0.83
1
1
0
0
1
6
1
1
46
4
23
13
18
19
11
10
9
1
1
0
1
10,277
Azure/azure-cli-extensions
src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/models/_models.py
azext_costmanagement.vendored_sdks.costmanagement.models._models.ReportConfigDatasetConfiguration
class ReportConfigDatasetConfiguration(msrest.serialization.Model): """The configuration of dataset in the report. :param columns: Array of column names to be included in the report. Any valid report column name is allowed. If not provided, then report includes all columns. :type columns: list[str] """ _attribute_map = { 'columns': {'key': 'columns', 'type': '[str]'}, } def __init__( self, **kwargs ): super(ReportConfigDatasetConfiguration, self).__init__(**kwargs) self.columns = kwargs.get('columns', None)
class ReportConfigDatasetConfiguration(msrest.serialization.Model): '''The configuration of dataset in the report. :param columns: Array of column names to be included in the report. Any valid report column name is allowed. If not provided, then report includes all columns. :type columns: list[str] ''' def __init__( self, **kwargs ): pass
2
1
6
0
6
0
1
0.5
1
1
0
0
1
1
1
1
18
3
10
7
5
5
5
4
3
1
1
0
1
10,278
Azure/azure-cli-extensions
src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/models/_models.py
azext_costmanagement.vendored_sdks.costmanagement.models._models.ReportConfigDefinition
class ReportConfigDefinition(msrest.serialization.Model): """The definition of a report config. All required parameters must be populated in order to send to Azure. :param type: Required. The type of the report. Usage represents actual usage, forecast represents forecasted data and UsageAndForecast represents both usage and forecasted data. Actual usage and forecasted data can be differentiated based on dates. Possible values include: "Usage". :type type: str or ~azure.mgmt.costmanagement.models.ReportType :param timeframe: Required. The time frame for pulling data for the report. If custom, then a specific time period must be provided. Possible values include: "WeekToDate", "MonthToDate", "YearToDate", "Custom". :type timeframe: str or ~azure.mgmt.costmanagement.models.ReportTimeframeType :param time_period: Has time period for pulling data for the report. :type time_period: ~azure.mgmt.costmanagement.models.ReportConfigTimePeriod :param dataset: Has definition for data in this report config. :type dataset: ~azure.mgmt.costmanagement.models.ReportConfigDatasetAutoGenerated """ _validation = { 'type': {'required': True}, 'timeframe': {'required': True}, } _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, 'timeframe': {'key': 'timeframe', 'type': 'str'}, 'time_period': {'key': 'timePeriod', 'type': 'ReportConfigTimePeriod'}, 'dataset': {'key': 'dataset', 'type': 'ReportConfigDatasetAutoGenerated'}, } def __init__( self, **kwargs ): super(ReportConfigDefinition, self).__init__(**kwargs) self.type = kwargs['type'] self.timeframe = kwargs['timeframe'] self.time_period = kwargs.get('time_period', None) self.dataset = kwargs.get('dataset', None)
class ReportConfigDefinition(msrest.serialization.Model): '''The definition of a report config. All required parameters must be populated in order to send to Azure. :param type: Required. The type of the report. Usage represents actual usage, forecast represents forecasted data and UsageAndForecast represents both usage and forecasted data. Actual usage and forecasted data can be differentiated based on dates. Possible values include: "Usage". :type type: str or ~azure.mgmt.costmanagement.models.ReportType :param timeframe: Required. The time frame for pulling data for the report. If custom, then a specific time period must be provided. Possible values include: "WeekToDate", "MonthToDate", "YearToDate", "Custom". :type timeframe: str or ~azure.mgmt.costmanagement.models.ReportTimeframeType :param time_period: Has time period for pulling data for the report. :type time_period: ~azure.mgmt.costmanagement.models.ReportConfigTimePeriod :param dataset: Has definition for data in this report config. :type dataset: ~azure.mgmt.costmanagement.models.ReportConfigDatasetAutoGenerated ''' def __init__( self, **kwargs ): pass
2
1
9
0
9
0
1
0.8
1
1
0
0
1
4
1
1
41
5
20
11
15
16
9
8
7
1
1
0
1
10,279
Azure/azure-cli-extensions
src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/models/_models.py
azext_costmanagement.vendored_sdks.costmanagement.models._models.ReportConfigFilter
class ReportConfigFilter(msrest.serialization.Model): """The filter expression to be used in the report. :param and_property: The logical "AND" expression. Must have at least 2 items. :type and_property: list[~azure.mgmt.costmanagement.models.ReportConfigFilter] :param or_property: The logical "OR" expression. Must have at least 2 items. :type or_property: list[~azure.mgmt.costmanagement.models.ReportConfigFilter] :param not_property: The logical "NOT" expression. :type not_property: ~azure.mgmt.costmanagement.models.ReportConfigFilter :param dimension: Has comparison expression for a dimension. :type dimension: ~azure.mgmt.costmanagement.models.ReportConfigComparisonExpression :param tag: Has comparison expression for a tag. :type tag: ~azure.mgmt.costmanagement.models.ReportConfigComparisonExpression """ _validation = { 'and_property': {'min_items': 2}, 'or_property': {'min_items': 2}, } _attribute_map = { 'and_property': {'key': 'and', 'type': '[ReportConfigFilter]'}, 'or_property': {'key': 'or', 'type': '[ReportConfigFilter]'}, 'not_property': {'key': 'not', 'type': 'ReportConfigFilter'}, 'dimension': {'key': 'dimension', 'type': 'ReportConfigComparisonExpression'}, 'tag': {'key': 'tag', 'type': 'ReportConfigComparisonExpression'}, } def __init__( self, **kwargs ): super(ReportConfigFilter, self).__init__(**kwargs) self.and_property = kwargs.get('and_property', None) self.or_property = kwargs.get('or_property', None) self.not_property = kwargs.get('not_property', None) self.dimension = kwargs.get('dimension', None) self.tag = kwargs.get('tag', None)
class ReportConfigFilter(msrest.serialization.Model): '''The filter expression to be used in the report. :param and_property: The logical "AND" expression. Must have at least 2 items. :type and_property: list[~azure.mgmt.costmanagement.models.ReportConfigFilter] :param or_property: The logical "OR" expression. Must have at least 2 items. :type or_property: list[~azure.mgmt.costmanagement.models.ReportConfigFilter] :param not_property: The logical "NOT" expression. :type not_property: ~azure.mgmt.costmanagement.models.ReportConfigFilter :param dimension: Has comparison expression for a dimension. :type dimension: ~azure.mgmt.costmanagement.models.ReportConfigComparisonExpression :param tag: Has comparison expression for a tag. :type tag: ~azure.mgmt.costmanagement.models.ReportConfigComparisonExpression ''' def __init__( self, **kwargs ): pass
2
1
10
0
10
0
1
0.55
1
1
0
0
1
5
1
1
38
4
22
12
17
12
10
9
8
1
1
0
1
10,280
Azure/azure-cli-extensions
src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/models/_models.py
azext_costmanagement.vendored_sdks.costmanagement.models._models.ReportConfigFilterAutoGenerated
class ReportConfigFilterAutoGenerated(msrest.serialization.Model): """The filter expression to be used in the report. :param and_property: The logical "AND" expression. Must have at least 2 items. :type and_property: list[~azure.mgmt.costmanagement.models.ReportConfigFilterAutoGenerated] :param or_property: The logical "OR" expression. Must have at least 2 items. :type or_property: list[~azure.mgmt.costmanagement.models.ReportConfigFilterAutoGenerated] :param not_property: The logical "NOT" expression. :type not_property: ~azure.mgmt.costmanagement.models.ReportConfigFilterAutoGenerated :param dimension: Has comparison expression for a dimension. :type dimension: ~azure.mgmt.costmanagement.models.ReportConfigComparisonExpression :param tag: Has comparison expression for a tag. :type tag: ~azure.mgmt.costmanagement.models.ReportConfigComparisonExpression """ _validation = { 'and_property': {'min_items': 2}, 'or_property': {'min_items': 2}, } _attribute_map = { 'and_property': {'key': 'and', 'type': '[ReportConfigFilterAutoGenerated]'}, 'or_property': {'key': 'or', 'type': '[ReportConfigFilterAutoGenerated]'}, 'not_property': {'key': 'not', 'type': 'ReportConfigFilterAutoGenerated'}, 'dimension': {'key': 'dimension', 'type': 'ReportConfigComparisonExpression'}, 'tag': {'key': 'tag', 'type': 'ReportConfigComparisonExpression'}, } def __init__( self, **kwargs ): super(ReportConfigFilterAutoGenerated, self).__init__(**kwargs) self.and_property = kwargs.get('and_property', None) self.or_property = kwargs.get('or_property', None) self.not_property = kwargs.get('not_property', None) self.dimension = kwargs.get('dimension', None) self.tag = kwargs.get('tag', None)
class ReportConfigFilterAutoGenerated(msrest.serialization.Model): '''The filter expression to be used in the report. :param and_property: The logical "AND" expression. Must have at least 2 items. :type and_property: list[~azure.mgmt.costmanagement.models.ReportConfigFilterAutoGenerated] :param or_property: The logical "OR" expression. Must have at least 2 items. :type or_property: list[~azure.mgmt.costmanagement.models.ReportConfigFilterAutoGenerated] :param not_property: The logical "NOT" expression. :type not_property: ~azure.mgmt.costmanagement.models.ReportConfigFilterAutoGenerated :param dimension: Has comparison expression for a dimension. :type dimension: ~azure.mgmt.costmanagement.models.ReportConfigComparisonExpression :param tag: Has comparison expression for a tag. :type tag: ~azure.mgmt.costmanagement.models.ReportConfigComparisonExpression ''' def __init__( self, **kwargs ): pass
2
1
10
0
10
0
1
0.55
1
1
0
0
1
5
1
1
38
4
22
12
17
12
10
9
8
1
1
0
1
10,281
Azure/azure-cli-extensions
src/costmanagement/azext_costmanagement/vendored_sdks/costmanagement/models/_models.py
azext_costmanagement.vendored_sdks.costmanagement.models._models.ReportConfigSorting
class ReportConfigSorting(msrest.serialization.Model): """The order by expression to be used in the report. All required parameters must be populated in order to send to Azure. :param direction: Direction of sort. Possible values include: "Ascending", "Descending". :type direction: str or ~azure.mgmt.costmanagement.models.ReportConfigSortingDirection :param name: Required. The name of the column to sort. :type name: str """ _validation = { 'name': {'required': True}, } _attribute_map = { 'direction': {'key': 'direction', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, } def __init__( self, **kwargs ): super(ReportConfigSorting, self).__init__(**kwargs) self.direction = kwargs.get('direction', None) self.name = kwargs['name']
class ReportConfigSorting(msrest.serialization.Model): '''The order by expression to be used in the report. All required parameters must be populated in order to send to Azure. :param direction: Direction of sort. Possible values include: "Ascending", "Descending". :type direction: str or ~azure.mgmt.costmanagement.models.ReportConfigSortingDirection :param name: Required. The name of the column to sort. :type name: str ''' def __init__( self, **kwargs ): pass
2
1
7
0
7
0
1
0.47
1
1
0
0
1
2
1
1
27
5
15
9
10
7
7
6
5
1
1
0
1
10,282
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/providerhub/azext_providerhub/aaz/latest/providerhub/sku/nested_resource_type_third/_show.py
azext_providerhub.aaz.latest.providerhub.sku.nested_resource_type_third._show.Show.SkusGetNestedResourceTypeThird
class SkusGetNestedResourceTypeThird(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/resourcetypeRegistrations/{nestedResourceTypeSecond}/resourcetypeRegistrations/{nestedResourceTypeThird}/skus/{sku}", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "nestedResourceTypeFirst", self.ctx.args.nested_resource_type_first, required=True, ), **self.serialize_url_param( "nestedResourceTypeSecond", self.ctx.args.nested_resource_type_second, required=True, ), **self.serialize_url_param( "nestedResourceTypeThird", self.ctx.args.nested_resource_type_third, required=True, ), **self.serialize_url_param( "providerNamespace", self.ctx.args.provider_namespace, required=True, ), **self.serialize_url_param( "resourceType", self.ctx.args.resource_type, required=True, ), **self.serialize_url_param( "sku", self.ctx.args.name, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-04-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.id = AAZStrType( flags={"read_only": True}, ) _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) _schema_on_200.properties = AAZObjectType() _schema_on_200.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _schema_on_200.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200.properties properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) properties.sku_settings = AAZListType( serialized_name="skuSettings", flags={"required": True}, ) sku_settings = cls._schema_on_200.properties.sku_settings sku_settings.Element = AAZObjectType() _element = cls._schema_on_200.properties.sku_settings.Element _element.capabilities = AAZListType() _element.capacity = AAZObjectType() _element.costs = AAZListType() _element.family = AAZStrType() _element.kind = AAZStrType() _element.location_info = AAZListType( serialized_name="locationInfo", ) _element.locations = AAZListType() _element.name = AAZStrType( flags={"required": True}, ) _element.required_features = AAZListType( serialized_name="requiredFeatures", ) _element.required_quota_ids = AAZListType( serialized_name="requiredQuotaIds", ) _element.size = AAZStrType() _element.tier = AAZStrType() capabilities = cls._schema_on_200.properties.sku_settings.Element.capabilities capabilities.Element = AAZObjectType() _ShowHelper._build_schema_sku_capability_read(capabilities.Element) capacity = cls._schema_on_200.properties.sku_settings.Element.capacity capacity.default = AAZIntType() capacity.maximum = AAZIntType() capacity.minimum = AAZIntType( flags={"required": True}, ) capacity.scale_type = AAZStrType( serialized_name="scaleType", ) costs = cls._schema_on_200.properties.sku_settings.Element.costs costs.Element = AAZObjectType() _element = cls._schema_on_200.properties.sku_settings.Element.costs.Element _element.extended_unit = AAZStrType( serialized_name="extendedUnit", ) _element.meter_id = AAZStrType( serialized_name="meterId", flags={"required": True}, ) _element.quantity = AAZIntType() location_info = cls._schema_on_200.properties.sku_settings.Element.location_info location_info.Element = AAZObjectType() _element = cls._schema_on_200.properties.sku_settings.Element.location_info.Element _element.extended_locations = AAZListType( serialized_name="extendedLocations", ) _element.location = AAZStrType( flags={"required": True}, ) _element.type = AAZStrType() _element.zone_details = AAZListType( serialized_name="zoneDetails", ) _element.zones = AAZListType() extended_locations = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.extended_locations extended_locations.Element = AAZStrType() zone_details = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details zone_details.Element = AAZObjectType() _element = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details.Element _element.capabilities = AAZListType() _element.name = AAZListType() capabilities = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details.Element.capabilities capabilities.Element = AAZObjectType() _ShowHelper._build_schema_sku_capability_read(capabilities.Element) name = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zone_details.Element.name name.Element = AAZStrType() zones = cls._schema_on_200.properties.sku_settings.Element.location_info.Element.zones zones.Element = AAZStrType() locations = cls._schema_on_200.properties.sku_settings.Element.locations locations.Element = AAZStrType() required_features = cls._schema_on_200.properties.sku_settings.Element.required_features required_features.Element = AAZStrType() required_quota_ids = cls._schema_on_200.properties.sku_settings.Element.required_quota_ids required_quota_ids.Element = AAZStrType() system_data = cls._schema_on_200.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", ) system_data.created_by = AAZStrType( serialized_name="createdBy", ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", ) return cls._schema_on_200
class SkusGetNestedResourceTypeThird(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
24
3
22
0
1
0
1
1
1
0
8
0
9
9
240
33
207
41
190
0
105
34
95
2
1
1
11
10,283
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/providerhub/azext_providerhub/aaz/latest/providerhub/sku/nested_resource_type_third/_list.py
azext_providerhub.aaz.latest.providerhub.sku.nested_resource_type_third._list.List.SkusListByResourceTypeRegistrationsNestedResourceTypeThird
class SkusListByResourceTypeRegistrationsNestedResourceTypeThird(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/resourcetypeRegistrations/{nestedResourceTypeSecond}/resourcetypeRegistrations/{nestedResourceTypeThird}/skus", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "nestedResourceTypeFirst", self.ctx.args.nested_resource_type_first, required=True, ), **self.serialize_url_param( "nestedResourceTypeSecond", self.ctx.args.nested_resource_type_second, required=True, ), **self.serialize_url_param( "nestedResourceTypeThird", self.ctx.args.nested_resource_type_third, required=True, ), **self.serialize_url_param( "providerNamespace", self.ctx.args.provider_namespace, required=True, ), **self.serialize_url_param( "resourceType", self.ctx.args.resource_type, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-04-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.next_link = AAZStrType( serialized_name="nextLink", ) _schema_on_200.value = AAZListType() value = cls._schema_on_200.value value.Element = AAZObjectType() _element = cls._schema_on_200.value.Element _element.id = AAZStrType( flags={"read_only": True}, ) _element.name = AAZStrType( flags={"read_only": True}, ) _element.properties = AAZObjectType() _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _element.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200.value.Element.properties properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) properties.sku_settings = AAZListType( serialized_name="skuSettings", flags={"required": True}, ) sku_settings = cls._schema_on_200.value.Element.properties.sku_settings sku_settings.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.sku_settings.Element _element.capabilities = AAZListType() _element.capacity = AAZObjectType() _element.costs = AAZListType() _element.family = AAZStrType() _element.kind = AAZStrType() _element.location_info = AAZListType( serialized_name="locationInfo", ) _element.locations = AAZListType() _element.name = AAZStrType( flags={"required": True}, ) _element.required_features = AAZListType( serialized_name="requiredFeatures", ) _element.required_quota_ids = AAZListType( serialized_name="requiredQuotaIds", ) _element.size = AAZStrType() _element.tier = AAZStrType() capabilities = cls._schema_on_200.value.Element.properties.sku_settings.Element.capabilities capabilities.Element = AAZObjectType() _ListHelper._build_schema_sku_capability_read(capabilities.Element) capacity = cls._schema_on_200.value.Element.properties.sku_settings.Element.capacity capacity.default = AAZIntType() capacity.maximum = AAZIntType() capacity.minimum = AAZIntType( flags={"required": True}, ) capacity.scale_type = AAZStrType( serialized_name="scaleType", ) costs = cls._schema_on_200.value.Element.properties.sku_settings.Element.costs costs.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.sku_settings.Element.costs.Element _element.extended_unit = AAZStrType( serialized_name="extendedUnit", ) _element.meter_id = AAZStrType( serialized_name="meterId", flags={"required": True}, ) _element.quantity = AAZIntType() location_info = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info location_info.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info.Element _element.extended_locations = AAZListType( serialized_name="extendedLocations", ) _element.location = AAZStrType( flags={"required": True}, ) _element.type = AAZStrType() _element.zone_details = AAZListType( serialized_name="zoneDetails", ) _element.zones = AAZListType() extended_locations = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info.Element.extended_locations extended_locations.Element = AAZStrType() zone_details = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info.Element.zone_details zone_details.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info.Element.zone_details.Element _element.capabilities = AAZListType() _element.name = AAZListType() capabilities = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info.Element.zone_details.Element.capabilities capabilities.Element = AAZObjectType() _ListHelper._build_schema_sku_capability_read(capabilities.Element) name = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info.Element.zone_details.Element.name name.Element = AAZStrType() zones = cls._schema_on_200.value.Element.properties.sku_settings.Element.location_info.Element.zones zones.Element = AAZStrType() locations = cls._schema_on_200.value.Element.properties.sku_settings.Element.locations locations.Element = AAZStrType() required_features = cls._schema_on_200.value.Element.properties.sku_settings.Element.required_features required_features.Element = AAZStrType() required_quota_ids = cls._schema_on_200.value.Element.properties.sku_settings.Element.required_quota_ids required_quota_ids.Element = AAZStrType() system_data = cls._schema_on_200.value.Element.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", ) system_data.created_by = AAZStrType( serialized_name="createdBy", ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", ) return cls._schema_on_200
class SkusListByResourceTypeRegistrationsNestedResourceTypeThird(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
25
3
22
0
1
0
1
1
1
0
8
0
9
9
245
35
210
42
193
0
110
35
100
2
1
1
11
10,284
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/providerhub/azext_providerhub/aaz/latest/providerhub/sku/nested_resource_type_third/_delete.py
azext_providerhub.aaz.latest.providerhub.sku.nested_resource_type_third._delete.Delete.SkusDeleteNestedResourceTypeThird
class SkusDeleteNestedResourceTypeThird(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) if session.http_response.status_code in [204]: return self.on_204(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/resourcetypeRegistrations/{nestedResourceTypeSecond}/resourcetypeRegistrations/{nestedResourceTypeThird}/skus/{sku}", **self.url_parameters ) @property def method(self): return "DELETE" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "nestedResourceTypeFirst", self.ctx.args.nested_resource_type_first, required=True, ), **self.serialize_url_param( "nestedResourceTypeSecond", self.ctx.args.nested_resource_type_second, required=True, ), **self.serialize_url_param( "nestedResourceTypeThird", self.ctx.args.nested_resource_type_third, required=True, ), **self.serialize_url_param( "providerNamespace", self.ctx.args.provider_namespace, required=True, ), **self.serialize_url_param( "resourceType", self.ctx.args.resource_type, required=True, ), **self.serialize_url_param( "sku", self.ctx.args.name, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-04-01-preview", required=True, ), } return parameters def on_200(self, session): pass def on_204(self, session): pass
class SkusDeleteNestedResourceTypeThird(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass def on_200(self, session): pass def on_204(self, session): pass
14
0
8
0
8
0
1
0
1
0
0
0
8
0
8
8
77
9
68
19
54
0
26
14
17
3
1
1
10
10,285
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/providerhub/azext_providerhub/aaz/latest/providerhub/resource_type_registration/_update.py
azext_providerhub.aaz.latest.providerhub.resource_type_registration._update.Update.ResourceTypeRegistrationsGet
class ResourceTypeRegistrationsGet(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "providerNamespace", self.ctx.args.provider_namespace, required=True, ), **self.serialize_url_param( "resourceType", self.ctx.args.resource_type, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-04-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _UpdateHelper._build_schema_resource_type_registration_read( cls._schema_on_200) return cls._schema_on_200
class ResourceTypeRegistrationsGet(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
7
0
7
0
1
0
1
1
1
0
8
0
9
9
82
13
69
25
52
0
33
18
23
2
1
1
11
10,286
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/providerhub/azext_providerhub/aaz/latest/providerhub/resource_type_registration/_update.py
azext_providerhub.aaz.latest.providerhub.resource_type_registration._update.Update.ResourceTypeRegistrationsCreateOrUpdate
class ResourceTypeRegistrationsCreateOrUpdate(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [202]: return self.client.build_lro_polling( self.ctx.args.no_wait, session, self.on_200_201, self.on_error, lro_options={"final-state-via": "azure-async-operation"}, path_format_arguments=self.url_parameters, ) if session.http_response.status_code in [200, 201]: return self.client.build_lro_polling( self.ctx.args.no_wait, session, self.on_200_201, self.on_error, lro_options={"final-state-via": "azure-async-operation"}, path_format_arguments=self.url_parameters, ) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}", **self.url_parameters ) @property def method(self): return "PUT" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "providerNamespace", self.ctx.args.provider_namespace, required=True, ), **self.serialize_url_param( "resourceType", self.ctx.args.resource_type, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-04-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Content-Type", "application/json", ), **self.serialize_header_param( "Accept", "application/json", ), } return parameters @property def content(self): _content_value, _builder = self.new_content_builder( self.ctx.args, value=self.ctx.vars.instance, ) return self.serialize_content(_content_value) def on_200_201(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200_201 ) _schema_on_200_201 = None @classmethod def _build_schema_on_200_201(cls): if cls._schema_on_200_201 is not None: return cls._schema_on_200_201 cls._schema_on_200_201 = AAZObjectType() _UpdateHelper._build_schema_resource_type_registration_read( cls._schema_on_200_201) return cls._schema_on_200_201
class ResourceTypeRegistrationsCreateOrUpdate(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass @property def content(self): pass def on_200_201(self, session): pass @classmethod def _build_schema_on_200_201(cls): pass
19
0
9
0
8
0
1
0
1
1
1
0
9
1
10
10
110
15
95
29
76
0
38
20
27
3
1
1
13
10,287
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/providerhub/azext_providerhub/aaz/latest/providerhub/resource_type_registration/_update.py
azext_providerhub.aaz.latest.providerhub.resource_type_registration._update.Update.InstanceUpdateByJson
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): def __call__(self, *args, **kwargs): self._update_instance(self.ctx.vars.instance) def _update_instance(self, instance): _instance_value, _builder = self.new_content_builder( self.ctx.args, value=instance, typ=AAZObjectType ) _builder.set_prop("kind", AAZStrType, ".kind") _builder.set_prop("properties", AAZObjectType) properties = _builder.get(".properties") if properties is not None: properties.set_prop("addResourceListTargetLocations", AAZBoolType, ".add_resource_list_target_locations") properties.set_prop("additionalOptions", AAZStrType, ".additional_options") properties.set_prop("allowEmptyRoleAssignments", AAZBoolType, ".allow_empty_role_assignments") properties.set_prop("allowedResourceNames", AAZListType, ".allowed_resource_names") properties.set_prop("allowedTemplateDeploymentReferenceActions", AAZListType, ".allowed_template_deployment_reference_actions") properties.set_prop( "allowedUnauthorizedActions", AAZListType, ".allowed_unauthorized_actions") properties.set_prop( "apiProfiles", AAZListType, ".api_profiles") properties.set_prop("asyncOperationResourceTypeName", AAZStrType, ".async_operation_resource_type_name") properties.set_prop("asyncTimeoutRules", AAZListType, ".async_timeout_rules") properties.set_prop( "authorizationActionMappings", AAZListType, ".authorization_action_mappings") properties.set_prop("availabilityZoneRule", AAZObjectType, ".availability_zone_rule") properties.set_prop( "capacityRule", AAZObjectType, ".capacity_rule") properties.set_prop("category", AAZStrType, ".category") properties.set_prop("checkNameAvailabilitySpecifications", AAZObjectType, ".check_name_availability_specifications") properties.set_prop("commonApiVersions", AAZListType, ".common_api_versions") properties.set_prop( "crossTenantTokenValidation", AAZStrType, ".cross_tenant_token_validation") properties.set_prop("defaultApiVersion", AAZStrType, ".default_api_version") properties.set_prop("disallowedActionVerbs", AAZListType, ".disallowed_action_verbs") properties.set_prop( "disallowedEndUserOperations", AAZListType, ".disallowed_end_user_operations") properties.set_prop("dstsConfiguration", AAZObjectType, ".dsts_configuration") properties.set_prop("enableAsyncOperation", AAZBoolType, ".enable_async_operation") properties.set_prop("enableThirdPartyS2S", AAZBoolType, ".enable_third_party_s2_s") properties.set_prop("endpoints", AAZListType, ".endpoints") properties.set_prop("extendedLocations", AAZListType, ".extended_locations") properties.set_prop("extensionOptions", AAZObjectType) properties.set_prop("featuresRule", AAZObjectType) properties.set_prop("frontdoorRequestMode", AAZStrType, ".frontdoor_request_mode") properties.set_prop("groupingTag", AAZStrType, ".grouping_tag") properties.set_prop("identityManagement", AAZObjectType, ".identity_management") properties.set_prop( "isPureProxy", AAZBoolType, ".is_pure_proxy") properties.set_prop("legacyName", AAZStrType, ".legacy_name") properties.set_prop( "legacyNames", AAZListType, ".legacy_names") properties.set_prop( "legacyPolicy", AAZObjectType, ".legacy_policy") properties.set_prop("linkedAccessChecks", AAZListType, ".linked_access_checks") properties.set_prop("linkedNotificationRules", AAZListType, ".linked_notification_rules") properties.set_prop("linkedOperationRules", AAZListType, ".linked_operation_rules") properties.set_prop( "loggingRules", AAZListType, ".logging_rules") properties.set_prop("managedResourceGroupConfiguration", AAZObjectType, ".managed_resource_group_configuration") properties.set_prop("management", AAZObjectType, ".management") properties.set_prop( "manifestLink", AAZStrType, ".manifest_link") properties.set_prop("marketplaceOptions", AAZObjectType, ".marketplace_options") properties.set_prop("marketplaceType", AAZStrType, ".marketplace_type") properties.set_prop("metadata", AAZDictType, ".metadata") properties.set_prop( "notifications", AAZListType, ".notifications") properties.set_prop("onBehalfOfTokens", AAZObjectType, ".on_behalf_of_tokens") properties.set_prop("openApiConfiguration", AAZObjectType, ".open_api_configuration") properties.set_prop("policyExecutionType", AAZStrType, ".policy_execution_type") properties.set_prop("privateEndpointConfiguration", AAZObjectType, ".private_endpoint_configuration") properties.set_prop("quotaRule", AAZObjectType, ".quota_rule") properties.set_prop("regionality", AAZStrType, ".regionality") properties.set_prop("requestHeaderOptions", AAZObjectType) properties.set_prop("requiredFeatures", AAZListType, ".required_features") properties.set_prop( "resourceCache", AAZObjectType, ".resource_cache") properties.set_prop("resourceConcurrencyControlOptions", AAZDictType, ".resource_concurrency_control_options") properties.set_prop("resourceDeletionPolicy", AAZStrType, ".resource_deletion_policy") properties.set_prop( "resourceGraphConfiguration", AAZObjectType, ".resource_graph_configuration") properties.set_prop("resourceManagementOptions", AAZObjectType, ".resource_management_options") properties.set_prop("resourceMovePolicy", AAZObjectType, ".resource_move_policy") properties.set_prop("resourceProviderAuthorizationRules", AAZObjectType, ".resource_provider_authorization_rules") properties.set_prop("resourceQueryManagement", AAZObjectType, ".resource_query_management") properties.set_prop("resourceSubType", AAZStrType, ".resource_sub_type") properties.set_prop("resourceTypeCommonAttributeManagement", AAZObjectType, ".resource_type_common_attribute_management") properties.set_prop("resourceValidation", AAZStrType, ".resource_validation") properties.set_prop( "routingRule", AAZObjectType, ".routing_rule") properties.set_prop("routingType", AAZStrType, ".routing_type") properties.set_prop("serviceTreeInfos", AAZListType, ".service_tree_infos") properties.set_prop("skuLink", AAZStrType, ".sku_link") properties.set_prop( "subscriptionLifecycleNotificationSpecifications", AAZObjectType) properties.set_prop("subscriptionStateRules", AAZListType, ".subscription_state_rules") properties.set_prop( "supportsTags", AAZBoolType, ".supports_tags") properties.set_prop("swaggerSpecifications", AAZListType, ".swagger_specifications") properties.set_prop("templateDeploymentOptions", AAZObjectType, ".template_deployment_options") properties.set_prop("templateDeploymentPolicy", AAZObjectType, ".template_deployment_policy") properties.set_prop("throttlingRules", AAZListType, ".throttling_rules") _UpdateHelper._build_schema_token_auth_configuration_update(properties.set_prop( "tokenAuthConfiguration", AAZObjectType, ".token_auth_configuration")) allowed_resource_names = _builder.get( ".properties.allowedResourceNames") if allowed_resource_names is not None: allowed_resource_names.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.allowedResourceNames[]") if _elements is not None: _elements.set_prop( "getActionVerb", AAZStrType, ".get_action_verb") _elements.set_prop("name", AAZStrType, ".name") allowed_template_deployment_reference_actions = _builder.get( ".properties.allowedTemplateDeploymentReferenceActions") if allowed_template_deployment_reference_actions is not None: allowed_template_deployment_reference_actions.set_elements( AAZStrType, ".") allowed_unauthorized_actions = _builder.get( ".properties.allowedUnauthorizedActions") if allowed_unauthorized_actions is not None: allowed_unauthorized_actions.set_elements(AAZStrType, ".") api_profiles = _builder.get(".properties.apiProfiles") if api_profiles is not None: api_profiles.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.apiProfiles[]") if _elements is not None: _elements.set_prop("apiVersion", AAZStrType, ".api_version") _elements.set_prop( "profileVersion", AAZStrType, ".profile_version") async_timeout_rules = _builder.get(".properties.asyncTimeoutRules") if async_timeout_rules is not None: async_timeout_rules.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.asyncTimeoutRules[]") if _elements is not None: _elements.set_prop("actionName", AAZStrType, ".action_name") _elements.set_prop("timeout", AAZStrType, ".timeout") authorization_action_mappings = _builder.get( ".properties.authorizationActionMappings") if authorization_action_mappings is not None: authorization_action_mappings.set_elements(AAZObjectType, ".") _elements = _builder.get( ".properties.authorizationActionMappings[]") if _elements is not None: _elements.set_prop("desired", AAZStrType, ".desired") _elements.set_prop("original", AAZStrType, ".original") availability_zone_rule = _builder.get( ".properties.availabilityZoneRule") if availability_zone_rule is not None: availability_zone_rule.set_prop( "availabilityZonePolicy", AAZStrType, ".availability_zone_policy") capacity_rule = _builder.get(".properties.capacityRule") if capacity_rule is not None: capacity_rule.set_prop( "capacityPolicy", AAZStrType, ".capacity_policy") capacity_rule.set_prop("skuAlias", AAZStrType, ".sku_alias") check_name_availability_specifications = _builder.get( ".properties.checkNameAvailabilitySpecifications") if check_name_availability_specifications is not None: check_name_availability_specifications.set_prop( "enableDefaultValidation", AAZBoolType, ".enable_default_validation") check_name_availability_specifications.set_prop( "resourceTypesWithCustomValidation", AAZListType, ".resource_types_with_custom_validation") resource_types_with_custom_validation = _builder.get( ".properties.checkNameAvailabilitySpecifications.resourceTypesWithCustomValidation") if resource_types_with_custom_validation is not None: resource_types_with_custom_validation.set_elements( AAZStrType, ".") common_api_versions = _builder.get(".properties.commonApiVersions") if common_api_versions is not None: common_api_versions.set_elements(AAZStrType, ".") disallowed_action_verbs = _builder.get( ".properties.disallowedActionVerbs") if disallowed_action_verbs is not None: disallowed_action_verbs.set_elements(AAZStrType, ".") disallowed_end_user_operations = _builder.get( ".properties.disallowedEndUserOperations") if disallowed_end_user_operations is not None: disallowed_end_user_operations.set_elements(AAZStrType, ".") dsts_configuration = _builder.get(".properties.dstsConfiguration") if dsts_configuration is not None: dsts_configuration.set_prop( "serviceDnsName", AAZStrType, ".service_dns_name") dsts_configuration.set_prop("serviceName", AAZStrType, ".service_name", typ_kwargs={ "flags": {"required": True}}) endpoints = _builder.get(".properties.endpoints") if endpoints is not None: endpoints.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.endpoints[]") if _elements is not None: _elements.set_prop("apiVersion", AAZStrType, ".api_version") _elements.set_prop("apiVersions", AAZListType, ".api_versions") _elements.set_prop( "dataBoundary", AAZStrType, ".data_boundary") _elements.set_prop("dstsConfiguration", AAZObjectType, ".dsts_configuration") _elements.set_prop("enabled", AAZBoolType, ".enabled") _elements.set_prop( "endpointType", AAZStrType, ".endpoint_type") _elements.set_prop("endpointUri", AAZStrType, ".endpoint_uri") _elements.set_prop("extensions", AAZListType, ".extensions") _elements.set_prop( "featuresRule", AAZObjectType, ".features_rule") _elements.set_prop("kind", AAZStrType, ".kind") _elements.set_prop("locations", AAZListType, ".locations") _elements.set_prop("requiredFeatures", AAZListType, ".required_features") _elements.set_prop("skuLink", AAZStrType, ".sku_link") _elements.set_prop("timeout", AAZStrType, ".timeout") _UpdateHelper._build_schema_token_auth_configuration_update(_elements.set_prop( "tokenAuthConfiguration", AAZObjectType, ".token_auth_configuration")) _elements.set_prop("zones", AAZListType, ".zones") api_versions = _builder.get(".properties.endpoints[].apiVersions") if api_versions is not None: api_versions.set_elements(AAZStrType, ".") dsts_configuration = _builder.get( ".properties.endpoints[].dstsConfiguration") if dsts_configuration is not None: dsts_configuration.set_prop( "serviceDnsName", AAZStrType, ".service_dns_name") dsts_configuration.set_prop("serviceName", AAZStrType, ".service_name", typ_kwargs={ "flags": {"required": True}}) extensions = _builder.get(".properties.endpoints[].extensions") if extensions is not None: extensions.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.endpoints[].extensions[]") if _elements is not None: _elements.set_prop("endpointUri", AAZStrType, ".endpoint_uri") _elements.set_prop("extensionCategories", AAZListType, ".extension_categories") _elements.set_prop("timeout", AAZStrType, ".timeout") extension_categories = _builder.get( ".properties.endpoints[].extensions[].extensionCategories") if extension_categories is not None: extension_categories.set_elements(AAZStrType, ".") features_rule = _builder.get( ".properties.endpoints[].featuresRule") if features_rule is not None: features_rule.set_prop("requiredFeaturesPolicy", AAZStrType, ".required_features_policy", typ_kwargs={ "flags": {"required": True}}) locations = _builder.get(".properties.endpoints[].locations") if locations is not None: locations.set_elements(AAZStrType, ".") required_features = _builder.get( ".properties.endpoints[].requiredFeatures") if required_features is not None: required_features.set_elements(AAZStrType, ".") zones = _builder.get(".properties.endpoints[].zones") if zones is not None: zones.set_elements(AAZStrType, ".") extended_locations = _builder.get(".properties.extendedLocations") if extended_locations is not None: extended_locations.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.extendedLocations[]") if _elements is not None: _elements.set_prop("supportedPolicy", AAZStrType, ".supported_policy") _elements.set_prop("type", AAZStrType, ".type") extension_options = _builder.get(".properties.extensionOptions") if extension_options is not None: extension_options.set_prop( "resourceCreationBegin", AAZObjectType, ".resource_creation_begin") resource_creation_begin = _builder.get( ".properties.extensionOptions.resourceCreationBegin") if resource_creation_begin is not None: resource_creation_begin.set_prop( "request", AAZListType, ".request") resource_creation_begin.set_prop( "response", AAZListType, ".response") request = _builder.get( ".properties.extensionOptions.resourceCreationBegin.request") if request is not None: request.set_elements(AAZStrType, ".") response = _builder.get( ".properties.extensionOptions.resourceCreationBegin.response") if response is not None: response.set_elements(AAZStrType, ".") features_rule = _builder.get(".properties.featuresRule") if features_rule is not None: features_rule.set_prop("requiredFeaturesPolicy", AAZStrType, ".required_features_policy", typ_kwargs={ "flags": {"required": True}}) identity_management = _builder.get( ".properties.identityManagement") if identity_management is not None: identity_management.set_prop( "applicationId", AAZStrType, ".application_id") identity_management.set_prop( "applicationIds", AAZListType, ".application_ids") identity_management.set_prop( "delegationAppIds", AAZListType, ".delegation_app_ids") identity_management.set_prop("type", AAZStrType, ".type") application_ids = _builder.get( ".properties.identityManagement.applicationIds") if application_ids is not None: application_ids.set_elements(AAZStrType, ".") delegation_app_ids = _builder.get( ".properties.identityManagement.delegationAppIds") if delegation_app_ids is not None: delegation_app_ids.set_elements(AAZStrType, ".") legacy_names = _builder.get(".properties.legacyNames") if legacy_names is not None: legacy_names.set_elements(AAZStrType, ".") legacy_policy = _builder.get(".properties.legacyPolicy") if legacy_policy is not None: legacy_policy.set_prop( "disallowedConditions", AAZListType, ".disallowed_conditions") legacy_policy.set_prop( "disallowedLegacyOperations", AAZListType, ".disallowed_legacy_operations") disallowed_conditions = _builder.get( ".properties.legacyPolicy.disallowedConditions") if disallowed_conditions is not None: disallowed_conditions.set_elements(AAZObjectType, ".") _elements = _builder.get( ".properties.legacyPolicy.disallowedConditions[]") if _elements is not None: _elements.set_prop("disallowedLegacyOperations", AAZListType, ".disallowed_legacy_operations") _elements.set_prop("feature", AAZStrType, ".feature") disallowed_legacy_operations = _builder.get( ".properties.legacyPolicy.disallowedConditions[].disallowedLegacyOperations") if disallowed_legacy_operations is not None: disallowed_legacy_operations.set_elements(AAZStrType, ".") disallowed_legacy_operations = _builder.get( ".properties.legacyPolicy.disallowedLegacyOperations") if disallowed_legacy_operations is not None: disallowed_legacy_operations.set_elements(AAZStrType, ".") linked_access_checks = _builder.get( ".properties.linkedAccessChecks") if linked_access_checks is not None: linked_access_checks.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.linkedAccessChecks[]") if _elements is not None: _elements.set_prop("actionName", AAZStrType, ".action_name") _elements.set_prop( "linkedAction", AAZStrType, ".linked_action") _elements.set_prop("linkedActionVerb", AAZStrType, ".linked_action_verb") _elements.set_prop( "linkedProperty", AAZStrType, ".linked_property") _elements.set_prop("linkedType", AAZStrType, ".linked_type") linked_notification_rules = _builder.get( ".properties.linkedNotificationRules") if linked_notification_rules is not None: linked_notification_rules.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.linkedNotificationRules[]") if _elements is not None: _elements.set_prop("actions", AAZListType, ".actions") _elements.set_prop("actionsOnFailedOperation", AAZListType, ".actions_on_failed_operation") _elements.set_prop("fastPathActions", AAZListType, ".fast_path_actions") _elements.set_prop("fastPathActionsOnFailedOperation", AAZListType, ".fast_path_actions_on_failed_operation") _elements.set_prop("linkedNotificationTimeout", AAZStrType, ".linked_notification_timeout") actions = _builder.get( ".properties.linkedNotificationRules[].actions") if actions is not None: actions.set_elements(AAZStrType, ".") actions_on_failed_operation = _builder.get( ".properties.linkedNotificationRules[].actionsOnFailedOperation") if actions_on_failed_operation is not None: actions_on_failed_operation.set_elements(AAZStrType, ".") fast_path_actions = _builder.get( ".properties.linkedNotificationRules[].fastPathActions") if fast_path_actions is not None: fast_path_actions.set_elements(AAZStrType, ".") fast_path_actions_on_failed_operation = _builder.get( ".properties.linkedNotificationRules[].fastPathActionsOnFailedOperation") if fast_path_actions_on_failed_operation is not None: fast_path_actions_on_failed_operation.set_elements( AAZStrType, ".") linked_operation_rules = _builder.get( ".properties.linkedOperationRules") if linked_operation_rules is not None: linked_operation_rules.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.linkedOperationRules[]") if _elements is not None: _elements.set_prop( "dependsOnTypes", AAZListType, ".depends_on_types") _elements.set_prop("linkedAction", AAZStrType, ".linked_action", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("linkedOperation", AAZStrType, ".linked_operation", typ_kwargs={ "flags": {"required": True}}) depends_on_types = _builder.get( ".properties.linkedOperationRules[].dependsOnTypes") if depends_on_types is not None: depends_on_types.set_elements(AAZStrType, ".") logging_rules = _builder.get(".properties.loggingRules") if logging_rules is not None: logging_rules.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.loggingRules[]") if _elements is not None: _elements.set_prop("action", AAZStrType, ".action", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("detailLevel", AAZStrType, ".detail_level", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("direction", AAZStrType, ".direction", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("hiddenPropertyPaths", AAZObjectType, ".hidden_property_paths") hidden_property_paths = _builder.get( ".properties.loggingRules[].hiddenPropertyPaths") if hidden_property_paths is not None: hidden_property_paths.set_prop( "hiddenPathsOnRequest", AAZListType, ".hidden_paths_on_request") hidden_property_paths.set_prop( "hiddenPathsOnResponse", AAZListType, ".hidden_paths_on_response") hidden_paths_on_request = _builder.get( ".properties.loggingRules[].hiddenPropertyPaths.hiddenPathsOnRequest") if hidden_paths_on_request is not None: hidden_paths_on_request.set_elements(AAZStrType, ".") hidden_paths_on_response = _builder.get( ".properties.loggingRules[].hiddenPropertyPaths.hiddenPathsOnResponse") if hidden_paths_on_response is not None: hidden_paths_on_response.set_elements(AAZStrType, ".") managed_resource_group_configuration = _builder.get( ".properties.managedResourceGroupConfiguration") if managed_resource_group_configuration is not None: managed_resource_group_configuration.set_prop( "applicationIds", AAZListType, ".application_ids") managed_resource_group_configuration.set_prop( "denyAssignmentConfiguration", AAZObjectType, ".deny_assignment_configuration") managed_resource_group_configuration.set_prop( "enabled", AAZBoolType, ".enabled") managed_resource_group_configuration.set_prop( "resourceGroupLocationOverride", AAZStrType, ".resource_group_location_override") application_ids = _builder.get( ".properties.managedResourceGroupConfiguration.applicationIds") if application_ids is not None: application_ids.set_elements(AAZStrType, ".") deny_assignment_configuration = _builder.get( ".properties.managedResourceGroupConfiguration.denyAssignmentConfiguration") if deny_assignment_configuration is not None: deny_assignment_configuration.set_prop( "enabled", AAZBoolType, ".enabled") deny_assignment_configuration.set_prop( "notActions", AAZListType, ".not_actions") not_actions = _builder.get( ".properties.managedResourceGroupConfiguration.denyAssignmentConfiguration.notActions") if not_actions is not None: not_actions.set_elements(AAZStrType, ".") management = _builder.get(".properties.management") if management is not None: management.set_prop("authorizationOwners", AAZListType, ".authorization_owners") management.set_prop("canaryManifestOwners", AAZListType, ".canary_manifest_owners") management.set_prop("errorResponseMessageOptions", AAZObjectType, ".error_response_message_options") management.set_prop("expeditedRolloutMetadata", AAZObjectType, ".expedited_rollout_metadata") management.set_prop( "expeditedRolloutSubmitters", AAZListType, ".expedited_rollout_submitters") management.set_prop("incidentContactEmail", AAZStrType, ".incident_contact_email") management.set_prop("incidentRoutingService", AAZStrType, ".incident_routing_service") management.set_prop("incidentRoutingTeam", AAZStrType, ".incident_routing_team") management.set_prop( "manifestOwners", AAZListType, ".manifest_owners") management.set_prop("pcCode", AAZStrType, ".pc_code") management.set_prop("profitCenterProgramId", AAZStrType, ".profit_center_program_id") management.set_prop("resourceAccessPolicy", AAZStrType, ".resource_access_policy") management.set_prop("resourceAccessRoles", AAZListType, ".resource_access_roles") management.set_prop( "schemaOwners", AAZListType, ".schema_owners") management.set_prop("serviceTreeInfos", AAZListType, ".service_tree_infos") authorization_owners = _builder.get( ".properties.management.authorizationOwners") if authorization_owners is not None: authorization_owners.set_elements(AAZStrType, ".") canary_manifest_owners = _builder.get( ".properties.management.canaryManifestOwners") if canary_manifest_owners is not None: canary_manifest_owners.set_elements(AAZStrType, ".") error_response_message_options = _builder.get( ".properties.management.errorResponseMessageOptions") if error_response_message_options is not None: error_response_message_options.set_prop( "serverFailureResponseMessageType", AAZStrType, ".server_failure_response_message_type") expedited_rollout_metadata = _builder.get( ".properties.management.expeditedRolloutMetadata") if expedited_rollout_metadata is not None: expedited_rollout_metadata.set_prop( "enabled", AAZBoolType, ".enabled") expedited_rollout_metadata.set_prop( "expeditedRolloutIntent", AAZStrType, ".expedited_rollout_intent") expedited_rollout_submitters = _builder.get( ".properties.management.expeditedRolloutSubmitters") if expedited_rollout_submitters is not None: expedited_rollout_submitters.set_elements(AAZStrType, ".") manifest_owners = _builder.get( ".properties.management.manifestOwners") if manifest_owners is not None: manifest_owners.set_elements(AAZStrType, ".") resource_access_roles = _builder.get( ".properties.management.resourceAccessRoles") if resource_access_roles is not None: resource_access_roles.set_elements(AAZObjectType, ".") _elements = _builder.get( ".properties.management.resourceAccessRoles[]") if _elements is not None: _elements.set_prop("actions", AAZListType, ".actions") _elements.set_prop("allowedGroupClaims", AAZListType, ".allowed_group_claims") actions = _builder.get( ".properties.management.resourceAccessRoles[].actions") if actions is not None: actions.set_elements(AAZStrType, ".") allowed_group_claims = _builder.get( ".properties.management.resourceAccessRoles[].allowedGroupClaims") if allowed_group_claims is not None: allowed_group_claims.set_elements(AAZStrType, ".") schema_owners = _builder.get(".properties.management.schemaOwners") if schema_owners is not None: schema_owners.set_elements(AAZStrType, ".") service_tree_infos = _builder.get( ".properties.management.serviceTreeInfos") if service_tree_infos is not None: _UpdateHelper._build_schema_service_tree_info_update( service_tree_infos.set_elements(AAZObjectType, ".")) marketplace_options = _builder.get( ".properties.marketplaceOptions") if marketplace_options is not None: marketplace_options.set_prop( "addOnPlanConversionAllowed", AAZBoolType, ".add_on_plan_conversion_allowed") metadata = _builder.get(".properties.metadata") if metadata is not None: metadata.set_elements(AAZFreeFormDictType, ".") _elements = _builder.get(".properties.metadata{}") if _elements is not None: _elements.set_anytype_elements(".") notifications = _builder.get(".properties.notifications") if notifications is not None: notifications.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.notifications[]") if _elements is not None: _elements.set_prop("notificationType", AAZStrType, ".notification_type") _elements.set_prop("skipNotifications", AAZStrType, ".skip_notifications") on_behalf_of_tokens = _builder.get(".properties.onBehalfOfTokens") if on_behalf_of_tokens is not None: on_behalf_of_tokens.set_prop( "actionName", AAZStrType, ".action_name") on_behalf_of_tokens.set_prop( "lifeTime", AAZStrType, ".life_time") open_api_configuration = _builder.get( ".properties.openApiConfiguration") if open_api_configuration is not None: open_api_configuration.set_prop( "validation", AAZObjectType, ".validation") validation = _builder.get( ".properties.openApiConfiguration.validation") if validation is not None: validation.set_prop("allowNoncompliantCollectionResponse", AAZBoolType, ".allow_noncompliant_collection_response") private_endpoint_configuration = _builder.get( ".properties.privateEndpointConfiguration") if private_endpoint_configuration is not None: private_endpoint_configuration.set_prop( "groupConnectivityInformation", AAZListType, ".group_connectivity_information", typ_kwargs={"flags": {"required": True}}) private_endpoint_configuration.set_prop( "minApiVersion", AAZStrType, ".min_api_version", typ_kwargs={"flags": {"required": True}}) group_connectivity_information = _builder.get( ".properties.privateEndpointConfiguration.groupConnectivityInformation") if group_connectivity_information is not None: group_connectivity_information.set_elements(AAZObjectType, ".") _elements = _builder.get( ".properties.privateEndpointConfiguration.groupConnectivityInformation[]") if _elements is not None: _elements.set_prop("groupId", AAZStrType, ".group_id", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop( "redirectMapId", AAZStrType, ".redirect_map_id") _elements.set_prop("requiredMembers", AAZListType, ".required_members", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("requiredZoneNames", AAZListType, ".required_zone_names", typ_kwargs={ "flags": {"required": True}}) required_members = _builder.get( ".properties.privateEndpointConfiguration.groupConnectivityInformation[].requiredMembers") if required_members is not None: required_members.set_elements(AAZStrType, ".") required_zone_names = _builder.get( ".properties.privateEndpointConfiguration.groupConnectivityInformation[].requiredZoneNames") if required_zone_names is not None: required_zone_names.set_elements(AAZStrType, ".") quota_rule = _builder.get(".properties.quotaRule") if quota_rule is not None: quota_rule.set_prop( "locationRules", AAZListType, ".location_rules") quota_rule.set_prop("quotaPolicy", AAZStrType, ".quota_policy") quota_rule.set_prop("requiredFeatures", AAZListType, ".required_features") location_rules = _builder.get( ".properties.quotaRule.locationRules") if location_rules is not None: location_rules.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.quotaRule.locationRules[]") if _elements is not None: _elements.set_prop("location", AAZStrType, ".location") _elements.set_prop("policy", AAZStrType, ".policy") _elements.set_prop("quotaId", AAZStrType, ".quota_id") required_features = _builder.get( ".properties.quotaRule.requiredFeatures") if required_features is not None: required_features.set_elements(AAZStrType, ".") request_header_options = _builder.get( ".properties.requestHeaderOptions") if request_header_options is not None: request_header_options.set_prop( "optInHeaders", AAZStrType, ".opt_in_headers") request_header_options.set_prop( "optOutHeaders", AAZStrType, ".opt_out_headers") required_features = _builder.get(".properties.requiredFeatures") if required_features is not None: required_features.set_elements(AAZStrType, ".") resource_cache = _builder.get(".properties.resourceCache") if resource_cache is not None: resource_cache.set_prop( "enableResourceCache", AAZBoolType, ".enable_resource_cache") resource_cache.set_prop( "resourceCacheExpirationTimespan", AAZStrType, ".resource_cache_expiration_timespan") resource_concurrency_control_options = _builder.get( ".properties.resourceConcurrencyControlOptions") if resource_concurrency_control_options is not None: resource_concurrency_control_options.set_elements( AAZObjectType, ".") _elements = _builder.get( ".properties.resourceConcurrencyControlOptions{}") if _elements is not None: _elements.set_prop("policy", AAZStrType, ".policy") resource_graph_configuration = _builder.get( ".properties.resourceGraphConfiguration") if resource_graph_configuration is not None: resource_graph_configuration.set_prop( "apiVersion", AAZStrType, ".api_version") resource_graph_configuration.set_prop( "enabled", AAZBoolType, ".enabled") resource_management_options = _builder.get( ".properties.resourceManagementOptions") if resource_management_options is not None: resource_management_options.set_prop( "batchProvisioningSupport", AAZObjectType, ".batch_provisioning_support") resource_management_options.set_prop( "deleteDependencies", AAZListType, ".delete_dependencies") resource_management_options.set_prop( "nestedProvisioningSupport", AAZObjectType, ".nested_provisioning_support") batch_provisioning_support = _builder.get( ".properties.resourceManagementOptions.batchProvisioningSupport") if batch_provisioning_support is not None: batch_provisioning_support.set_prop( "supportedOperations", AAZStrType, ".supported_operations") delete_dependencies = _builder.get( ".properties.resourceManagementOptions.deleteDependencies") if delete_dependencies is not None: delete_dependencies.set_elements(AAZObjectType, ".") _elements = _builder.get( ".properties.resourceManagementOptions.deleteDependencies[]") if _elements is not None: _elements.set_prop( "linkedProperty", AAZStrType, ".linked_property") _elements.set_prop("linkedType", AAZStrType, ".linked_type") _elements.set_prop("requiredFeatures", AAZListType, ".required_features") required_features = _builder.get( ".properties.resourceManagementOptions.deleteDependencies[].requiredFeatures") if required_features is not None: required_features.set_elements(AAZStrType, ".") nested_provisioning_support = _builder.get( ".properties.resourceManagementOptions.nestedProvisioningSupport") if nested_provisioning_support is not None: nested_provisioning_support.set_prop( "minimumApiVersion", AAZStrType, ".minimum_api_version") resource_move_policy = _builder.get( ".properties.resourceMovePolicy") if resource_move_policy is not None: resource_move_policy.set_prop( "crossResourceGroupMoveEnabled", AAZBoolType, ".cross_resource_group_move_enabled") resource_move_policy.set_prop( "crossSubscriptionMoveEnabled", AAZBoolType, ".cross_subscription_move_enabled") resource_move_policy.set_prop( "validationRequired", AAZBoolType, ".validation_required") resource_provider_authorization_rules = _builder.get( ".properties.resourceProviderAuthorizationRules") if resource_provider_authorization_rules is not None: resource_provider_authorization_rules.set_prop( "asyncOperationPollingRules", AAZObjectType, ".async_operation_polling_rules") async_operation_polling_rules = _builder.get( ".properties.resourceProviderAuthorizationRules.asyncOperationPollingRules") if async_operation_polling_rules is not None: async_operation_polling_rules.set_prop( "additionalOptions", AAZStrType, ".additional_options") async_operation_polling_rules.set_prop( "authorizationActions", AAZListType, ".authorization_actions") authorization_actions = _builder.get( ".properties.resourceProviderAuthorizationRules.asyncOperationPollingRules.authorizationActions") if authorization_actions is not None: authorization_actions.set_elements(AAZStrType, ".") resource_query_management = _builder.get( ".properties.resourceQueryManagement") if resource_query_management is not None: resource_query_management.set_prop( "filterOption", AAZStrType, ".filter_option") resource_type_common_attribute_management = _builder.get( ".properties.resourceTypeCommonAttributeManagement") if resource_type_common_attribute_management is not None: resource_type_common_attribute_management.set_prop( "commonApiVersionsMergeMode", AAZStrType, ".common_api_versions_merge_mode") routing_rule = _builder.get(".properties.routingRule") if routing_rule is not None: routing_rule.set_prop("hostResourceType", AAZStrType, ".host_resource_type") service_tree_infos = _builder.get(".properties.serviceTreeInfos") if service_tree_infos is not None: _UpdateHelper._build_schema_service_tree_info_update( service_tree_infos.set_elements(AAZObjectType, ".")) subscription_lifecycle_notification_specifications = _builder.get( ".properties.subscriptionLifecycleNotificationSpecifications") if subscription_lifecycle_notification_specifications is not None: subscription_lifecycle_notification_specifications.set_prop( "softDeleteTTL", AAZStrType, ".soft_delete_ttl") subscription_lifecycle_notification_specifications.set_prop( "subscriptionStateOverrideActions", AAZListType, ".subscription_state_override_actions") subscription_state_override_actions = _builder.get( ".properties.subscriptionLifecycleNotificationSpecifications.subscriptionStateOverrideActions") if subscription_state_override_actions is not None: subscription_state_override_actions.set_elements( AAZObjectType, ".") _elements = _builder.get( ".properties.subscriptionLifecycleNotificationSpecifications.subscriptionStateOverrideActions[]") if _elements is not None: _elements.set_prop("action", AAZStrType, ".action", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("state", AAZStrType, ".state", typ_kwargs={ "flags": {"required": True}}) subscription_state_rules = _builder.get( ".properties.subscriptionStateRules") if subscription_state_rules is not None: subscription_state_rules.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.subscriptionStateRules[]") if _elements is not None: _elements.set_prop( "allowedActions", AAZListType, ".allowed_actions") _elements.set_prop("state", AAZStrType, ".state") allowed_actions = _builder.get( ".properties.subscriptionStateRules[].allowedActions") if allowed_actions is not None: allowed_actions.set_elements(AAZStrType, ".") swagger_specifications = _builder.get( ".properties.swaggerSpecifications") if swagger_specifications is not None: swagger_specifications.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.swaggerSpecifications[]") if _elements is not None: _elements.set_prop("apiVersions", AAZListType, ".api_versions") _elements.set_prop("swaggerSpecFolderUri", AAZStrType, ".swagger_spec_folder_uri") api_versions = _builder.get( ".properties.swaggerSpecifications[].apiVersions") if api_versions is not None: api_versions.set_elements(AAZStrType, ".") template_deployment_options = _builder.get( ".properties.templateDeploymentOptions") if template_deployment_options is not None: template_deployment_options.set_prop( "preflightOptions", AAZListType, ".preflight_options") template_deployment_options.set_prop( "preflightSupported", AAZBoolType, ".preflight_supported") preflight_options = _builder.get( ".properties.templateDeploymentOptions.preflightOptions") if preflight_options is not None: preflight_options.set_elements(AAZStrType, ".") template_deployment_policy = _builder.get( ".properties.templateDeploymentPolicy") if template_deployment_policy is not None: template_deployment_policy.set_prop( "capabilities", AAZStrType, ".capabilities", typ_kwargs={"flags": {"required": True}}) template_deployment_policy.set_prop( "preflightNotifications", AAZStrType, ".preflight_notifications") template_deployment_policy.set_prop( "preflightOptions", AAZStrType, ".preflight_options", typ_kwargs={"flags": {"required": True}}) throttling_rules = _builder.get(".properties.throttlingRules") if throttling_rules is not None: throttling_rules.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.throttlingRules[]") if _elements is not None: _elements.set_prop("action", AAZStrType, ".action", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop( "applicationId", AAZListType, ".application_id") _elements.set_prop("metrics", AAZListType, ".metrics", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("requiredFeatures", AAZListType, ".required_features") application_id = _builder.get( ".properties.throttlingRules[].applicationId") if application_id is not None: application_id.set_elements(AAZStrType, ".") metrics = _builder.get(".properties.throttlingRules[].metrics") if metrics is not None: metrics.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.throttlingRules[].metrics[]") if _elements is not None: _elements.set_prop("interval", AAZStrType, ".interval") _elements.set_prop("limit", AAZIntType, ".limit", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("type", AAZStrType, ".type", typ_kwargs={ "flags": {"required": True}}) required_features = _builder.get( ".properties.throttlingRules[].requiredFeatures") if required_features is not None: required_features.set_elements(AAZStrType, ".") return _instance_value
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): def __call__(self, *args, **kwargs): pass def _update_instance(self, instance): pass
3
0
360
68
293
0
68
0
1
1
1
0
2
0
2
2
723
137
586
104
583
0
582
104
579
135
1
1
136
10,288
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/providerhub/azext_providerhub/aaz/latest/providerhub/resource_type_registration/_show.py
azext_providerhub.aaz.latest.providerhub.resource_type_registration._show.Show.ResourceTypeRegistrationsGet
class ResourceTypeRegistrationsGet(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "providerNamespace", self.ctx.args.provider_namespace, required=True, ), **self.serialize_url_param( "resourceType", self.ctx.args.resource_type, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-04-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.id = AAZStrType( flags={"read_only": True}, ) _schema_on_200.kind = AAZStrType() _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) _schema_on_200.properties = AAZObjectType() _schema_on_200.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _schema_on_200.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200.properties properties.add_resource_list_target_locations = AAZBoolType( serialized_name="addResourceListTargetLocations", ) properties.additional_options = AAZStrType( serialized_name="additionalOptions", ) properties.allow_empty_role_assignments = AAZBoolType( serialized_name="allowEmptyRoleAssignments", ) properties.allowed_resource_names = AAZListType( serialized_name="allowedResourceNames", ) properties.allowed_template_deployment_reference_actions = AAZListType( serialized_name="allowedTemplateDeploymentReferenceActions", ) properties.allowed_unauthorized_actions = AAZListType( serialized_name="allowedUnauthorizedActions", ) properties.api_profiles = AAZListType( serialized_name="apiProfiles", ) properties.async_operation_resource_type_name = AAZStrType( serialized_name="asyncOperationResourceTypeName", ) properties.async_timeout_rules = AAZListType( serialized_name="asyncTimeoutRules", ) properties.authorization_action_mappings = AAZListType( serialized_name="authorizationActionMappings", ) properties.availability_zone_rule = AAZObjectType( serialized_name="availabilityZoneRule", ) properties.capacity_rule = AAZObjectType( serialized_name="capacityRule", ) properties.category = AAZStrType() properties.check_name_availability_specifications = AAZObjectType( serialized_name="checkNameAvailabilitySpecifications", ) properties.common_api_versions = AAZListType( serialized_name="commonApiVersions", ) properties.cross_tenant_token_validation = AAZStrType( serialized_name="crossTenantTokenValidation", ) properties.default_api_version = AAZStrType( serialized_name="defaultApiVersion", ) properties.disallowed_action_verbs = AAZListType( serialized_name="disallowedActionVerbs", ) properties.disallowed_end_user_operations = AAZListType( serialized_name="disallowedEndUserOperations", ) properties.dsts_configuration = AAZObjectType( serialized_name="dstsConfiguration", ) properties.enable_async_operation = AAZBoolType( serialized_name="enableAsyncOperation", ) properties.enable_third_party_s2_s = AAZBoolType( serialized_name="enableThirdPartyS2S", ) properties.endpoints = AAZListType() properties.extended_locations = AAZListType( serialized_name="extendedLocations", ) properties.extension_options = AAZObjectType( serialized_name="extensionOptions", ) properties.features_rule = AAZObjectType( serialized_name="featuresRule", ) properties.frontdoor_request_mode = AAZStrType( serialized_name="frontdoorRequestMode", ) properties.grouping_tag = AAZStrType( serialized_name="groupingTag", ) properties.identity_management = AAZObjectType( serialized_name="identityManagement", ) properties.is_pure_proxy = AAZBoolType( serialized_name="isPureProxy", ) properties.legacy_name = AAZStrType( serialized_name="legacyName", ) properties.legacy_names = AAZListType( serialized_name="legacyNames", ) properties.legacy_policy = AAZObjectType( serialized_name="legacyPolicy", ) properties.linked_access_checks = AAZListType( serialized_name="linkedAccessChecks", ) properties.linked_notification_rules = AAZListType( serialized_name="linkedNotificationRules", ) properties.linked_operation_rules = AAZListType( serialized_name="linkedOperationRules", ) properties.logging_rules = AAZListType( serialized_name="loggingRules", ) properties.managed_resource_group_configuration = AAZObjectType( serialized_name="managedResourceGroupConfiguration", ) properties.management = AAZObjectType() properties.manifest_link = AAZStrType( serialized_name="manifestLink", ) properties.marketplace_options = AAZObjectType( serialized_name="marketplaceOptions", ) properties.marketplace_type = AAZStrType( serialized_name="marketplaceType", ) properties.metadata = AAZDictType() properties.notifications = AAZListType() properties.on_behalf_of_tokens = AAZObjectType( serialized_name="onBehalfOfTokens", ) properties.open_api_configuration = AAZObjectType( serialized_name="openApiConfiguration", ) properties.policy_execution_type = AAZStrType( serialized_name="policyExecutionType", ) properties.private_endpoint_configuration = AAZObjectType( serialized_name="privateEndpointConfiguration", ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) properties.quota_rule = AAZObjectType( serialized_name="quotaRule", ) properties.regionality = AAZStrType() properties.request_header_options = AAZObjectType( serialized_name="requestHeaderOptions", ) properties.required_features = AAZListType( serialized_name="requiredFeatures", ) properties.resource_cache = AAZObjectType( serialized_name="resourceCache", ) properties.resource_concurrency_control_options = AAZDictType( serialized_name="resourceConcurrencyControlOptions", ) properties.resource_deletion_policy = AAZStrType( serialized_name="resourceDeletionPolicy", ) properties.resource_graph_configuration = AAZObjectType( serialized_name="resourceGraphConfiguration", ) properties.resource_management_options = AAZObjectType( serialized_name="resourceManagementOptions", ) properties.resource_move_policy = AAZObjectType( serialized_name="resourceMovePolicy", ) properties.resource_provider_authorization_rules = AAZObjectType( serialized_name="resourceProviderAuthorizationRules", ) properties.resource_query_management = AAZObjectType( serialized_name="resourceQueryManagement", ) properties.resource_sub_type = AAZStrType( serialized_name="resourceSubType", ) properties.resource_type_common_attribute_management = AAZObjectType( serialized_name="resourceTypeCommonAttributeManagement", ) properties.resource_validation = AAZStrType( serialized_name="resourceValidation", ) properties.routing_rule = AAZObjectType( serialized_name="routingRule", ) properties.routing_type = AAZStrType( serialized_name="routingType", ) properties.service_tree_infos = AAZListType( serialized_name="serviceTreeInfos", ) properties.sku_link = AAZStrType( serialized_name="skuLink", ) properties.subscription_lifecycle_notification_specifications = AAZObjectType( serialized_name="subscriptionLifecycleNotificationSpecifications", ) properties.subscription_state_rules = AAZListType( serialized_name="subscriptionStateRules", ) properties.supports_tags = AAZBoolType( serialized_name="supportsTags", ) properties.swagger_specifications = AAZListType( serialized_name="swaggerSpecifications", ) properties.template_deployment_options = AAZObjectType( serialized_name="templateDeploymentOptions", ) properties.template_deployment_policy = AAZObjectType( serialized_name="templateDeploymentPolicy", ) properties.throttling_rules = AAZListType( serialized_name="throttlingRules", ) properties.token_auth_configuration = AAZObjectType( serialized_name="tokenAuthConfiguration", ) _ShowHelper._build_schema_token_auth_configuration_read( properties.token_auth_configuration) allowed_resource_names = cls._schema_on_200.properties.allowed_resource_names allowed_resource_names.Element = AAZObjectType() _element = cls._schema_on_200.properties.allowed_resource_names.Element _element.get_action_verb = AAZStrType( serialized_name="getActionVerb", ) _element.name = AAZStrType() allowed_template_deployment_reference_actions = cls._schema_on_200.properties.allowed_template_deployment_reference_actions allowed_template_deployment_reference_actions.Element = AAZStrType() allowed_unauthorized_actions = cls._schema_on_200.properties.allowed_unauthorized_actions allowed_unauthorized_actions.Element = AAZStrType() api_profiles = cls._schema_on_200.properties.api_profiles api_profiles.Element = AAZObjectType() _element = cls._schema_on_200.properties.api_profiles.Element _element.api_version = AAZStrType( serialized_name="apiVersion", ) _element.profile_version = AAZStrType( serialized_name="profileVersion", ) async_timeout_rules = cls._schema_on_200.properties.async_timeout_rules async_timeout_rules.Element = AAZObjectType() _element = cls._schema_on_200.properties.async_timeout_rules.Element _element.action_name = AAZStrType( serialized_name="actionName", ) _element.timeout = AAZStrType() authorization_action_mappings = cls._schema_on_200.properties.authorization_action_mappings authorization_action_mappings.Element = AAZObjectType() _element = cls._schema_on_200.properties.authorization_action_mappings.Element _element.desired = AAZStrType() _element.original = AAZStrType() availability_zone_rule = cls._schema_on_200.properties.availability_zone_rule availability_zone_rule.availability_zone_policy = AAZStrType( serialized_name="availabilityZonePolicy", ) capacity_rule = cls._schema_on_200.properties.capacity_rule capacity_rule.capacity_policy = AAZStrType( serialized_name="capacityPolicy", ) capacity_rule.sku_alias = AAZStrType( serialized_name="skuAlias", ) check_name_availability_specifications = cls._schema_on_200.properties.check_name_availability_specifications check_name_availability_specifications.enable_default_validation = AAZBoolType( serialized_name="enableDefaultValidation", ) check_name_availability_specifications.resource_types_with_custom_validation = AAZListType( serialized_name="resourceTypesWithCustomValidation", ) resource_types_with_custom_validation = cls._schema_on_200.properties.check_name_availability_specifications.resource_types_with_custom_validation resource_types_with_custom_validation.Element = AAZStrType() common_api_versions = cls._schema_on_200.properties.common_api_versions common_api_versions.Element = AAZStrType() disallowed_action_verbs = cls._schema_on_200.properties.disallowed_action_verbs disallowed_action_verbs.Element = AAZStrType() disallowed_end_user_operations = cls._schema_on_200.properties.disallowed_end_user_operations disallowed_end_user_operations.Element = AAZStrType() dsts_configuration = cls._schema_on_200.properties.dsts_configuration dsts_configuration.service_dns_name = AAZStrType( serialized_name="serviceDnsName", ) dsts_configuration.service_name = AAZStrType( serialized_name="serviceName", flags={"required": True}, ) endpoints = cls._schema_on_200.properties.endpoints endpoints.Element = AAZObjectType() _element = cls._schema_on_200.properties.endpoints.Element _element.api_version = AAZStrType( serialized_name="apiVersion", ) _element.api_versions = AAZListType( serialized_name="apiVersions", ) _element.data_boundary = AAZStrType( serialized_name="dataBoundary", ) _element.dsts_configuration = AAZObjectType( serialized_name="dstsConfiguration", ) _element.enabled = AAZBoolType() _element.endpoint_type = AAZStrType( serialized_name="endpointType", ) _element.endpoint_uri = AAZStrType( serialized_name="endpointUri", ) _element.extensions = AAZListType() _element.features_rule = AAZObjectType( serialized_name="featuresRule", ) _element.kind = AAZStrType() _element.locations = AAZListType() _element.required_features = AAZListType( serialized_name="requiredFeatures", ) _element.sku_link = AAZStrType( serialized_name="skuLink", ) _element.timeout = AAZStrType() _element.token_auth_configuration = AAZObjectType( serialized_name="tokenAuthConfiguration", ) _ShowHelper._build_schema_token_auth_configuration_read( _element.token_auth_configuration) _element.zones = AAZListType() api_versions = cls._schema_on_200.properties.endpoints.Element.api_versions api_versions.Element = AAZStrType() dsts_configuration = cls._schema_on_200.properties.endpoints.Element.dsts_configuration dsts_configuration.service_dns_name = AAZStrType( serialized_name="serviceDnsName", ) dsts_configuration.service_name = AAZStrType( serialized_name="serviceName", flags={"required": True}, ) extensions = cls._schema_on_200.properties.endpoints.Element.extensions extensions.Element = AAZObjectType() _element = cls._schema_on_200.properties.endpoints.Element.extensions.Element _element.endpoint_uri = AAZStrType( serialized_name="endpointUri", ) _element.extension_categories = AAZListType( serialized_name="extensionCategories", ) _element.timeout = AAZStrType() extension_categories = cls._schema_on_200.properties.endpoints.Element.extensions.Element.extension_categories extension_categories.Element = AAZStrType() features_rule = cls._schema_on_200.properties.endpoints.Element.features_rule features_rule.required_features_policy = AAZStrType( serialized_name="requiredFeaturesPolicy", flags={"required": True}, ) locations = cls._schema_on_200.properties.endpoints.Element.locations locations.Element = AAZStrType() required_features = cls._schema_on_200.properties.endpoints.Element.required_features required_features.Element = AAZStrType() zones = cls._schema_on_200.properties.endpoints.Element.zones zones.Element = AAZStrType() extended_locations = cls._schema_on_200.properties.extended_locations extended_locations.Element = AAZObjectType() _element = cls._schema_on_200.properties.extended_locations.Element _element.supported_policy = AAZStrType( serialized_name="supportedPolicy", ) _element.type = AAZStrType() extension_options = cls._schema_on_200.properties.extension_options extension_options.resource_creation_begin = AAZObjectType( serialized_name="resourceCreationBegin", ) resource_creation_begin = cls._schema_on_200.properties.extension_options.resource_creation_begin resource_creation_begin.request = AAZListType() resource_creation_begin.response = AAZListType() request = cls._schema_on_200.properties.extension_options.resource_creation_begin.request request.Element = AAZStrType() response = cls._schema_on_200.properties.extension_options.resource_creation_begin.response response.Element = AAZStrType() features_rule = cls._schema_on_200.properties.features_rule features_rule.required_features_policy = AAZStrType( serialized_name="requiredFeaturesPolicy", flags={"required": True}, ) identity_management = cls._schema_on_200.properties.identity_management identity_management.application_id = AAZStrType( serialized_name="applicationId", ) identity_management.application_ids = AAZListType( serialized_name="applicationIds", ) identity_management.delegation_app_ids = AAZListType( serialized_name="delegationAppIds", ) identity_management.type = AAZStrType() application_ids = cls._schema_on_200.properties.identity_management.application_ids application_ids.Element = AAZStrType() delegation_app_ids = cls._schema_on_200.properties.identity_management.delegation_app_ids delegation_app_ids.Element = AAZStrType() legacy_names = cls._schema_on_200.properties.legacy_names legacy_names.Element = AAZStrType() legacy_policy = cls._schema_on_200.properties.legacy_policy legacy_policy.disallowed_conditions = AAZListType( serialized_name="disallowedConditions", ) legacy_policy.disallowed_legacy_operations = AAZListType( serialized_name="disallowedLegacyOperations", ) disallowed_conditions = cls._schema_on_200.properties.legacy_policy.disallowed_conditions disallowed_conditions.Element = AAZObjectType() _element = cls._schema_on_200.properties.legacy_policy.disallowed_conditions.Element _element.disallowed_legacy_operations = AAZListType( serialized_name="disallowedLegacyOperations", ) _element.feature = AAZStrType() disallowed_legacy_operations = cls._schema_on_200.properties.legacy_policy.disallowed_conditions.Element.disallowed_legacy_operations disallowed_legacy_operations.Element = AAZStrType() disallowed_legacy_operations = cls._schema_on_200.properties.legacy_policy.disallowed_legacy_operations disallowed_legacy_operations.Element = AAZStrType() linked_access_checks = cls._schema_on_200.properties.linked_access_checks linked_access_checks.Element = AAZObjectType() _element = cls._schema_on_200.properties.linked_access_checks.Element _element.action_name = AAZStrType( serialized_name="actionName", ) _element.linked_action = AAZStrType( serialized_name="linkedAction", ) _element.linked_action_verb = AAZStrType( serialized_name="linkedActionVerb", ) _element.linked_property = AAZStrType( serialized_name="linkedProperty", ) _element.linked_type = AAZStrType( serialized_name="linkedType", ) linked_notification_rules = cls._schema_on_200.properties.linked_notification_rules linked_notification_rules.Element = AAZObjectType() _element = cls._schema_on_200.properties.linked_notification_rules.Element _element.actions = AAZListType() _element.actions_on_failed_operation = AAZListType( serialized_name="actionsOnFailedOperation", ) _element.fast_path_actions = AAZListType( serialized_name="fastPathActions", ) _element.fast_path_actions_on_failed_operation = AAZListType( serialized_name="fastPathActionsOnFailedOperation", ) _element.linked_notification_timeout = AAZStrType( serialized_name="linkedNotificationTimeout", ) actions = cls._schema_on_200.properties.linked_notification_rules.Element.actions actions.Element = AAZStrType() actions_on_failed_operation = cls._schema_on_200.properties.linked_notification_rules.Element.actions_on_failed_operation actions_on_failed_operation.Element = AAZStrType() fast_path_actions = cls._schema_on_200.properties.linked_notification_rules.Element.fast_path_actions fast_path_actions.Element = AAZStrType() fast_path_actions_on_failed_operation = cls._schema_on_200.properties.linked_notification_rules.Element.fast_path_actions_on_failed_operation fast_path_actions_on_failed_operation.Element = AAZStrType() linked_operation_rules = cls._schema_on_200.properties.linked_operation_rules linked_operation_rules.Element = AAZObjectType() _element = cls._schema_on_200.properties.linked_operation_rules.Element _element.depends_on_types = AAZListType( serialized_name="dependsOnTypes", ) _element.linked_action = AAZStrType( serialized_name="linkedAction", flags={"required": True}, ) _element.linked_operation = AAZStrType( serialized_name="linkedOperation", flags={"required": True}, ) depends_on_types = cls._schema_on_200.properties.linked_operation_rules.Element.depends_on_types depends_on_types.Element = AAZStrType() logging_rules = cls._schema_on_200.properties.logging_rules logging_rules.Element = AAZObjectType() _element = cls._schema_on_200.properties.logging_rules.Element _element.action = AAZStrType( flags={"required": True}, ) _element.detail_level = AAZStrType( serialized_name="detailLevel", flags={"required": True}, ) _element.direction = AAZStrType( flags={"required": True}, ) _element.hidden_property_paths = AAZObjectType( serialized_name="hiddenPropertyPaths", ) hidden_property_paths = cls._schema_on_200.properties.logging_rules.Element.hidden_property_paths hidden_property_paths.hidden_paths_on_request = AAZListType( serialized_name="hiddenPathsOnRequest", ) hidden_property_paths.hidden_paths_on_response = AAZListType( serialized_name="hiddenPathsOnResponse", ) hidden_paths_on_request = cls._schema_on_200.properties.logging_rules.Element.hidden_property_paths.hidden_paths_on_request hidden_paths_on_request.Element = AAZStrType() hidden_paths_on_response = cls._schema_on_200.properties.logging_rules.Element.hidden_property_paths.hidden_paths_on_response hidden_paths_on_response.Element = AAZStrType() managed_resource_group_configuration = cls._schema_on_200.properties.managed_resource_group_configuration managed_resource_group_configuration.application_ids = AAZListType( serialized_name="applicationIds", ) managed_resource_group_configuration.deny_assignment_configuration = AAZObjectType( serialized_name="denyAssignmentConfiguration", ) managed_resource_group_configuration.enabled = AAZBoolType() managed_resource_group_configuration.resource_group_location_override = AAZStrType( serialized_name="resourceGroupLocationOverride", ) application_ids = cls._schema_on_200.properties.managed_resource_group_configuration.application_ids application_ids.Element = AAZStrType() deny_assignment_configuration = cls._schema_on_200.properties.managed_resource_group_configuration.deny_assignment_configuration deny_assignment_configuration.enabled = AAZBoolType() deny_assignment_configuration.not_actions = AAZListType( serialized_name="notActions", ) not_actions = cls._schema_on_200.properties.managed_resource_group_configuration.deny_assignment_configuration.not_actions not_actions.Element = AAZStrType() management = cls._schema_on_200.properties.management management.authorization_owners = AAZListType( serialized_name="authorizationOwners", ) management.canary_manifest_owners = AAZListType( serialized_name="canaryManifestOwners", ) management.error_response_message_options = AAZObjectType( serialized_name="errorResponseMessageOptions", ) management.expedited_rollout_metadata = AAZObjectType( serialized_name="expeditedRolloutMetadata", ) management.expedited_rollout_submitters = AAZListType( serialized_name="expeditedRolloutSubmitters", ) management.incident_contact_email = AAZStrType( serialized_name="incidentContactEmail", ) management.incident_routing_service = AAZStrType( serialized_name="incidentRoutingService", ) management.incident_routing_team = AAZStrType( serialized_name="incidentRoutingTeam", ) management.manifest_owners = AAZListType( serialized_name="manifestOwners", ) management.pc_code = AAZStrType( serialized_name="pcCode", ) management.profit_center_program_id = AAZStrType( serialized_name="profitCenterProgramId", ) management.resource_access_policy = AAZStrType( serialized_name="resourceAccessPolicy", ) management.resource_access_roles = AAZListType( serialized_name="resourceAccessRoles", ) management.schema_owners = AAZListType( serialized_name="schemaOwners", ) management.service_tree_infos = AAZListType( serialized_name="serviceTreeInfos", ) authorization_owners = cls._schema_on_200.properties.management.authorization_owners authorization_owners.Element = AAZStrType() canary_manifest_owners = cls._schema_on_200.properties.management.canary_manifest_owners canary_manifest_owners.Element = AAZStrType() error_response_message_options = cls._schema_on_200.properties.management.error_response_message_options error_response_message_options.server_failure_response_message_type = AAZStrType( serialized_name="serverFailureResponseMessageType", ) expedited_rollout_metadata = cls._schema_on_200.properties.management.expedited_rollout_metadata expedited_rollout_metadata.enabled = AAZBoolType() expedited_rollout_metadata.expedited_rollout_intent = AAZStrType( serialized_name="expeditedRolloutIntent", ) expedited_rollout_submitters = cls._schema_on_200.properties.management.expedited_rollout_submitters expedited_rollout_submitters.Element = AAZStrType() manifest_owners = cls._schema_on_200.properties.management.manifest_owners manifest_owners.Element = AAZStrType() resource_access_roles = cls._schema_on_200.properties.management.resource_access_roles resource_access_roles.Element = AAZObjectType() _element = cls._schema_on_200.properties.management.resource_access_roles.Element _element.actions = AAZListType() _element.allowed_group_claims = AAZListType( serialized_name="allowedGroupClaims", ) actions = cls._schema_on_200.properties.management.resource_access_roles.Element.actions actions.Element = AAZStrType() allowed_group_claims = cls._schema_on_200.properties.management.resource_access_roles.Element.allowed_group_claims allowed_group_claims.Element = AAZStrType() schema_owners = cls._schema_on_200.properties.management.schema_owners schema_owners.Element = AAZStrType() service_tree_infos = cls._schema_on_200.properties.management.service_tree_infos service_tree_infos.Element = AAZObjectType() _ShowHelper._build_schema_service_tree_info_read( service_tree_infos.Element) marketplace_options = cls._schema_on_200.properties.marketplace_options marketplace_options.add_on_plan_conversion_allowed = AAZBoolType( serialized_name="addOnPlanConversionAllowed", ) metadata = cls._schema_on_200.properties.metadata metadata.Element = AAZFreeFormDictType() notifications = cls._schema_on_200.properties.notifications notifications.Element = AAZObjectType() _element = cls._schema_on_200.properties.notifications.Element _element.notification_type = AAZStrType( serialized_name="notificationType", ) _element.skip_notifications = AAZStrType( serialized_name="skipNotifications", ) on_behalf_of_tokens = cls._schema_on_200.properties.on_behalf_of_tokens on_behalf_of_tokens.action_name = AAZStrType( serialized_name="actionName", ) on_behalf_of_tokens.life_time = AAZStrType( serialized_name="lifeTime", ) open_api_configuration = cls._schema_on_200.properties.open_api_configuration open_api_configuration.validation = AAZObjectType() validation = cls._schema_on_200.properties.open_api_configuration.validation validation.allow_noncompliant_collection_response = AAZBoolType( serialized_name="allowNoncompliantCollectionResponse", ) private_endpoint_configuration = cls._schema_on_200.properties.private_endpoint_configuration private_endpoint_configuration.group_connectivity_information = AAZListType( serialized_name="groupConnectivityInformation", flags={"required": True}, ) private_endpoint_configuration.min_api_version = AAZStrType( serialized_name="minApiVersion", flags={"required": True}, ) group_connectivity_information = cls._schema_on_200.properties.private_endpoint_configuration.group_connectivity_information group_connectivity_information.Element = AAZObjectType() _element = cls._schema_on_200.properties.private_endpoint_configuration.group_connectivity_information.Element _element.group_id = AAZStrType( serialized_name="groupId", flags={"required": True}, ) _element.redirect_map_id = AAZStrType( serialized_name="redirectMapId", ) _element.required_members = AAZListType( serialized_name="requiredMembers", flags={"required": True}, ) _element.required_zone_names = AAZListType( serialized_name="requiredZoneNames", flags={"required": True}, ) required_members = cls._schema_on_200.properties.private_endpoint_configuration.group_connectivity_information.Element.required_members required_members.Element = AAZStrType() required_zone_names = cls._schema_on_200.properties.private_endpoint_configuration.group_connectivity_information.Element.required_zone_names required_zone_names.Element = AAZStrType() quota_rule = cls._schema_on_200.properties.quota_rule quota_rule.location_rules = AAZListType( serialized_name="locationRules", ) quota_rule.quota_policy = AAZStrType( serialized_name="quotaPolicy", ) quota_rule.required_features = AAZListType( serialized_name="requiredFeatures", ) location_rules = cls._schema_on_200.properties.quota_rule.location_rules location_rules.Element = AAZObjectType() _element = cls._schema_on_200.properties.quota_rule.location_rules.Element _element.location = AAZStrType() _element.policy = AAZStrType() _element.quota_id = AAZStrType( serialized_name="quotaId", ) required_features = cls._schema_on_200.properties.quota_rule.required_features required_features.Element = AAZStrType() request_header_options = cls._schema_on_200.properties.request_header_options request_header_options.opt_in_headers = AAZStrType( serialized_name="optInHeaders", ) request_header_options.opt_out_headers = AAZStrType( serialized_name="optOutHeaders", ) required_features = cls._schema_on_200.properties.required_features required_features.Element = AAZStrType() resource_cache = cls._schema_on_200.properties.resource_cache resource_cache.enable_resource_cache = AAZBoolType( serialized_name="enableResourceCache", ) resource_cache.resource_cache_expiration_timespan = AAZStrType( serialized_name="resourceCacheExpirationTimespan", ) resource_concurrency_control_options = cls._schema_on_200.properties.resource_concurrency_control_options resource_concurrency_control_options.Element = AAZObjectType() _element = cls._schema_on_200.properties.resource_concurrency_control_options.Element _element.policy = AAZStrType() resource_graph_configuration = cls._schema_on_200.properties.resource_graph_configuration resource_graph_configuration.api_version = AAZStrType( serialized_name="apiVersion", ) resource_graph_configuration.enabled = AAZBoolType() resource_management_options = cls._schema_on_200.properties.resource_management_options resource_management_options.batch_provisioning_support = AAZObjectType( serialized_name="batchProvisioningSupport", ) resource_management_options.delete_dependencies = AAZListType( serialized_name="deleteDependencies", ) resource_management_options.nested_provisioning_support = AAZObjectType( serialized_name="nestedProvisioningSupport", ) batch_provisioning_support = cls._schema_on_200.properties.resource_management_options.batch_provisioning_support batch_provisioning_support.supported_operations = AAZStrType( serialized_name="supportedOperations", ) delete_dependencies = cls._schema_on_200.properties.resource_management_options.delete_dependencies delete_dependencies.Element = AAZObjectType() _element = cls._schema_on_200.properties.resource_management_options.delete_dependencies.Element _element.linked_property = AAZStrType( serialized_name="linkedProperty", ) _element.linked_type = AAZStrType( serialized_name="linkedType", ) _element.required_features = AAZListType( serialized_name="requiredFeatures", ) required_features = cls._schema_on_200.properties.resource_management_options.delete_dependencies.Element.required_features required_features.Element = AAZStrType() nested_provisioning_support = cls._schema_on_200.properties.resource_management_options.nested_provisioning_support nested_provisioning_support.minimum_api_version = AAZStrType( serialized_name="minimumApiVersion", ) resource_move_policy = cls._schema_on_200.properties.resource_move_policy resource_move_policy.cross_resource_group_move_enabled = AAZBoolType( serialized_name="crossResourceGroupMoveEnabled", ) resource_move_policy.cross_subscription_move_enabled = AAZBoolType( serialized_name="crossSubscriptionMoveEnabled", ) resource_move_policy.validation_required = AAZBoolType( serialized_name="validationRequired", ) resource_provider_authorization_rules = cls._schema_on_200.properties.resource_provider_authorization_rules resource_provider_authorization_rules.async_operation_polling_rules = AAZObjectType( serialized_name="asyncOperationPollingRules", ) async_operation_polling_rules = cls._schema_on_200.properties.resource_provider_authorization_rules.async_operation_polling_rules async_operation_polling_rules.additional_options = AAZStrType( serialized_name="additionalOptions", ) async_operation_polling_rules.authorization_actions = AAZListType( serialized_name="authorizationActions", ) authorization_actions = cls._schema_on_200.properties.resource_provider_authorization_rules.async_operation_polling_rules.authorization_actions authorization_actions.Element = AAZStrType() resource_query_management = cls._schema_on_200.properties.resource_query_management resource_query_management.filter_option = AAZStrType( serialized_name="filterOption", ) resource_type_common_attribute_management = cls._schema_on_200.properties.resource_type_common_attribute_management resource_type_common_attribute_management.common_api_versions_merge_mode = AAZStrType( serialized_name="commonApiVersionsMergeMode", ) routing_rule = cls._schema_on_200.properties.routing_rule routing_rule.host_resource_type = AAZStrType( serialized_name="hostResourceType", ) service_tree_infos = cls._schema_on_200.properties.service_tree_infos service_tree_infos.Element = AAZObjectType() _ShowHelper._build_schema_service_tree_info_read( service_tree_infos.Element) subscription_lifecycle_notification_specifications = cls._schema_on_200.properties.subscription_lifecycle_notification_specifications subscription_lifecycle_notification_specifications.soft_delete_ttl = AAZStrType( serialized_name="softDeleteTTL", ) subscription_lifecycle_notification_specifications.subscription_state_override_actions = AAZListType( serialized_name="subscriptionStateOverrideActions", ) subscription_state_override_actions = cls._schema_on_200.properties.subscription_lifecycle_notification_specifications.subscription_state_override_actions subscription_state_override_actions.Element = AAZObjectType() _element = cls._schema_on_200.properties.subscription_lifecycle_notification_specifications.subscription_state_override_actions.Element _element.action = AAZStrType( flags={"required": True}, ) _element.state = AAZStrType( flags={"required": True}, ) subscription_state_rules = cls._schema_on_200.properties.subscription_state_rules subscription_state_rules.Element = AAZObjectType() _element = cls._schema_on_200.properties.subscription_state_rules.Element _element.allowed_actions = AAZListType( serialized_name="allowedActions", ) _element.state = AAZStrType() allowed_actions = cls._schema_on_200.properties.subscription_state_rules.Element.allowed_actions allowed_actions.Element = AAZStrType() swagger_specifications = cls._schema_on_200.properties.swagger_specifications swagger_specifications.Element = AAZObjectType() _element = cls._schema_on_200.properties.swagger_specifications.Element _element.api_versions = AAZListType( serialized_name="apiVersions", ) _element.swagger_spec_folder_uri = AAZStrType( serialized_name="swaggerSpecFolderUri", ) api_versions = cls._schema_on_200.properties.swagger_specifications.Element.api_versions api_versions.Element = AAZStrType() template_deployment_options = cls._schema_on_200.properties.template_deployment_options template_deployment_options.preflight_options = AAZListType( serialized_name="preflightOptions", ) template_deployment_options.preflight_supported = AAZBoolType( serialized_name="preflightSupported", ) preflight_options = cls._schema_on_200.properties.template_deployment_options.preflight_options preflight_options.Element = AAZStrType() template_deployment_policy = cls._schema_on_200.properties.template_deployment_policy template_deployment_policy.capabilities = AAZStrType( flags={"required": True}, ) template_deployment_policy.preflight_notifications = AAZStrType( serialized_name="preflightNotifications", ) template_deployment_policy.preflight_options = AAZStrType( serialized_name="preflightOptions", flags={"required": True}, ) throttling_rules = cls._schema_on_200.properties.throttling_rules throttling_rules.Element = AAZObjectType() _element = cls._schema_on_200.properties.throttling_rules.Element _element.action = AAZStrType( flags={"required": True}, ) _element.application_id = AAZListType( serialized_name="applicationId", ) _element.metrics = AAZListType( flags={"required": True}, ) _element.required_features = AAZListType( serialized_name="requiredFeatures", ) application_id = cls._schema_on_200.properties.throttling_rules.Element.application_id application_id.Element = AAZStrType() metrics = cls._schema_on_200.properties.throttling_rules.Element.metrics metrics.Element = AAZObjectType() _element = cls._schema_on_200.properties.throttling_rules.Element.metrics.Element _element.interval = AAZStrType() _element.limit = AAZIntType( flags={"required": True}, ) _element.type = AAZStrType( flags={"required": True}, ) required_features = cls._schema_on_200.properties.throttling_rules.Element.required_features required_features.Element = AAZStrType() system_data = cls._schema_on_200.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", ) system_data.created_by = AAZStrType( serialized_name="createdBy", ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", ) return cls._schema_on_200
class ResourceTypeRegistrationsGet(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
121
15
106
0
1
0
1
1
1
0
8
0
9
9
1,110
148
962
127
945
0
489
120
479
2
1
1
11
10,289
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/providerhub/azext_providerhub/aaz/latest/providerhub/resource_type_registration/_list.py
azext_providerhub.aaz.latest.providerhub.resource_type_registration._list.List.ResourceTypeRegistrationsListByProviderRegistration
class ResourceTypeRegistrationsListByProviderRegistration(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "providerNamespace", self.ctx.args.provider_namespace, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-04-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.next_link = AAZStrType( serialized_name="nextLink", ) _schema_on_200.value = AAZListType() value = cls._schema_on_200.value value.Element = AAZObjectType() _element = cls._schema_on_200.value.Element _element.id = AAZStrType( flags={"read_only": True}, ) _element.kind = AAZStrType() _element.name = AAZStrType( flags={"read_only": True}, ) _element.properties = AAZObjectType() _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _element.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200.value.Element.properties properties.add_resource_list_target_locations = AAZBoolType( serialized_name="addResourceListTargetLocations", ) properties.additional_options = AAZStrType( serialized_name="additionalOptions", ) properties.allow_empty_role_assignments = AAZBoolType( serialized_name="allowEmptyRoleAssignments", ) properties.allowed_resource_names = AAZListType( serialized_name="allowedResourceNames", ) properties.allowed_template_deployment_reference_actions = AAZListType( serialized_name="allowedTemplateDeploymentReferenceActions", ) properties.allowed_unauthorized_actions = AAZListType( serialized_name="allowedUnauthorizedActions", ) properties.api_profiles = AAZListType( serialized_name="apiProfiles", ) properties.async_operation_resource_type_name = AAZStrType( serialized_name="asyncOperationResourceTypeName", ) properties.async_timeout_rules = AAZListType( serialized_name="asyncTimeoutRules", ) properties.authorization_action_mappings = AAZListType( serialized_name="authorizationActionMappings", ) properties.availability_zone_rule = AAZObjectType( serialized_name="availabilityZoneRule", ) properties.capacity_rule = AAZObjectType( serialized_name="capacityRule", ) properties.category = AAZStrType() properties.check_name_availability_specifications = AAZObjectType( serialized_name="checkNameAvailabilitySpecifications", ) properties.common_api_versions = AAZListType( serialized_name="commonApiVersions", ) properties.cross_tenant_token_validation = AAZStrType( serialized_name="crossTenantTokenValidation", ) properties.default_api_version = AAZStrType( serialized_name="defaultApiVersion", ) properties.disallowed_action_verbs = AAZListType( serialized_name="disallowedActionVerbs", ) properties.disallowed_end_user_operations = AAZListType( serialized_name="disallowedEndUserOperations", ) properties.dsts_configuration = AAZObjectType( serialized_name="dstsConfiguration", ) properties.enable_async_operation = AAZBoolType( serialized_name="enableAsyncOperation", ) properties.enable_third_party_s2_s = AAZBoolType( serialized_name="enableThirdPartyS2S", ) properties.endpoints = AAZListType() properties.extended_locations = AAZListType( serialized_name="extendedLocations", ) properties.extension_options = AAZObjectType( serialized_name="extensionOptions", ) properties.features_rule = AAZObjectType( serialized_name="featuresRule", ) properties.frontdoor_request_mode = AAZStrType( serialized_name="frontdoorRequestMode", ) properties.grouping_tag = AAZStrType( serialized_name="groupingTag", ) properties.identity_management = AAZObjectType( serialized_name="identityManagement", ) properties.is_pure_proxy = AAZBoolType( serialized_name="isPureProxy", ) properties.legacy_name = AAZStrType( serialized_name="legacyName", ) properties.legacy_names = AAZListType( serialized_name="legacyNames", ) properties.legacy_policy = AAZObjectType( serialized_name="legacyPolicy", ) properties.linked_access_checks = AAZListType( serialized_name="linkedAccessChecks", ) properties.linked_notification_rules = AAZListType( serialized_name="linkedNotificationRules", ) properties.linked_operation_rules = AAZListType( serialized_name="linkedOperationRules", ) properties.logging_rules = AAZListType( serialized_name="loggingRules", ) properties.managed_resource_group_configuration = AAZObjectType( serialized_name="managedResourceGroupConfiguration", ) properties.management = AAZObjectType() properties.manifest_link = AAZStrType( serialized_name="manifestLink", ) properties.marketplace_options = AAZObjectType( serialized_name="marketplaceOptions", ) properties.marketplace_type = AAZStrType( serialized_name="marketplaceType", ) properties.metadata = AAZDictType() properties.notifications = AAZListType() properties.on_behalf_of_tokens = AAZObjectType( serialized_name="onBehalfOfTokens", ) properties.open_api_configuration = AAZObjectType( serialized_name="openApiConfiguration", ) properties.policy_execution_type = AAZStrType( serialized_name="policyExecutionType", ) properties.private_endpoint_configuration = AAZObjectType( serialized_name="privateEndpointConfiguration", ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) properties.quota_rule = AAZObjectType( serialized_name="quotaRule", ) properties.regionality = AAZStrType() properties.request_header_options = AAZObjectType( serialized_name="requestHeaderOptions", ) properties.required_features = AAZListType( serialized_name="requiredFeatures", ) properties.resource_cache = AAZObjectType( serialized_name="resourceCache", ) properties.resource_concurrency_control_options = AAZDictType( serialized_name="resourceConcurrencyControlOptions", ) properties.resource_deletion_policy = AAZStrType( serialized_name="resourceDeletionPolicy", ) properties.resource_graph_configuration = AAZObjectType( serialized_name="resourceGraphConfiguration", ) properties.resource_management_options = AAZObjectType( serialized_name="resourceManagementOptions", ) properties.resource_move_policy = AAZObjectType( serialized_name="resourceMovePolicy", ) properties.resource_provider_authorization_rules = AAZObjectType( serialized_name="resourceProviderAuthorizationRules", ) properties.resource_query_management = AAZObjectType( serialized_name="resourceQueryManagement", ) properties.resource_sub_type = AAZStrType( serialized_name="resourceSubType", ) properties.resource_type_common_attribute_management = AAZObjectType( serialized_name="resourceTypeCommonAttributeManagement", ) properties.resource_validation = AAZStrType( serialized_name="resourceValidation", ) properties.routing_rule = AAZObjectType( serialized_name="routingRule", ) properties.routing_type = AAZStrType( serialized_name="routingType", ) properties.service_tree_infos = AAZListType( serialized_name="serviceTreeInfos", ) properties.sku_link = AAZStrType( serialized_name="skuLink", ) properties.subscription_lifecycle_notification_specifications = AAZObjectType( serialized_name="subscriptionLifecycleNotificationSpecifications", ) properties.subscription_state_rules = AAZListType( serialized_name="subscriptionStateRules", ) properties.supports_tags = AAZBoolType( serialized_name="supportsTags", ) properties.swagger_specifications = AAZListType( serialized_name="swaggerSpecifications", ) properties.template_deployment_options = AAZObjectType( serialized_name="templateDeploymentOptions", ) properties.template_deployment_policy = AAZObjectType( serialized_name="templateDeploymentPolicy", ) properties.throttling_rules = AAZListType( serialized_name="throttlingRules", ) properties.token_auth_configuration = AAZObjectType( serialized_name="tokenAuthConfiguration", ) _ListHelper._build_schema_token_auth_configuration_read( properties.token_auth_configuration) allowed_resource_names = cls._schema_on_200.value.Element.properties.allowed_resource_names allowed_resource_names.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.allowed_resource_names.Element _element.get_action_verb = AAZStrType( serialized_name="getActionVerb", ) _element.name = AAZStrType() allowed_template_deployment_reference_actions = cls._schema_on_200.value.Element.properties.allowed_template_deployment_reference_actions allowed_template_deployment_reference_actions.Element = AAZStrType() allowed_unauthorized_actions = cls._schema_on_200.value.Element.properties.allowed_unauthorized_actions allowed_unauthorized_actions.Element = AAZStrType() api_profiles = cls._schema_on_200.value.Element.properties.api_profiles api_profiles.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.api_profiles.Element _element.api_version = AAZStrType( serialized_name="apiVersion", ) _element.profile_version = AAZStrType( serialized_name="profileVersion", ) async_timeout_rules = cls._schema_on_200.value.Element.properties.async_timeout_rules async_timeout_rules.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.async_timeout_rules.Element _element.action_name = AAZStrType( serialized_name="actionName", ) _element.timeout = AAZStrType() authorization_action_mappings = cls._schema_on_200.value.Element.properties.authorization_action_mappings authorization_action_mappings.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.authorization_action_mappings.Element _element.desired = AAZStrType() _element.original = AAZStrType() availability_zone_rule = cls._schema_on_200.value.Element.properties.availability_zone_rule availability_zone_rule.availability_zone_policy = AAZStrType( serialized_name="availabilityZonePolicy", ) capacity_rule = cls._schema_on_200.value.Element.properties.capacity_rule capacity_rule.capacity_policy = AAZStrType( serialized_name="capacityPolicy", ) capacity_rule.sku_alias = AAZStrType( serialized_name="skuAlias", ) check_name_availability_specifications = cls._schema_on_200.value.Element.properties.check_name_availability_specifications check_name_availability_specifications.enable_default_validation = AAZBoolType( serialized_name="enableDefaultValidation", ) check_name_availability_specifications.resource_types_with_custom_validation = AAZListType( serialized_name="resourceTypesWithCustomValidation", ) resource_types_with_custom_validation = cls._schema_on_200.value.Element.properties.check_name_availability_specifications.resource_types_with_custom_validation resource_types_with_custom_validation.Element = AAZStrType() common_api_versions = cls._schema_on_200.value.Element.properties.common_api_versions common_api_versions.Element = AAZStrType() disallowed_action_verbs = cls._schema_on_200.value.Element.properties.disallowed_action_verbs disallowed_action_verbs.Element = AAZStrType() disallowed_end_user_operations = cls._schema_on_200.value.Element.properties.disallowed_end_user_operations disallowed_end_user_operations.Element = AAZStrType() dsts_configuration = cls._schema_on_200.value.Element.properties.dsts_configuration dsts_configuration.service_dns_name = AAZStrType( serialized_name="serviceDnsName", ) dsts_configuration.service_name = AAZStrType( serialized_name="serviceName", flags={"required": True}, ) endpoints = cls._schema_on_200.value.Element.properties.endpoints endpoints.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.endpoints.Element _element.api_version = AAZStrType( serialized_name="apiVersion", ) _element.api_versions = AAZListType( serialized_name="apiVersions", ) _element.data_boundary = AAZStrType( serialized_name="dataBoundary", ) _element.dsts_configuration = AAZObjectType( serialized_name="dstsConfiguration", ) _element.enabled = AAZBoolType() _element.endpoint_type = AAZStrType( serialized_name="endpointType", ) _element.endpoint_uri = AAZStrType( serialized_name="endpointUri", ) _element.extensions = AAZListType() _element.features_rule = AAZObjectType( serialized_name="featuresRule", ) _element.kind = AAZStrType() _element.locations = AAZListType() _element.required_features = AAZListType( serialized_name="requiredFeatures", ) _element.sku_link = AAZStrType( serialized_name="skuLink", ) _element.timeout = AAZStrType() _element.token_auth_configuration = AAZObjectType( serialized_name="tokenAuthConfiguration", ) _ListHelper._build_schema_token_auth_configuration_read( _element.token_auth_configuration) _element.zones = AAZListType() api_versions = cls._schema_on_200.value.Element.properties.endpoints.Element.api_versions api_versions.Element = AAZStrType() dsts_configuration = cls._schema_on_200.value.Element.properties.endpoints.Element.dsts_configuration dsts_configuration.service_dns_name = AAZStrType( serialized_name="serviceDnsName", ) dsts_configuration.service_name = AAZStrType( serialized_name="serviceName", flags={"required": True}, ) extensions = cls._schema_on_200.value.Element.properties.endpoints.Element.extensions extensions.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.endpoints.Element.extensions.Element _element.endpoint_uri = AAZStrType( serialized_name="endpointUri", ) _element.extension_categories = AAZListType( serialized_name="extensionCategories", ) _element.timeout = AAZStrType() extension_categories = cls._schema_on_200.value.Element.properties.endpoints.Element.extensions.Element.extension_categories extension_categories.Element = AAZStrType() features_rule = cls._schema_on_200.value.Element.properties.endpoints.Element.features_rule features_rule.required_features_policy = AAZStrType( serialized_name="requiredFeaturesPolicy", flags={"required": True}, ) locations = cls._schema_on_200.value.Element.properties.endpoints.Element.locations locations.Element = AAZStrType() required_features = cls._schema_on_200.value.Element.properties.endpoints.Element.required_features required_features.Element = AAZStrType() zones = cls._schema_on_200.value.Element.properties.endpoints.Element.zones zones.Element = AAZStrType() extended_locations = cls._schema_on_200.value.Element.properties.extended_locations extended_locations.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.extended_locations.Element _element.supported_policy = AAZStrType( serialized_name="supportedPolicy", ) _element.type = AAZStrType() extension_options = cls._schema_on_200.value.Element.properties.extension_options extension_options.resource_creation_begin = AAZObjectType( serialized_name="resourceCreationBegin", ) resource_creation_begin = cls._schema_on_200.value.Element.properties.extension_options.resource_creation_begin resource_creation_begin.request = AAZListType() resource_creation_begin.response = AAZListType() request = cls._schema_on_200.value.Element.properties.extension_options.resource_creation_begin.request request.Element = AAZStrType() response = cls._schema_on_200.value.Element.properties.extension_options.resource_creation_begin.response response.Element = AAZStrType() features_rule = cls._schema_on_200.value.Element.properties.features_rule features_rule.required_features_policy = AAZStrType( serialized_name="requiredFeaturesPolicy", flags={"required": True}, ) identity_management = cls._schema_on_200.value.Element.properties.identity_management identity_management.application_id = AAZStrType( serialized_name="applicationId", ) identity_management.application_ids = AAZListType( serialized_name="applicationIds", ) identity_management.delegation_app_ids = AAZListType( serialized_name="delegationAppIds", ) identity_management.type = AAZStrType() application_ids = cls._schema_on_200.value.Element.properties.identity_management.application_ids application_ids.Element = AAZStrType() delegation_app_ids = cls._schema_on_200.value.Element.properties.identity_management.delegation_app_ids delegation_app_ids.Element = AAZStrType() legacy_names = cls._schema_on_200.value.Element.properties.legacy_names legacy_names.Element = AAZStrType() legacy_policy = cls._schema_on_200.value.Element.properties.legacy_policy legacy_policy.disallowed_conditions = AAZListType( serialized_name="disallowedConditions", ) legacy_policy.disallowed_legacy_operations = AAZListType( serialized_name="disallowedLegacyOperations", ) disallowed_conditions = cls._schema_on_200.value.Element.properties.legacy_policy.disallowed_conditions disallowed_conditions.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.legacy_policy.disallowed_conditions.Element _element.disallowed_legacy_operations = AAZListType( serialized_name="disallowedLegacyOperations", ) _element.feature = AAZStrType() disallowed_legacy_operations = cls._schema_on_200.value.Element.properties.legacy_policy.disallowed_conditions.Element.disallowed_legacy_operations disallowed_legacy_operations.Element = AAZStrType() disallowed_legacy_operations = cls._schema_on_200.value.Element.properties.legacy_policy.disallowed_legacy_operations disallowed_legacy_operations.Element = AAZStrType() linked_access_checks = cls._schema_on_200.value.Element.properties.linked_access_checks linked_access_checks.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.linked_access_checks.Element _element.action_name = AAZStrType( serialized_name="actionName", ) _element.linked_action = AAZStrType( serialized_name="linkedAction", ) _element.linked_action_verb = AAZStrType( serialized_name="linkedActionVerb", ) _element.linked_property = AAZStrType( serialized_name="linkedProperty", ) _element.linked_type = AAZStrType( serialized_name="linkedType", ) linked_notification_rules = cls._schema_on_200.value.Element.properties.linked_notification_rules linked_notification_rules.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.linked_notification_rules.Element _element.actions = AAZListType() _element.actions_on_failed_operation = AAZListType( serialized_name="actionsOnFailedOperation", ) _element.fast_path_actions = AAZListType( serialized_name="fastPathActions", ) _element.fast_path_actions_on_failed_operation = AAZListType( serialized_name="fastPathActionsOnFailedOperation", ) _element.linked_notification_timeout = AAZStrType( serialized_name="linkedNotificationTimeout", ) actions = cls._schema_on_200.value.Element.properties.linked_notification_rules.Element.actions actions.Element = AAZStrType() actions_on_failed_operation = cls._schema_on_200.value.Element.properties.linked_notification_rules.Element.actions_on_failed_operation actions_on_failed_operation.Element = AAZStrType() fast_path_actions = cls._schema_on_200.value.Element.properties.linked_notification_rules.Element.fast_path_actions fast_path_actions.Element = AAZStrType() fast_path_actions_on_failed_operation = cls._schema_on_200.value.Element.properties.linked_notification_rules.Element.fast_path_actions_on_failed_operation fast_path_actions_on_failed_operation.Element = AAZStrType() linked_operation_rules = cls._schema_on_200.value.Element.properties.linked_operation_rules linked_operation_rules.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.linked_operation_rules.Element _element.depends_on_types = AAZListType( serialized_name="dependsOnTypes", ) _element.linked_action = AAZStrType( serialized_name="linkedAction", flags={"required": True}, ) _element.linked_operation = AAZStrType( serialized_name="linkedOperation", flags={"required": True}, ) depends_on_types = cls._schema_on_200.value.Element.properties.linked_operation_rules.Element.depends_on_types depends_on_types.Element = AAZStrType() logging_rules = cls._schema_on_200.value.Element.properties.logging_rules logging_rules.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.logging_rules.Element _element.action = AAZStrType( flags={"required": True}, ) _element.detail_level = AAZStrType( serialized_name="detailLevel", flags={"required": True}, ) _element.direction = AAZStrType( flags={"required": True}, ) _element.hidden_property_paths = AAZObjectType( serialized_name="hiddenPropertyPaths", ) hidden_property_paths = cls._schema_on_200.value.Element.properties.logging_rules.Element.hidden_property_paths hidden_property_paths.hidden_paths_on_request = AAZListType( serialized_name="hiddenPathsOnRequest", ) hidden_property_paths.hidden_paths_on_response = AAZListType( serialized_name="hiddenPathsOnResponse", ) hidden_paths_on_request = cls._schema_on_200.value.Element.properties.logging_rules.Element.hidden_property_paths.hidden_paths_on_request hidden_paths_on_request.Element = AAZStrType() hidden_paths_on_response = cls._schema_on_200.value.Element.properties.logging_rules.Element.hidden_property_paths.hidden_paths_on_response hidden_paths_on_response.Element = AAZStrType() managed_resource_group_configuration = cls._schema_on_200.value.Element.properties.managed_resource_group_configuration managed_resource_group_configuration.application_ids = AAZListType( serialized_name="applicationIds", ) managed_resource_group_configuration.deny_assignment_configuration = AAZObjectType( serialized_name="denyAssignmentConfiguration", ) managed_resource_group_configuration.enabled = AAZBoolType() managed_resource_group_configuration.resource_group_location_override = AAZStrType( serialized_name="resourceGroupLocationOverride", ) application_ids = cls._schema_on_200.value.Element.properties.managed_resource_group_configuration.application_ids application_ids.Element = AAZStrType() deny_assignment_configuration = cls._schema_on_200.value.Element.properties.managed_resource_group_configuration.deny_assignment_configuration deny_assignment_configuration.enabled = AAZBoolType() deny_assignment_configuration.not_actions = AAZListType( serialized_name="notActions", ) not_actions = cls._schema_on_200.value.Element.properties.managed_resource_group_configuration.deny_assignment_configuration.not_actions not_actions.Element = AAZStrType() management = cls._schema_on_200.value.Element.properties.management management.authorization_owners = AAZListType( serialized_name="authorizationOwners", ) management.canary_manifest_owners = AAZListType( serialized_name="canaryManifestOwners", ) management.error_response_message_options = AAZObjectType( serialized_name="errorResponseMessageOptions", ) management.expedited_rollout_metadata = AAZObjectType( serialized_name="expeditedRolloutMetadata", ) management.expedited_rollout_submitters = AAZListType( serialized_name="expeditedRolloutSubmitters", ) management.incident_contact_email = AAZStrType( serialized_name="incidentContactEmail", ) management.incident_routing_service = AAZStrType( serialized_name="incidentRoutingService", ) management.incident_routing_team = AAZStrType( serialized_name="incidentRoutingTeam", ) management.manifest_owners = AAZListType( serialized_name="manifestOwners", ) management.pc_code = AAZStrType( serialized_name="pcCode", ) management.profit_center_program_id = AAZStrType( serialized_name="profitCenterProgramId", ) management.resource_access_policy = AAZStrType( serialized_name="resourceAccessPolicy", ) management.resource_access_roles = AAZListType( serialized_name="resourceAccessRoles", ) management.schema_owners = AAZListType( serialized_name="schemaOwners", ) management.service_tree_infos = AAZListType( serialized_name="serviceTreeInfos", ) authorization_owners = cls._schema_on_200.value.Element.properties.management.authorization_owners authorization_owners.Element = AAZStrType() canary_manifest_owners = cls._schema_on_200.value.Element.properties.management.canary_manifest_owners canary_manifest_owners.Element = AAZStrType() error_response_message_options = cls._schema_on_200.value.Element.properties.management.error_response_message_options error_response_message_options.server_failure_response_message_type = AAZStrType( serialized_name="serverFailureResponseMessageType", ) expedited_rollout_metadata = cls._schema_on_200.value.Element.properties.management.expedited_rollout_metadata expedited_rollout_metadata.enabled = AAZBoolType() expedited_rollout_metadata.expedited_rollout_intent = AAZStrType( serialized_name="expeditedRolloutIntent", ) expedited_rollout_submitters = cls._schema_on_200.value.Element.properties.management.expedited_rollout_submitters expedited_rollout_submitters.Element = AAZStrType() manifest_owners = cls._schema_on_200.value.Element.properties.management.manifest_owners manifest_owners.Element = AAZStrType() resource_access_roles = cls._schema_on_200.value.Element.properties.management.resource_access_roles resource_access_roles.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.management.resource_access_roles.Element _element.actions = AAZListType() _element.allowed_group_claims = AAZListType( serialized_name="allowedGroupClaims", ) actions = cls._schema_on_200.value.Element.properties.management.resource_access_roles.Element.actions actions.Element = AAZStrType() allowed_group_claims = cls._schema_on_200.value.Element.properties.management.resource_access_roles.Element.allowed_group_claims allowed_group_claims.Element = AAZStrType() schema_owners = cls._schema_on_200.value.Element.properties.management.schema_owners schema_owners.Element = AAZStrType() service_tree_infos = cls._schema_on_200.value.Element.properties.management.service_tree_infos service_tree_infos.Element = AAZObjectType() _ListHelper._build_schema_service_tree_info_read( service_tree_infos.Element) marketplace_options = cls._schema_on_200.value.Element.properties.marketplace_options marketplace_options.add_on_plan_conversion_allowed = AAZBoolType( serialized_name="addOnPlanConversionAllowed", ) metadata = cls._schema_on_200.value.Element.properties.metadata metadata.Element = AAZFreeFormDictType() notifications = cls._schema_on_200.value.Element.properties.notifications notifications.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.notifications.Element _element.notification_type = AAZStrType( serialized_name="notificationType", ) _element.skip_notifications = AAZStrType( serialized_name="skipNotifications", ) on_behalf_of_tokens = cls._schema_on_200.value.Element.properties.on_behalf_of_tokens on_behalf_of_tokens.action_name = AAZStrType( serialized_name="actionName", ) on_behalf_of_tokens.life_time = AAZStrType( serialized_name="lifeTime", ) open_api_configuration = cls._schema_on_200.value.Element.properties.open_api_configuration open_api_configuration.validation = AAZObjectType() validation = cls._schema_on_200.value.Element.properties.open_api_configuration.validation validation.allow_noncompliant_collection_response = AAZBoolType( serialized_name="allowNoncompliantCollectionResponse", ) private_endpoint_configuration = cls._schema_on_200.value.Element.properties.private_endpoint_configuration private_endpoint_configuration.group_connectivity_information = AAZListType( serialized_name="groupConnectivityInformation", flags={"required": True}, ) private_endpoint_configuration.min_api_version = AAZStrType( serialized_name="minApiVersion", flags={"required": True}, ) group_connectivity_information = cls._schema_on_200.value.Element.properties.private_endpoint_configuration.group_connectivity_information group_connectivity_information.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.private_endpoint_configuration.group_connectivity_information.Element _element.group_id = AAZStrType( serialized_name="groupId", flags={"required": True}, ) _element.redirect_map_id = AAZStrType( serialized_name="redirectMapId", ) _element.required_members = AAZListType( serialized_name="requiredMembers", flags={"required": True}, ) _element.required_zone_names = AAZListType( serialized_name="requiredZoneNames", flags={"required": True}, ) required_members = cls._schema_on_200.value.Element.properties.private_endpoint_configuration.group_connectivity_information.Element.required_members required_members.Element = AAZStrType() required_zone_names = cls._schema_on_200.value.Element.properties.private_endpoint_configuration.group_connectivity_information.Element.required_zone_names required_zone_names.Element = AAZStrType() quota_rule = cls._schema_on_200.value.Element.properties.quota_rule quota_rule.location_rules = AAZListType( serialized_name="locationRules", ) quota_rule.quota_policy = AAZStrType( serialized_name="quotaPolicy", ) quota_rule.required_features = AAZListType( serialized_name="requiredFeatures", ) location_rules = cls._schema_on_200.value.Element.properties.quota_rule.location_rules location_rules.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.quota_rule.location_rules.Element _element.location = AAZStrType() _element.policy = AAZStrType() _element.quota_id = AAZStrType( serialized_name="quotaId", ) required_features = cls._schema_on_200.value.Element.properties.quota_rule.required_features required_features.Element = AAZStrType() request_header_options = cls._schema_on_200.value.Element.properties.request_header_options request_header_options.opt_in_headers = AAZStrType( serialized_name="optInHeaders", ) request_header_options.opt_out_headers = AAZStrType( serialized_name="optOutHeaders", ) required_features = cls._schema_on_200.value.Element.properties.required_features required_features.Element = AAZStrType() resource_cache = cls._schema_on_200.value.Element.properties.resource_cache resource_cache.enable_resource_cache = AAZBoolType( serialized_name="enableResourceCache", ) resource_cache.resource_cache_expiration_timespan = AAZStrType( serialized_name="resourceCacheExpirationTimespan", ) resource_concurrency_control_options = cls._schema_on_200.value.Element.properties.resource_concurrency_control_options resource_concurrency_control_options.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.resource_concurrency_control_options.Element _element.policy = AAZStrType() resource_graph_configuration = cls._schema_on_200.value.Element.properties.resource_graph_configuration resource_graph_configuration.api_version = AAZStrType( serialized_name="apiVersion", ) resource_graph_configuration.enabled = AAZBoolType() resource_management_options = cls._schema_on_200.value.Element.properties.resource_management_options resource_management_options.batch_provisioning_support = AAZObjectType( serialized_name="batchProvisioningSupport", ) resource_management_options.delete_dependencies = AAZListType( serialized_name="deleteDependencies", ) resource_management_options.nested_provisioning_support = AAZObjectType( serialized_name="nestedProvisioningSupport", ) batch_provisioning_support = cls._schema_on_200.value.Element.properties.resource_management_options.batch_provisioning_support batch_provisioning_support.supported_operations = AAZStrType( serialized_name="supportedOperations", ) delete_dependencies = cls._schema_on_200.value.Element.properties.resource_management_options.delete_dependencies delete_dependencies.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.resource_management_options.delete_dependencies.Element _element.linked_property = AAZStrType( serialized_name="linkedProperty", ) _element.linked_type = AAZStrType( serialized_name="linkedType", ) _element.required_features = AAZListType( serialized_name="requiredFeatures", ) required_features = cls._schema_on_200.value.Element.properties.resource_management_options.delete_dependencies.Element.required_features required_features.Element = AAZStrType() nested_provisioning_support = cls._schema_on_200.value.Element.properties.resource_management_options.nested_provisioning_support nested_provisioning_support.minimum_api_version = AAZStrType( serialized_name="minimumApiVersion", ) resource_move_policy = cls._schema_on_200.value.Element.properties.resource_move_policy resource_move_policy.cross_resource_group_move_enabled = AAZBoolType( serialized_name="crossResourceGroupMoveEnabled", ) resource_move_policy.cross_subscription_move_enabled = AAZBoolType( serialized_name="crossSubscriptionMoveEnabled", ) resource_move_policy.validation_required = AAZBoolType( serialized_name="validationRequired", ) resource_provider_authorization_rules = cls._schema_on_200.value.Element.properties.resource_provider_authorization_rules resource_provider_authorization_rules.async_operation_polling_rules = AAZObjectType( serialized_name="asyncOperationPollingRules", ) async_operation_polling_rules = cls._schema_on_200.value.Element.properties.resource_provider_authorization_rules.async_operation_polling_rules async_operation_polling_rules.additional_options = AAZStrType( serialized_name="additionalOptions", ) async_operation_polling_rules.authorization_actions = AAZListType( serialized_name="authorizationActions", ) authorization_actions = cls._schema_on_200.value.Element.properties.resource_provider_authorization_rules.async_operation_polling_rules.authorization_actions authorization_actions.Element = AAZStrType() resource_query_management = cls._schema_on_200.value.Element.properties.resource_query_management resource_query_management.filter_option = AAZStrType( serialized_name="filterOption", ) resource_type_common_attribute_management = cls._schema_on_200.value.Element.properties.resource_type_common_attribute_management resource_type_common_attribute_management.common_api_versions_merge_mode = AAZStrType( serialized_name="commonApiVersionsMergeMode", ) routing_rule = cls._schema_on_200.value.Element.properties.routing_rule routing_rule.host_resource_type = AAZStrType( serialized_name="hostResourceType", ) service_tree_infos = cls._schema_on_200.value.Element.properties.service_tree_infos service_tree_infos.Element = AAZObjectType() _ListHelper._build_schema_service_tree_info_read( service_tree_infos.Element) subscription_lifecycle_notification_specifications = cls._schema_on_200.value.Element.properties.subscription_lifecycle_notification_specifications subscription_lifecycle_notification_specifications.soft_delete_ttl = AAZStrType( serialized_name="softDeleteTTL", ) subscription_lifecycle_notification_specifications.subscription_state_override_actions = AAZListType( serialized_name="subscriptionStateOverrideActions", ) subscription_state_override_actions = cls._schema_on_200.value.Element.properties.subscription_lifecycle_notification_specifications.subscription_state_override_actions subscription_state_override_actions.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.subscription_lifecycle_notification_specifications.subscription_state_override_actions.Element _element.action = AAZStrType( flags={"required": True}, ) _element.state = AAZStrType( flags={"required": True}, ) subscription_state_rules = cls._schema_on_200.value.Element.properties.subscription_state_rules subscription_state_rules.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.subscription_state_rules.Element _element.allowed_actions = AAZListType( serialized_name="allowedActions", ) _element.state = AAZStrType() allowed_actions = cls._schema_on_200.value.Element.properties.subscription_state_rules.Element.allowed_actions allowed_actions.Element = AAZStrType() swagger_specifications = cls._schema_on_200.value.Element.properties.swagger_specifications swagger_specifications.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.swagger_specifications.Element _element.api_versions = AAZListType( serialized_name="apiVersions", ) _element.swagger_spec_folder_uri = AAZStrType( serialized_name="swaggerSpecFolderUri", ) api_versions = cls._schema_on_200.value.Element.properties.swagger_specifications.Element.api_versions api_versions.Element = AAZStrType() template_deployment_options = cls._schema_on_200.value.Element.properties.template_deployment_options template_deployment_options.preflight_options = AAZListType( serialized_name="preflightOptions", ) template_deployment_options.preflight_supported = AAZBoolType( serialized_name="preflightSupported", ) preflight_options = cls._schema_on_200.value.Element.properties.template_deployment_options.preflight_options preflight_options.Element = AAZStrType() template_deployment_policy = cls._schema_on_200.value.Element.properties.template_deployment_policy template_deployment_policy.capabilities = AAZStrType( flags={"required": True}, ) template_deployment_policy.preflight_notifications = AAZStrType( serialized_name="preflightNotifications", ) template_deployment_policy.preflight_options = AAZStrType( serialized_name="preflightOptions", flags={"required": True}, ) throttling_rules = cls._schema_on_200.value.Element.properties.throttling_rules throttling_rules.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.throttling_rules.Element _element.action = AAZStrType( flags={"required": True}, ) _element.application_id = AAZListType( serialized_name="applicationId", ) _element.metrics = AAZListType( flags={"required": True}, ) _element.required_features = AAZListType( serialized_name="requiredFeatures", ) application_id = cls._schema_on_200.value.Element.properties.throttling_rules.Element.application_id application_id.Element = AAZStrType() metrics = cls._schema_on_200.value.Element.properties.throttling_rules.Element.metrics metrics.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.throttling_rules.Element.metrics.Element _element.interval = AAZStrType() _element.limit = AAZIntType( flags={"required": True}, ) _element.type = AAZStrType( flags={"required": True}, ) required_features = cls._schema_on_200.value.Element.properties.throttling_rules.Element.required_features required_features.Element = AAZStrType() system_data = cls._schema_on_200.value.Element.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", ) system_data.created_by = AAZStrType( serialized_name="createdBy", ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", ) return cls._schema_on_200
class ResourceTypeRegistrationsListByProviderRegistration(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
122
16
106
0
1
0
1
1
1
0
8
0
9
9
1,115
150
965
128
948
0
494
121
484
2
1
1
11
10,290
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/providerhub/azext_providerhub/aaz/latest/providerhub/resource_type_registration/_delete.py
azext_providerhub.aaz.latest.providerhub.resource_type_registration._delete.Delete.ResourceTypeRegistrationsDelete
class ResourceTypeRegistrationsDelete(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [202]: return self.client.build_lro_polling( self.ctx.args.no_wait, session, self.on_200_201, self.on_error, lro_options={"final-state-via": "location"}, path_format_arguments=self.url_parameters, ) if session.http_response.status_code in [204]: return self.client.build_lro_polling( self.ctx.args.no_wait, session, self.on_204, self.on_error, lro_options={"final-state-via": "location"}, path_format_arguments=self.url_parameters, ) if session.http_response.status_code in [200, 201]: return self.client.build_lro_polling( self.ctx.args.no_wait, session, self.on_200_201, self.on_error, lro_options={"final-state-via": "location"}, path_format_arguments=self.url_parameters, ) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}", **self.url_parameters ) @property def method(self): return "DELETE" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "providerNamespace", self.ctx.args.provider_namespace, required=True, ), **self.serialize_url_param( "resourceType", self.ctx.args.resource_type, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-04-01-preview", required=True, ), } return parameters def on_204(self, session): pass def on_200_201(self, session): pass
class ResourceTypeRegistrationsDelete(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass def on_204(self, session): pass def on_200_201(self, session): pass
14
0
9
0
9
0
1
0
1
0
0
0
8
1
8
8
84
9
75
20
61
0
28
14
19
4
1
1
11
10,291
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/providerhub/azext_providerhub/aaz/latest/providerhub/resource_type_registration/_create.py
azext_providerhub.aaz.latest.providerhub.resource_type_registration._create.Create.ResourceTypeRegistrationsCreateOrUpdate
class ResourceTypeRegistrationsCreateOrUpdate(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [202]: return self.client.build_lro_polling( self.ctx.args.no_wait, session, self.on_200_201, self.on_error, lro_options={"final-state-via": "azure-async-operation"}, path_format_arguments=self.url_parameters, ) if session.http_response.status_code in [200, 201]: return self.client.build_lro_polling( self.ctx.args.no_wait, session, self.on_200_201, self.on_error, lro_options={"final-state-via": "azure-async-operation"}, path_format_arguments=self.url_parameters, ) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}", **self.url_parameters ) @property def method(self): return "PUT" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "providerNamespace", self.ctx.args.provider_namespace, required=True, ), **self.serialize_url_param( "resourceType", self.ctx.args.resource_type, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-04-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Content-Type", "application/json", ), **self.serialize_header_param( "Accept", "application/json", ), } return parameters @property def content(self): _content_value, _builder = self.new_content_builder( self.ctx.args, typ=AAZObjectType, typ_kwargs={ "flags": {"required": True, "client_flatten": True}} ) _builder.set_prop("kind", AAZStrType, ".kind") _builder.set_prop("properties", AAZObjectType) properties = _builder.get(".properties") if properties is not None: properties.set_prop("addResourceListTargetLocations", AAZBoolType, ".add_resource_list_target_locations") properties.set_prop("additionalOptions", AAZStrType, ".additional_options") properties.set_prop("allowEmptyRoleAssignments", AAZBoolType, ".allow_empty_role_assignments") properties.set_prop("allowedResourceNames", AAZListType, ".allowed_resource_names") properties.set_prop("allowedTemplateDeploymentReferenceActions", AAZListType, ".allowed_template_deployment_reference_actions") properties.set_prop( "allowedUnauthorizedActions", AAZListType, ".allowed_unauthorized_actions") properties.set_prop( "apiProfiles", AAZListType, ".api_profiles") properties.set_prop("asyncOperationResourceTypeName", AAZStrType, ".async_operation_resource_type_name") properties.set_prop("asyncTimeoutRules", AAZListType, ".async_timeout_rules") properties.set_prop( "authorizationActionMappings", AAZListType, ".authorization_action_mappings") properties.set_prop("availabilityZoneRule", AAZObjectType, ".availability_zone_rule") properties.set_prop( "capacityRule", AAZObjectType, ".capacity_rule") properties.set_prop("category", AAZStrType, ".category") properties.set_prop("checkNameAvailabilitySpecifications", AAZObjectType, ".check_name_availability_specifications") properties.set_prop("commonApiVersions", AAZListType, ".common_api_versions") properties.set_prop( "crossTenantTokenValidation", AAZStrType, ".cross_tenant_token_validation") properties.set_prop("defaultApiVersion", AAZStrType, ".default_api_version") properties.set_prop("disallowedActionVerbs", AAZListType, ".disallowed_action_verbs") properties.set_prop( "disallowedEndUserOperations", AAZListType, ".disallowed_end_user_operations") properties.set_prop("dstsConfiguration", AAZObjectType, ".dsts_configuration") properties.set_prop("enableAsyncOperation", AAZBoolType, ".enable_async_operation") properties.set_prop("enableThirdPartyS2S", AAZBoolType, ".enable_third_party_s2_s") properties.set_prop("endpoints", AAZListType, ".endpoints") properties.set_prop("extendedLocations", AAZListType, ".extended_locations") properties.set_prop("extensionOptions", AAZObjectType) properties.set_prop("featuresRule", AAZObjectType) properties.set_prop("frontdoorRequestMode", AAZStrType, ".frontdoor_request_mode") properties.set_prop("groupingTag", AAZStrType, ".grouping_tag") properties.set_prop("identityManagement", AAZObjectType, ".identity_management") properties.set_prop( "isPureProxy", AAZBoolType, ".is_pure_proxy") properties.set_prop("legacyName", AAZStrType, ".legacy_name") properties.set_prop( "legacyNames", AAZListType, ".legacy_names") properties.set_prop( "legacyPolicy", AAZObjectType, ".legacy_policy") properties.set_prop("linkedAccessChecks", AAZListType, ".linked_access_checks") properties.set_prop("linkedNotificationRules", AAZListType, ".linked_notification_rules") properties.set_prop("linkedOperationRules", AAZListType, ".linked_operation_rules") properties.set_prop( "loggingRules", AAZListType, ".logging_rules") properties.set_prop("managedResourceGroupConfiguration", AAZObjectType, ".managed_resource_group_configuration") properties.set_prop("management", AAZObjectType, ".management") properties.set_prop( "manifestLink", AAZStrType, ".manifest_link") properties.set_prop("marketplaceOptions", AAZObjectType, ".marketplace_options") properties.set_prop("marketplaceType", AAZStrType, ".marketplace_type") properties.set_prop("metadata", AAZDictType, ".metadata") properties.set_prop( "notifications", AAZListType, ".notifications") properties.set_prop("onBehalfOfTokens", AAZObjectType, ".on_behalf_of_tokens") properties.set_prop("openApiConfiguration", AAZObjectType, ".open_api_configuration") properties.set_prop("policyExecutionType", AAZStrType, ".policy_execution_type") properties.set_prop("privateEndpointConfiguration", AAZObjectType, ".private_endpoint_configuration") properties.set_prop("quotaRule", AAZObjectType, ".quota_rule") properties.set_prop("regionality", AAZStrType, ".regionality") properties.set_prop("requestHeaderOptions", AAZObjectType) properties.set_prop("requiredFeatures", AAZListType, ".required_features") properties.set_prop( "resourceCache", AAZObjectType, ".resource_cache") properties.set_prop("resourceConcurrencyControlOptions", AAZDictType, ".resource_concurrency_control_options") properties.set_prop("resourceDeletionPolicy", AAZStrType, ".resource_deletion_policy") properties.set_prop( "resourceGraphConfiguration", AAZObjectType, ".resource_graph_configuration") properties.set_prop("resourceManagementOptions", AAZObjectType, ".resource_management_options") properties.set_prop("resourceMovePolicy", AAZObjectType, ".resource_move_policy") properties.set_prop("resourceProviderAuthorizationRules", AAZObjectType, ".resource_provider_authorization_rules") properties.set_prop("resourceQueryManagement", AAZObjectType, ".resource_query_management") properties.set_prop("resourceSubType", AAZStrType, ".resource_sub_type") properties.set_prop("resourceTypeCommonAttributeManagement", AAZObjectType, ".resource_type_common_attribute_management") properties.set_prop("resourceValidation", AAZStrType, ".resource_validation") properties.set_prop( "routingRule", AAZObjectType, ".routing_rule") properties.set_prop("routingType", AAZStrType, ".routing_type") properties.set_prop("serviceTreeInfos", AAZListType, ".service_tree_infos") properties.set_prop("skuLink", AAZStrType, ".sku_link") properties.set_prop( "subscriptionLifecycleNotificationSpecifications", AAZObjectType) properties.set_prop("subscriptionStateRules", AAZListType, ".subscription_state_rules") properties.set_prop( "supportsTags", AAZBoolType, ".supports_tags") properties.set_prop("swaggerSpecifications", AAZListType, ".swagger_specifications") properties.set_prop("templateDeploymentOptions", AAZObjectType, ".template_deployment_options") properties.set_prop("templateDeploymentPolicy", AAZObjectType, ".template_deployment_policy") properties.set_prop("throttlingRules", AAZListType, ".throttling_rules") _CreateHelper._build_schema_token_auth_configuration_create(properties.set_prop( "tokenAuthConfiguration", AAZObjectType, ".token_auth_configuration")) allowed_resource_names = _builder.get( ".properties.allowedResourceNames") if allowed_resource_names is not None: allowed_resource_names.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.allowedResourceNames[]") if _elements is not None: _elements.set_prop( "getActionVerb", AAZStrType, ".get_action_verb") _elements.set_prop("name", AAZStrType, ".name") allowed_template_deployment_reference_actions = _builder.get( ".properties.allowedTemplateDeploymentReferenceActions") if allowed_template_deployment_reference_actions is not None: allowed_template_deployment_reference_actions.set_elements( AAZStrType, ".") allowed_unauthorized_actions = _builder.get( ".properties.allowedUnauthorizedActions") if allowed_unauthorized_actions is not None: allowed_unauthorized_actions.set_elements(AAZStrType, ".") api_profiles = _builder.get(".properties.apiProfiles") if api_profiles is not None: api_profiles.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.apiProfiles[]") if _elements is not None: _elements.set_prop("apiVersion", AAZStrType, ".api_version") _elements.set_prop( "profileVersion", AAZStrType, ".profile_version") async_timeout_rules = _builder.get(".properties.asyncTimeoutRules") if async_timeout_rules is not None: async_timeout_rules.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.asyncTimeoutRules[]") if _elements is not None: _elements.set_prop("actionName", AAZStrType, ".action_name") _elements.set_prop("timeout", AAZStrType, ".timeout") authorization_action_mappings = _builder.get( ".properties.authorizationActionMappings") if authorization_action_mappings is not None: authorization_action_mappings.set_elements(AAZObjectType, ".") _elements = _builder.get( ".properties.authorizationActionMappings[]") if _elements is not None: _elements.set_prop("desired", AAZStrType, ".desired") _elements.set_prop("original", AAZStrType, ".original") availability_zone_rule = _builder.get( ".properties.availabilityZoneRule") if availability_zone_rule is not None: availability_zone_rule.set_prop( "availabilityZonePolicy", AAZStrType, ".availability_zone_policy") capacity_rule = _builder.get(".properties.capacityRule") if capacity_rule is not None: capacity_rule.set_prop( "capacityPolicy", AAZStrType, ".capacity_policy") capacity_rule.set_prop("skuAlias", AAZStrType, ".sku_alias") check_name_availability_specifications = _builder.get( ".properties.checkNameAvailabilitySpecifications") if check_name_availability_specifications is not None: check_name_availability_specifications.set_prop( "enableDefaultValidation", AAZBoolType, ".enable_default_validation") check_name_availability_specifications.set_prop( "resourceTypesWithCustomValidation", AAZListType, ".resource_types_with_custom_validation") resource_types_with_custom_validation = _builder.get( ".properties.checkNameAvailabilitySpecifications.resourceTypesWithCustomValidation") if resource_types_with_custom_validation is not None: resource_types_with_custom_validation.set_elements( AAZStrType, ".") common_api_versions = _builder.get(".properties.commonApiVersions") if common_api_versions is not None: common_api_versions.set_elements(AAZStrType, ".") disallowed_action_verbs = _builder.get( ".properties.disallowedActionVerbs") if disallowed_action_verbs is not None: disallowed_action_verbs.set_elements(AAZStrType, ".") disallowed_end_user_operations = _builder.get( ".properties.disallowedEndUserOperations") if disallowed_end_user_operations is not None: disallowed_end_user_operations.set_elements(AAZStrType, ".") dsts_configuration = _builder.get(".properties.dstsConfiguration") if dsts_configuration is not None: dsts_configuration.set_prop( "serviceDnsName", AAZStrType, ".service_dns_name") dsts_configuration.set_prop("serviceName", AAZStrType, ".service_name", typ_kwargs={ "flags": {"required": True}}) endpoints = _builder.get(".properties.endpoints") if endpoints is not None: endpoints.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.endpoints[]") if _elements is not None: _elements.set_prop("apiVersion", AAZStrType, ".api_version") _elements.set_prop("apiVersions", AAZListType, ".api_versions") _elements.set_prop( "dataBoundary", AAZStrType, ".data_boundary") _elements.set_prop("dstsConfiguration", AAZObjectType, ".dsts_configuration") _elements.set_prop("enabled", AAZBoolType, ".enabled") _elements.set_prop( "endpointType", AAZStrType, ".endpoint_type") _elements.set_prop("endpointUri", AAZStrType, ".endpoint_uri") _elements.set_prop("extensions", AAZListType, ".extensions") _elements.set_prop( "featuresRule", AAZObjectType, ".features_rule") _elements.set_prop("kind", AAZStrType, ".kind") _elements.set_prop("locations", AAZListType, ".locations") _elements.set_prop("requiredFeatures", AAZListType, ".required_features") _elements.set_prop("skuLink", AAZStrType, ".sku_link") _elements.set_prop("timeout", AAZStrType, ".timeout") _CreateHelper._build_schema_token_auth_configuration_create(_elements.set_prop( "tokenAuthConfiguration", AAZObjectType, ".token_auth_configuration")) _elements.set_prop("zones", AAZListType, ".zones") api_versions = _builder.get(".properties.endpoints[].apiVersions") if api_versions is not None: api_versions.set_elements(AAZStrType, ".") dsts_configuration = _builder.get( ".properties.endpoints[].dstsConfiguration") if dsts_configuration is not None: dsts_configuration.set_prop( "serviceDnsName", AAZStrType, ".service_dns_name") dsts_configuration.set_prop("serviceName", AAZStrType, ".service_name", typ_kwargs={ "flags": {"required": True}}) extensions = _builder.get(".properties.endpoints[].extensions") if extensions is not None: extensions.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.endpoints[].extensions[]") if _elements is not None: _elements.set_prop("endpointUri", AAZStrType, ".endpoint_uri") _elements.set_prop("extensionCategories", AAZListType, ".extension_categories") _elements.set_prop("timeout", AAZStrType, ".timeout") extension_categories = _builder.get( ".properties.endpoints[].extensions[].extensionCategories") if extension_categories is not None: extension_categories.set_elements(AAZStrType, ".") features_rule = _builder.get( ".properties.endpoints[].featuresRule") if features_rule is not None: features_rule.set_prop("requiredFeaturesPolicy", AAZStrType, ".required_features_policy", typ_kwargs={ "flags": {"required": True}}) locations = _builder.get(".properties.endpoints[].locations") if locations is not None: locations.set_elements(AAZStrType, ".") required_features = _builder.get( ".properties.endpoints[].requiredFeatures") if required_features is not None: required_features.set_elements(AAZStrType, ".") zones = _builder.get(".properties.endpoints[].zones") if zones is not None: zones.set_elements(AAZStrType, ".") extended_locations = _builder.get(".properties.extendedLocations") if extended_locations is not None: extended_locations.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.extendedLocations[]") if _elements is not None: _elements.set_prop("supportedPolicy", AAZStrType, ".supported_policy") _elements.set_prop("type", AAZStrType, ".type") extension_options = _builder.get(".properties.extensionOptions") if extension_options is not None: extension_options.set_prop( "resourceCreationBegin", AAZObjectType, ".resource_creation_begin") resource_creation_begin = _builder.get( ".properties.extensionOptions.resourceCreationBegin") if resource_creation_begin is not None: resource_creation_begin.set_prop( "request", AAZListType, ".request") resource_creation_begin.set_prop( "response", AAZListType, ".response") request = _builder.get( ".properties.extensionOptions.resourceCreationBegin.request") if request is not None: request.set_elements(AAZStrType, ".") response = _builder.get( ".properties.extensionOptions.resourceCreationBegin.response") if response is not None: response.set_elements(AAZStrType, ".") features_rule = _builder.get(".properties.featuresRule") if features_rule is not None: features_rule.set_prop("requiredFeaturesPolicy", AAZStrType, ".required_features_policy", typ_kwargs={ "flags": {"required": True}}) identity_management = _builder.get( ".properties.identityManagement") if identity_management is not None: identity_management.set_prop( "applicationId", AAZStrType, ".application_id") identity_management.set_prop( "applicationIds", AAZListType, ".application_ids") identity_management.set_prop( "delegationAppIds", AAZListType, ".delegation_app_ids") identity_management.set_prop("type", AAZStrType, ".type") application_ids = _builder.get( ".properties.identityManagement.applicationIds") if application_ids is not None: application_ids.set_elements(AAZStrType, ".") delegation_app_ids = _builder.get( ".properties.identityManagement.delegationAppIds") if delegation_app_ids is not None: delegation_app_ids.set_elements(AAZStrType, ".") legacy_names = _builder.get(".properties.legacyNames") if legacy_names is not None: legacy_names.set_elements(AAZStrType, ".") legacy_policy = _builder.get(".properties.legacyPolicy") if legacy_policy is not None: legacy_policy.set_prop( "disallowedConditions", AAZListType, ".disallowed_conditions") legacy_policy.set_prop( "disallowedLegacyOperations", AAZListType, ".disallowed_legacy_operations") disallowed_conditions = _builder.get( ".properties.legacyPolicy.disallowedConditions") if disallowed_conditions is not None: disallowed_conditions.set_elements(AAZObjectType, ".") _elements = _builder.get( ".properties.legacyPolicy.disallowedConditions[]") if _elements is not None: _elements.set_prop("disallowedLegacyOperations", AAZListType, ".disallowed_legacy_operations") _elements.set_prop("feature", AAZStrType, ".feature") disallowed_legacy_operations = _builder.get( ".properties.legacyPolicy.disallowedConditions[].disallowedLegacyOperations") if disallowed_legacy_operations is not None: disallowed_legacy_operations.set_elements(AAZStrType, ".") disallowed_legacy_operations = _builder.get( ".properties.legacyPolicy.disallowedLegacyOperations") if disallowed_legacy_operations is not None: disallowed_legacy_operations.set_elements(AAZStrType, ".") linked_access_checks = _builder.get( ".properties.linkedAccessChecks") if linked_access_checks is not None: linked_access_checks.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.linkedAccessChecks[]") if _elements is not None: _elements.set_prop("actionName", AAZStrType, ".action_name") _elements.set_prop( "linkedAction", AAZStrType, ".linked_action") _elements.set_prop("linkedActionVerb", AAZStrType, ".linked_action_verb") _elements.set_prop( "linkedProperty", AAZStrType, ".linked_property") _elements.set_prop("linkedType", AAZStrType, ".linked_type") linked_notification_rules = _builder.get( ".properties.linkedNotificationRules") if linked_notification_rules is not None: linked_notification_rules.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.linkedNotificationRules[]") if _elements is not None: _elements.set_prop("actions", AAZListType, ".actions") _elements.set_prop("actionsOnFailedOperation", AAZListType, ".actions_on_failed_operation") _elements.set_prop("fastPathActions", AAZListType, ".fast_path_actions") _elements.set_prop("fastPathActionsOnFailedOperation", AAZListType, ".fast_path_actions_on_failed_operation") _elements.set_prop("linkedNotificationTimeout", AAZStrType, ".linked_notification_timeout") actions = _builder.get( ".properties.linkedNotificationRules[].actions") if actions is not None: actions.set_elements(AAZStrType, ".") actions_on_failed_operation = _builder.get( ".properties.linkedNotificationRules[].actionsOnFailedOperation") if actions_on_failed_operation is not None: actions_on_failed_operation.set_elements(AAZStrType, ".") fast_path_actions = _builder.get( ".properties.linkedNotificationRules[].fastPathActions") if fast_path_actions is not None: fast_path_actions.set_elements(AAZStrType, ".") fast_path_actions_on_failed_operation = _builder.get( ".properties.linkedNotificationRules[].fastPathActionsOnFailedOperation") if fast_path_actions_on_failed_operation is not None: fast_path_actions_on_failed_operation.set_elements( AAZStrType, ".") linked_operation_rules = _builder.get( ".properties.linkedOperationRules") if linked_operation_rules is not None: linked_operation_rules.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.linkedOperationRules[]") if _elements is not None: _elements.set_prop( "dependsOnTypes", AAZListType, ".depends_on_types") _elements.set_prop("linkedAction", AAZStrType, ".linked_action", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("linkedOperation", AAZStrType, ".linked_operation", typ_kwargs={ "flags": {"required": True}}) depends_on_types = _builder.get( ".properties.linkedOperationRules[].dependsOnTypes") if depends_on_types is not None: depends_on_types.set_elements(AAZStrType, ".") logging_rules = _builder.get(".properties.loggingRules") if logging_rules is not None: logging_rules.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.loggingRules[]") if _elements is not None: _elements.set_prop("action", AAZStrType, ".action", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("detailLevel", AAZStrType, ".detail_level", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("direction", AAZStrType, ".direction", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("hiddenPropertyPaths", AAZObjectType, ".hidden_property_paths") hidden_property_paths = _builder.get( ".properties.loggingRules[].hiddenPropertyPaths") if hidden_property_paths is not None: hidden_property_paths.set_prop( "hiddenPathsOnRequest", AAZListType, ".hidden_paths_on_request") hidden_property_paths.set_prop( "hiddenPathsOnResponse", AAZListType, ".hidden_paths_on_response") hidden_paths_on_request = _builder.get( ".properties.loggingRules[].hiddenPropertyPaths.hiddenPathsOnRequest") if hidden_paths_on_request is not None: hidden_paths_on_request.set_elements(AAZStrType, ".") hidden_paths_on_response = _builder.get( ".properties.loggingRules[].hiddenPropertyPaths.hiddenPathsOnResponse") if hidden_paths_on_response is not None: hidden_paths_on_response.set_elements(AAZStrType, ".") managed_resource_group_configuration = _builder.get( ".properties.managedResourceGroupConfiguration") if managed_resource_group_configuration is not None: managed_resource_group_configuration.set_prop( "applicationIds", AAZListType, ".application_ids") managed_resource_group_configuration.set_prop( "denyAssignmentConfiguration", AAZObjectType, ".deny_assignment_configuration") managed_resource_group_configuration.set_prop( "enabled", AAZBoolType, ".enabled") managed_resource_group_configuration.set_prop( "resourceGroupLocationOverride", AAZStrType, ".resource_group_location_override") application_ids = _builder.get( ".properties.managedResourceGroupConfiguration.applicationIds") if application_ids is not None: application_ids.set_elements(AAZStrType, ".") deny_assignment_configuration = _builder.get( ".properties.managedResourceGroupConfiguration.denyAssignmentConfiguration") if deny_assignment_configuration is not None: deny_assignment_configuration.set_prop( "enabled", AAZBoolType, ".enabled") deny_assignment_configuration.set_prop( "notActions", AAZListType, ".not_actions") not_actions = _builder.get( ".properties.managedResourceGroupConfiguration.denyAssignmentConfiguration.notActions") if not_actions is not None: not_actions.set_elements(AAZStrType, ".") management = _builder.get(".properties.management") if management is not None: management.set_prop("authorizationOwners", AAZListType, ".authorization_owners") management.set_prop("canaryManifestOwners", AAZListType, ".canary_manifest_owners") management.set_prop("errorResponseMessageOptions", AAZObjectType, ".error_response_message_options") management.set_prop("expeditedRolloutMetadata", AAZObjectType, ".expedited_rollout_metadata") management.set_prop( "expeditedRolloutSubmitters", AAZListType, ".expedited_rollout_submitters") management.set_prop("incidentContactEmail", AAZStrType, ".incident_contact_email") management.set_prop("incidentRoutingService", AAZStrType, ".incident_routing_service") management.set_prop("incidentRoutingTeam", AAZStrType, ".incident_routing_team") management.set_prop( "manifestOwners", AAZListType, ".manifest_owners") management.set_prop("pcCode", AAZStrType, ".pc_code") management.set_prop("profitCenterProgramId", AAZStrType, ".profit_center_program_id") management.set_prop("resourceAccessPolicy", AAZStrType, ".resource_access_policy") management.set_prop("resourceAccessRoles", AAZListType, ".resource_access_roles") management.set_prop( "schemaOwners", AAZListType, ".schema_owners") management.set_prop("serviceTreeInfos", AAZListType, ".service_tree_infos") authorization_owners = _builder.get( ".properties.management.authorizationOwners") if authorization_owners is not None: authorization_owners.set_elements(AAZStrType, ".") canary_manifest_owners = _builder.get( ".properties.management.canaryManifestOwners") if canary_manifest_owners is not None: canary_manifest_owners.set_elements(AAZStrType, ".") error_response_message_options = _builder.get( ".properties.management.errorResponseMessageOptions") if error_response_message_options is not None: error_response_message_options.set_prop( "serverFailureResponseMessageType", AAZStrType, ".server_failure_response_message_type") expedited_rollout_metadata = _builder.get( ".properties.management.expeditedRolloutMetadata") if expedited_rollout_metadata is not None: expedited_rollout_metadata.set_prop( "enabled", AAZBoolType, ".enabled") expedited_rollout_metadata.set_prop( "expeditedRolloutIntent", AAZStrType, ".expedited_rollout_intent") expedited_rollout_submitters = _builder.get( ".properties.management.expeditedRolloutSubmitters") if expedited_rollout_submitters is not None: expedited_rollout_submitters.set_elements(AAZStrType, ".") manifest_owners = _builder.get( ".properties.management.manifestOwners") if manifest_owners is not None: manifest_owners.set_elements(AAZStrType, ".") resource_access_roles = _builder.get( ".properties.management.resourceAccessRoles") if resource_access_roles is not None: resource_access_roles.set_elements(AAZObjectType, ".") _elements = _builder.get( ".properties.management.resourceAccessRoles[]") if _elements is not None: _elements.set_prop("actions", AAZListType, ".actions") _elements.set_prop("allowedGroupClaims", AAZListType, ".allowed_group_claims") actions = _builder.get( ".properties.management.resourceAccessRoles[].actions") if actions is not None: actions.set_elements(AAZStrType, ".") allowed_group_claims = _builder.get( ".properties.management.resourceAccessRoles[].allowedGroupClaims") if allowed_group_claims is not None: allowed_group_claims.set_elements(AAZStrType, ".") schema_owners = _builder.get(".properties.management.schemaOwners") if schema_owners is not None: schema_owners.set_elements(AAZStrType, ".") service_tree_infos = _builder.get( ".properties.management.serviceTreeInfos") if service_tree_infos is not None: _CreateHelper._build_schema_service_tree_info_create( service_tree_infos.set_elements(AAZObjectType, ".")) marketplace_options = _builder.get( ".properties.marketplaceOptions") if marketplace_options is not None: marketplace_options.set_prop( "addOnPlanConversionAllowed", AAZBoolType, ".add_on_plan_conversion_allowed") metadata = _builder.get(".properties.metadata") if metadata is not None: metadata.set_elements(AAZFreeFormDictType, ".") _elements = _builder.get(".properties.metadata{}") if _elements is not None: _elements.set_anytype_elements(".") notifications = _builder.get(".properties.notifications") if notifications is not None: notifications.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.notifications[]") if _elements is not None: _elements.set_prop("notificationType", AAZStrType, ".notification_type") _elements.set_prop("skipNotifications", AAZStrType, ".skip_notifications") on_behalf_of_tokens = _builder.get(".properties.onBehalfOfTokens") if on_behalf_of_tokens is not None: on_behalf_of_tokens.set_prop( "actionName", AAZStrType, ".action_name") on_behalf_of_tokens.set_prop( "lifeTime", AAZStrType, ".life_time") open_api_configuration = _builder.get( ".properties.openApiConfiguration") if open_api_configuration is not None: open_api_configuration.set_prop( "validation", AAZObjectType, ".validation") validation = _builder.get( ".properties.openApiConfiguration.validation") if validation is not None: validation.set_prop("allowNoncompliantCollectionResponse", AAZBoolType, ".allow_noncompliant_collection_response") private_endpoint_configuration = _builder.get( ".properties.privateEndpointConfiguration") if private_endpoint_configuration is not None: private_endpoint_configuration.set_prop( "groupConnectivityInformation", AAZListType, ".group_connectivity_information", typ_kwargs={"flags": {"required": True}}) private_endpoint_configuration.set_prop( "minApiVersion", AAZStrType, ".min_api_version", typ_kwargs={"flags": {"required": True}}) group_connectivity_information = _builder.get( ".properties.privateEndpointConfiguration.groupConnectivityInformation") if group_connectivity_information is not None: group_connectivity_information.set_elements(AAZObjectType, ".") _elements = _builder.get( ".properties.privateEndpointConfiguration.groupConnectivityInformation[]") if _elements is not None: _elements.set_prop("groupId", AAZStrType, ".group_id", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop( "redirectMapId", AAZStrType, ".redirect_map_id") _elements.set_prop("requiredMembers", AAZListType, ".required_members", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("requiredZoneNames", AAZListType, ".required_zone_names", typ_kwargs={ "flags": {"required": True}}) required_members = _builder.get( ".properties.privateEndpointConfiguration.groupConnectivityInformation[].requiredMembers") if required_members is not None: required_members.set_elements(AAZStrType, ".") required_zone_names = _builder.get( ".properties.privateEndpointConfiguration.groupConnectivityInformation[].requiredZoneNames") if required_zone_names is not None: required_zone_names.set_elements(AAZStrType, ".") quota_rule = _builder.get(".properties.quotaRule") if quota_rule is not None: quota_rule.set_prop( "locationRules", AAZListType, ".location_rules") quota_rule.set_prop("quotaPolicy", AAZStrType, ".quota_policy") quota_rule.set_prop("requiredFeatures", AAZListType, ".required_features") location_rules = _builder.get( ".properties.quotaRule.locationRules") if location_rules is not None: location_rules.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.quotaRule.locationRules[]") if _elements is not None: _elements.set_prop("location", AAZStrType, ".location") _elements.set_prop("policy", AAZStrType, ".policy") _elements.set_prop("quotaId", AAZStrType, ".quota_id") required_features = _builder.get( ".properties.quotaRule.requiredFeatures") if required_features is not None: required_features.set_elements(AAZStrType, ".") request_header_options = _builder.get( ".properties.requestHeaderOptions") if request_header_options is not None: request_header_options.set_prop( "optInHeaders", AAZStrType, ".opt_in_headers") request_header_options.set_prop( "optOutHeaders", AAZStrType, ".opt_out_headers") required_features = _builder.get(".properties.requiredFeatures") if required_features is not None: required_features.set_elements(AAZStrType, ".") resource_cache = _builder.get(".properties.resourceCache") if resource_cache is not None: resource_cache.set_prop( "enableResourceCache", AAZBoolType, ".enable_resource_cache") resource_cache.set_prop( "resourceCacheExpirationTimespan", AAZStrType, ".resource_cache_expiration_timespan") resource_concurrency_control_options = _builder.get( ".properties.resourceConcurrencyControlOptions") if resource_concurrency_control_options is not None: resource_concurrency_control_options.set_elements( AAZObjectType, ".") _elements = _builder.get( ".properties.resourceConcurrencyControlOptions{}") if _elements is not None: _elements.set_prop("policy", AAZStrType, ".policy") resource_graph_configuration = _builder.get( ".properties.resourceGraphConfiguration") if resource_graph_configuration is not None: resource_graph_configuration.set_prop( "apiVersion", AAZStrType, ".api_version") resource_graph_configuration.set_prop( "enabled", AAZBoolType, ".enabled") resource_management_options = _builder.get( ".properties.resourceManagementOptions") if resource_management_options is not None: resource_management_options.set_prop( "batchProvisioningSupport", AAZObjectType, ".batch_provisioning_support") resource_management_options.set_prop( "deleteDependencies", AAZListType, ".delete_dependencies") resource_management_options.set_prop( "nestedProvisioningSupport", AAZObjectType, ".nested_provisioning_support") batch_provisioning_support = _builder.get( ".properties.resourceManagementOptions.batchProvisioningSupport") if batch_provisioning_support is not None: batch_provisioning_support.set_prop( "supportedOperations", AAZStrType, ".supported_operations") delete_dependencies = _builder.get( ".properties.resourceManagementOptions.deleteDependencies") if delete_dependencies is not None: delete_dependencies.set_elements(AAZObjectType, ".") _elements = _builder.get( ".properties.resourceManagementOptions.deleteDependencies[]") if _elements is not None: _elements.set_prop( "linkedProperty", AAZStrType, ".linked_property") _elements.set_prop("linkedType", AAZStrType, ".linked_type") _elements.set_prop("requiredFeatures", AAZListType, ".required_features") required_features = _builder.get( ".properties.resourceManagementOptions.deleteDependencies[].requiredFeatures") if required_features is not None: required_features.set_elements(AAZStrType, ".") nested_provisioning_support = _builder.get( ".properties.resourceManagementOptions.nestedProvisioningSupport") if nested_provisioning_support is not None: nested_provisioning_support.set_prop( "minimumApiVersion", AAZStrType, ".minimum_api_version") resource_move_policy = _builder.get( ".properties.resourceMovePolicy") if resource_move_policy is not None: resource_move_policy.set_prop( "crossResourceGroupMoveEnabled", AAZBoolType, ".cross_resource_group_move_enabled") resource_move_policy.set_prop( "crossSubscriptionMoveEnabled", AAZBoolType, ".cross_subscription_move_enabled") resource_move_policy.set_prop( "validationRequired", AAZBoolType, ".validation_required") resource_provider_authorization_rules = _builder.get( ".properties.resourceProviderAuthorizationRules") if resource_provider_authorization_rules is not None: resource_provider_authorization_rules.set_prop( "asyncOperationPollingRules", AAZObjectType, ".async_operation_polling_rules") async_operation_polling_rules = _builder.get( ".properties.resourceProviderAuthorizationRules.asyncOperationPollingRules") if async_operation_polling_rules is not None: async_operation_polling_rules.set_prop( "additionalOptions", AAZStrType, ".additional_options") async_operation_polling_rules.set_prop( "authorizationActions", AAZListType, ".authorization_actions") authorization_actions = _builder.get( ".properties.resourceProviderAuthorizationRules.asyncOperationPollingRules.authorizationActions") if authorization_actions is not None: authorization_actions.set_elements(AAZStrType, ".") resource_query_management = _builder.get( ".properties.resourceQueryManagement") if resource_query_management is not None: resource_query_management.set_prop( "filterOption", AAZStrType, ".filter_option") resource_type_common_attribute_management = _builder.get( ".properties.resourceTypeCommonAttributeManagement") if resource_type_common_attribute_management is not None: resource_type_common_attribute_management.set_prop( "commonApiVersionsMergeMode", AAZStrType, ".common_api_versions_merge_mode") routing_rule = _builder.get(".properties.routingRule") if routing_rule is not None: routing_rule.set_prop("hostResourceType", AAZStrType, ".host_resource_type") service_tree_infos = _builder.get(".properties.serviceTreeInfos") if service_tree_infos is not None: _CreateHelper._build_schema_service_tree_info_create( service_tree_infos.set_elements(AAZObjectType, ".")) subscription_lifecycle_notification_specifications = _builder.get( ".properties.subscriptionLifecycleNotificationSpecifications") if subscription_lifecycle_notification_specifications is not None: subscription_lifecycle_notification_specifications.set_prop( "softDeleteTTL", AAZStrType, ".soft_delete_ttl") subscription_lifecycle_notification_specifications.set_prop( "subscriptionStateOverrideActions", AAZListType, ".subscription_state_override_actions") subscription_state_override_actions = _builder.get( ".properties.subscriptionLifecycleNotificationSpecifications.subscriptionStateOverrideActions") if subscription_state_override_actions is not None: subscription_state_override_actions.set_elements( AAZObjectType, ".") _elements = _builder.get( ".properties.subscriptionLifecycleNotificationSpecifications.subscriptionStateOverrideActions[]") if _elements is not None: _elements.set_prop("action", AAZStrType, ".action", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("state", AAZStrType, ".state", typ_kwargs={ "flags": {"required": True}}) subscription_state_rules = _builder.get( ".properties.subscriptionStateRules") if subscription_state_rules is not None: subscription_state_rules.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.subscriptionStateRules[]") if _elements is not None: _elements.set_prop( "allowedActions", AAZListType, ".allowed_actions") _elements.set_prop("state", AAZStrType, ".state") allowed_actions = _builder.get( ".properties.subscriptionStateRules[].allowedActions") if allowed_actions is not None: allowed_actions.set_elements(AAZStrType, ".") swagger_specifications = _builder.get( ".properties.swaggerSpecifications") if swagger_specifications is not None: swagger_specifications.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.swaggerSpecifications[]") if _elements is not None: _elements.set_prop("apiVersions", AAZListType, ".api_versions") _elements.set_prop("swaggerSpecFolderUri", AAZStrType, ".swagger_spec_folder_uri") api_versions = _builder.get( ".properties.swaggerSpecifications[].apiVersions") if api_versions is not None: api_versions.set_elements(AAZStrType, ".") template_deployment_options = _builder.get( ".properties.templateDeploymentOptions") if template_deployment_options is not None: template_deployment_options.set_prop( "preflightOptions", AAZListType, ".preflight_options") template_deployment_options.set_prop( "preflightSupported", AAZBoolType, ".preflight_supported") preflight_options = _builder.get( ".properties.templateDeploymentOptions.preflightOptions") if preflight_options is not None: preflight_options.set_elements(AAZStrType, ".") template_deployment_policy = _builder.get( ".properties.templateDeploymentPolicy") if template_deployment_policy is not None: template_deployment_policy.set_prop( "capabilities", AAZStrType, ".capabilities", typ_kwargs={"flags": {"required": True}}) template_deployment_policy.set_prop( "preflightNotifications", AAZStrType, ".preflight_notifications") template_deployment_policy.set_prop( "preflightOptions", AAZStrType, ".preflight_options", typ_kwargs={"flags": {"required": True}}) throttling_rules = _builder.get(".properties.throttlingRules") if throttling_rules is not None: throttling_rules.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.throttlingRules[]") if _elements is not None: _elements.set_prop("action", AAZStrType, ".action", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop( "applicationId", AAZListType, ".application_id") _elements.set_prop("metrics", AAZListType, ".metrics", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("requiredFeatures", AAZListType, ".required_features") application_id = _builder.get( ".properties.throttlingRules[].applicationId") if application_id is not None: application_id.set_elements(AAZStrType, ".") metrics = _builder.get(".properties.throttlingRules[].metrics") if metrics is not None: metrics.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.throttlingRules[].metrics[]") if _elements is not None: _elements.set_prop("interval", AAZStrType, ".interval") _elements.set_prop("limit", AAZIntType, ".limit", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("type", AAZStrType, ".type", typ_kwargs={ "flags": {"required": True}}) required_features = _builder.get( ".properties.throttlingRules[].requiredFeatures") if required_features is not None: required_features.set_elements(AAZStrType, ".") return self.serialize_content(_content_value) def on_200_201(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200_201 ) _schema_on_200_201 = None @classmethod def _build_schema_on_200_201(cls): if cls._schema_on_200_201 is not None: return cls._schema_on_200_201 cls._schema_on_200_201 = AAZObjectType() _schema_on_200_201 = cls._schema_on_200_201 _schema_on_200_201.id = AAZStrType( flags={"read_only": True}, ) _schema_on_200_201.kind = AAZStrType() _schema_on_200_201.name = AAZStrType( flags={"read_only": True}, ) _schema_on_200_201.properties = AAZObjectType() _schema_on_200_201.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _schema_on_200_201.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200_201.properties properties.add_resource_list_target_locations = AAZBoolType( serialized_name="addResourceListTargetLocations", ) properties.additional_options = AAZStrType( serialized_name="additionalOptions", ) properties.allow_empty_role_assignments = AAZBoolType( serialized_name="allowEmptyRoleAssignments", ) properties.allowed_resource_names = AAZListType( serialized_name="allowedResourceNames", ) properties.allowed_template_deployment_reference_actions = AAZListType( serialized_name="allowedTemplateDeploymentReferenceActions", ) properties.allowed_unauthorized_actions = AAZListType( serialized_name="allowedUnauthorizedActions", ) properties.api_profiles = AAZListType( serialized_name="apiProfiles", ) properties.async_operation_resource_type_name = AAZStrType( serialized_name="asyncOperationResourceTypeName", ) properties.async_timeout_rules = AAZListType( serialized_name="asyncTimeoutRules", ) properties.authorization_action_mappings = AAZListType( serialized_name="authorizationActionMappings", ) properties.availability_zone_rule = AAZObjectType( serialized_name="availabilityZoneRule", ) properties.capacity_rule = AAZObjectType( serialized_name="capacityRule", ) properties.category = AAZStrType() properties.check_name_availability_specifications = AAZObjectType( serialized_name="checkNameAvailabilitySpecifications", ) properties.common_api_versions = AAZListType( serialized_name="commonApiVersions", ) properties.cross_tenant_token_validation = AAZStrType( serialized_name="crossTenantTokenValidation", ) properties.default_api_version = AAZStrType( serialized_name="defaultApiVersion", ) properties.disallowed_action_verbs = AAZListType( serialized_name="disallowedActionVerbs", ) properties.disallowed_end_user_operations = AAZListType( serialized_name="disallowedEndUserOperations", ) properties.dsts_configuration = AAZObjectType( serialized_name="dstsConfiguration", ) properties.enable_async_operation = AAZBoolType( serialized_name="enableAsyncOperation", ) properties.enable_third_party_s2_s = AAZBoolType( serialized_name="enableThirdPartyS2S", ) properties.endpoints = AAZListType() properties.extended_locations = AAZListType( serialized_name="extendedLocations", ) properties.extension_options = AAZObjectType( serialized_name="extensionOptions", ) properties.features_rule = AAZObjectType( serialized_name="featuresRule", ) properties.frontdoor_request_mode = AAZStrType( serialized_name="frontdoorRequestMode", ) properties.grouping_tag = AAZStrType( serialized_name="groupingTag", ) properties.identity_management = AAZObjectType( serialized_name="identityManagement", ) properties.is_pure_proxy = AAZBoolType( serialized_name="isPureProxy", ) properties.legacy_name = AAZStrType( serialized_name="legacyName", ) properties.legacy_names = AAZListType( serialized_name="legacyNames", ) properties.legacy_policy = AAZObjectType( serialized_name="legacyPolicy", ) properties.linked_access_checks = AAZListType( serialized_name="linkedAccessChecks", ) properties.linked_notification_rules = AAZListType( serialized_name="linkedNotificationRules", ) properties.linked_operation_rules = AAZListType( serialized_name="linkedOperationRules", ) properties.logging_rules = AAZListType( serialized_name="loggingRules", ) properties.managed_resource_group_configuration = AAZObjectType( serialized_name="managedResourceGroupConfiguration", ) properties.management = AAZObjectType() properties.manifest_link = AAZStrType( serialized_name="manifestLink", ) properties.marketplace_options = AAZObjectType( serialized_name="marketplaceOptions", ) properties.marketplace_type = AAZStrType( serialized_name="marketplaceType", ) properties.metadata = AAZDictType() properties.notifications = AAZListType() properties.on_behalf_of_tokens = AAZObjectType( serialized_name="onBehalfOfTokens", ) properties.open_api_configuration = AAZObjectType( serialized_name="openApiConfiguration", ) properties.policy_execution_type = AAZStrType( serialized_name="policyExecutionType", ) properties.private_endpoint_configuration = AAZObjectType( serialized_name="privateEndpointConfiguration", ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) properties.quota_rule = AAZObjectType( serialized_name="quotaRule", ) properties.regionality = AAZStrType() properties.request_header_options = AAZObjectType( serialized_name="requestHeaderOptions", ) properties.required_features = AAZListType( serialized_name="requiredFeatures", ) properties.resource_cache = AAZObjectType( serialized_name="resourceCache", ) properties.resource_concurrency_control_options = AAZDictType( serialized_name="resourceConcurrencyControlOptions", ) properties.resource_deletion_policy = AAZStrType( serialized_name="resourceDeletionPolicy", ) properties.resource_graph_configuration = AAZObjectType( serialized_name="resourceGraphConfiguration", ) properties.resource_management_options = AAZObjectType( serialized_name="resourceManagementOptions", ) properties.resource_move_policy = AAZObjectType( serialized_name="resourceMovePolicy", ) properties.resource_provider_authorization_rules = AAZObjectType( serialized_name="resourceProviderAuthorizationRules", ) properties.resource_query_management = AAZObjectType( serialized_name="resourceQueryManagement", ) properties.resource_sub_type = AAZStrType( serialized_name="resourceSubType", ) properties.resource_type_common_attribute_management = AAZObjectType( serialized_name="resourceTypeCommonAttributeManagement", ) properties.resource_validation = AAZStrType( serialized_name="resourceValidation", ) properties.routing_rule = AAZObjectType( serialized_name="routingRule", ) properties.routing_type = AAZStrType( serialized_name="routingType", ) properties.service_tree_infos = AAZListType( serialized_name="serviceTreeInfos", ) properties.sku_link = AAZStrType( serialized_name="skuLink", ) properties.subscription_lifecycle_notification_specifications = AAZObjectType( serialized_name="subscriptionLifecycleNotificationSpecifications", ) properties.subscription_state_rules = AAZListType( serialized_name="subscriptionStateRules", ) properties.supports_tags = AAZBoolType( serialized_name="supportsTags", ) properties.swagger_specifications = AAZListType( serialized_name="swaggerSpecifications", ) properties.template_deployment_options = AAZObjectType( serialized_name="templateDeploymentOptions", ) properties.template_deployment_policy = AAZObjectType( serialized_name="templateDeploymentPolicy", ) properties.throttling_rules = AAZListType( serialized_name="throttlingRules", ) properties.token_auth_configuration = AAZObjectType( serialized_name="tokenAuthConfiguration", ) _CreateHelper._build_schema_token_auth_configuration_read( properties.token_auth_configuration) allowed_resource_names = cls._schema_on_200_201.properties.allowed_resource_names allowed_resource_names.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.allowed_resource_names.Element _element.get_action_verb = AAZStrType( serialized_name="getActionVerb", ) _element.name = AAZStrType() allowed_template_deployment_reference_actions = cls._schema_on_200_201.properties.allowed_template_deployment_reference_actions allowed_template_deployment_reference_actions.Element = AAZStrType() allowed_unauthorized_actions = cls._schema_on_200_201.properties.allowed_unauthorized_actions allowed_unauthorized_actions.Element = AAZStrType() api_profiles = cls._schema_on_200_201.properties.api_profiles api_profiles.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.api_profiles.Element _element.api_version = AAZStrType( serialized_name="apiVersion", ) _element.profile_version = AAZStrType( serialized_name="profileVersion", ) async_timeout_rules = cls._schema_on_200_201.properties.async_timeout_rules async_timeout_rules.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.async_timeout_rules.Element _element.action_name = AAZStrType( serialized_name="actionName", ) _element.timeout = AAZStrType() authorization_action_mappings = cls._schema_on_200_201.properties.authorization_action_mappings authorization_action_mappings.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.authorization_action_mappings.Element _element.desired = AAZStrType() _element.original = AAZStrType() availability_zone_rule = cls._schema_on_200_201.properties.availability_zone_rule availability_zone_rule.availability_zone_policy = AAZStrType( serialized_name="availabilityZonePolicy", ) capacity_rule = cls._schema_on_200_201.properties.capacity_rule capacity_rule.capacity_policy = AAZStrType( serialized_name="capacityPolicy", ) capacity_rule.sku_alias = AAZStrType( serialized_name="skuAlias", ) check_name_availability_specifications = cls._schema_on_200_201.properties.check_name_availability_specifications check_name_availability_specifications.enable_default_validation = AAZBoolType( serialized_name="enableDefaultValidation", ) check_name_availability_specifications.resource_types_with_custom_validation = AAZListType( serialized_name="resourceTypesWithCustomValidation", ) resource_types_with_custom_validation = cls._schema_on_200_201.properties.check_name_availability_specifications.resource_types_with_custom_validation resource_types_with_custom_validation.Element = AAZStrType() common_api_versions = cls._schema_on_200_201.properties.common_api_versions common_api_versions.Element = AAZStrType() disallowed_action_verbs = cls._schema_on_200_201.properties.disallowed_action_verbs disallowed_action_verbs.Element = AAZStrType() disallowed_end_user_operations = cls._schema_on_200_201.properties.disallowed_end_user_operations disallowed_end_user_operations.Element = AAZStrType() dsts_configuration = cls._schema_on_200_201.properties.dsts_configuration dsts_configuration.service_dns_name = AAZStrType( serialized_name="serviceDnsName", ) dsts_configuration.service_name = AAZStrType( serialized_name="serviceName", flags={"required": True}, ) endpoints = cls._schema_on_200_201.properties.endpoints endpoints.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.endpoints.Element _element.api_version = AAZStrType( serialized_name="apiVersion", ) _element.api_versions = AAZListType( serialized_name="apiVersions", ) _element.data_boundary = AAZStrType( serialized_name="dataBoundary", ) _element.dsts_configuration = AAZObjectType( serialized_name="dstsConfiguration", ) _element.enabled = AAZBoolType() _element.endpoint_type = AAZStrType( serialized_name="endpointType", ) _element.endpoint_uri = AAZStrType( serialized_name="endpointUri", ) _element.extensions = AAZListType() _element.features_rule = AAZObjectType( serialized_name="featuresRule", ) _element.kind = AAZStrType() _element.locations = AAZListType() _element.required_features = AAZListType( serialized_name="requiredFeatures", ) _element.sku_link = AAZStrType( serialized_name="skuLink", ) _element.timeout = AAZStrType() _element.token_auth_configuration = AAZObjectType( serialized_name="tokenAuthConfiguration", ) _CreateHelper._build_schema_token_auth_configuration_read( _element.token_auth_configuration) _element.zones = AAZListType() api_versions = cls._schema_on_200_201.properties.endpoints.Element.api_versions api_versions.Element = AAZStrType() dsts_configuration = cls._schema_on_200_201.properties.endpoints.Element.dsts_configuration dsts_configuration.service_dns_name = AAZStrType( serialized_name="serviceDnsName", ) dsts_configuration.service_name = AAZStrType( serialized_name="serviceName", flags={"required": True}, ) extensions = cls._schema_on_200_201.properties.endpoints.Element.extensions extensions.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.endpoints.Element.extensions.Element _element.endpoint_uri = AAZStrType( serialized_name="endpointUri", ) _element.extension_categories = AAZListType( serialized_name="extensionCategories", ) _element.timeout = AAZStrType() extension_categories = cls._schema_on_200_201.properties.endpoints.Element.extensions.Element.extension_categories extension_categories.Element = AAZStrType() features_rule = cls._schema_on_200_201.properties.endpoints.Element.features_rule features_rule.required_features_policy = AAZStrType( serialized_name="requiredFeaturesPolicy", flags={"required": True}, ) locations = cls._schema_on_200_201.properties.endpoints.Element.locations locations.Element = AAZStrType() required_features = cls._schema_on_200_201.properties.endpoints.Element.required_features required_features.Element = AAZStrType() zones = cls._schema_on_200_201.properties.endpoints.Element.zones zones.Element = AAZStrType() extended_locations = cls._schema_on_200_201.properties.extended_locations extended_locations.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.extended_locations.Element _element.supported_policy = AAZStrType( serialized_name="supportedPolicy", ) _element.type = AAZStrType() extension_options = cls._schema_on_200_201.properties.extension_options extension_options.resource_creation_begin = AAZObjectType( serialized_name="resourceCreationBegin", ) resource_creation_begin = cls._schema_on_200_201.properties.extension_options.resource_creation_begin resource_creation_begin.request = AAZListType() resource_creation_begin.response = AAZListType() request = cls._schema_on_200_201.properties.extension_options.resource_creation_begin.request request.Element = AAZStrType() response = cls._schema_on_200_201.properties.extension_options.resource_creation_begin.response response.Element = AAZStrType() features_rule = cls._schema_on_200_201.properties.features_rule features_rule.required_features_policy = AAZStrType( serialized_name="requiredFeaturesPolicy", flags={"required": True}, ) identity_management = cls._schema_on_200_201.properties.identity_management identity_management.application_id = AAZStrType( serialized_name="applicationId", ) identity_management.application_ids = AAZListType( serialized_name="applicationIds", ) identity_management.delegation_app_ids = AAZListType( serialized_name="delegationAppIds", ) identity_management.type = AAZStrType() application_ids = cls._schema_on_200_201.properties.identity_management.application_ids application_ids.Element = AAZStrType() delegation_app_ids = cls._schema_on_200_201.properties.identity_management.delegation_app_ids delegation_app_ids.Element = AAZStrType() legacy_names = cls._schema_on_200_201.properties.legacy_names legacy_names.Element = AAZStrType() legacy_policy = cls._schema_on_200_201.properties.legacy_policy legacy_policy.disallowed_conditions = AAZListType( serialized_name="disallowedConditions", ) legacy_policy.disallowed_legacy_operations = AAZListType( serialized_name="disallowedLegacyOperations", ) disallowed_conditions = cls._schema_on_200_201.properties.legacy_policy.disallowed_conditions disallowed_conditions.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.legacy_policy.disallowed_conditions.Element _element.disallowed_legacy_operations = AAZListType( serialized_name="disallowedLegacyOperations", ) _element.feature = AAZStrType() disallowed_legacy_operations = cls._schema_on_200_201.properties.legacy_policy.disallowed_conditions.Element.disallowed_legacy_operations disallowed_legacy_operations.Element = AAZStrType() disallowed_legacy_operations = cls._schema_on_200_201.properties.legacy_policy.disallowed_legacy_operations disallowed_legacy_operations.Element = AAZStrType() linked_access_checks = cls._schema_on_200_201.properties.linked_access_checks linked_access_checks.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.linked_access_checks.Element _element.action_name = AAZStrType( serialized_name="actionName", ) _element.linked_action = AAZStrType( serialized_name="linkedAction", ) _element.linked_action_verb = AAZStrType( serialized_name="linkedActionVerb", ) _element.linked_property = AAZStrType( serialized_name="linkedProperty", ) _element.linked_type = AAZStrType( serialized_name="linkedType", ) linked_notification_rules = cls._schema_on_200_201.properties.linked_notification_rules linked_notification_rules.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.linked_notification_rules.Element _element.actions = AAZListType() _element.actions_on_failed_operation = AAZListType( serialized_name="actionsOnFailedOperation", ) _element.fast_path_actions = AAZListType( serialized_name="fastPathActions", ) _element.fast_path_actions_on_failed_operation = AAZListType( serialized_name="fastPathActionsOnFailedOperation", ) _element.linked_notification_timeout = AAZStrType( serialized_name="linkedNotificationTimeout", ) actions = cls._schema_on_200_201.properties.linked_notification_rules.Element.actions actions.Element = AAZStrType() actions_on_failed_operation = cls._schema_on_200_201.properties.linked_notification_rules.Element.actions_on_failed_operation actions_on_failed_operation.Element = AAZStrType() fast_path_actions = cls._schema_on_200_201.properties.linked_notification_rules.Element.fast_path_actions fast_path_actions.Element = AAZStrType() fast_path_actions_on_failed_operation = cls._schema_on_200_201.properties.linked_notification_rules.Element.fast_path_actions_on_failed_operation fast_path_actions_on_failed_operation.Element = AAZStrType() linked_operation_rules = cls._schema_on_200_201.properties.linked_operation_rules linked_operation_rules.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.linked_operation_rules.Element _element.depends_on_types = AAZListType( serialized_name="dependsOnTypes", ) _element.linked_action = AAZStrType( serialized_name="linkedAction", flags={"required": True}, ) _element.linked_operation = AAZStrType( serialized_name="linkedOperation", flags={"required": True}, ) depends_on_types = cls._schema_on_200_201.properties.linked_operation_rules.Element.depends_on_types depends_on_types.Element = AAZStrType() logging_rules = cls._schema_on_200_201.properties.logging_rules logging_rules.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.logging_rules.Element _element.action = AAZStrType( flags={"required": True}, ) _element.detail_level = AAZStrType( serialized_name="detailLevel", flags={"required": True}, ) _element.direction = AAZStrType( flags={"required": True}, ) _element.hidden_property_paths = AAZObjectType( serialized_name="hiddenPropertyPaths", ) hidden_property_paths = cls._schema_on_200_201.properties.logging_rules.Element.hidden_property_paths hidden_property_paths.hidden_paths_on_request = AAZListType( serialized_name="hiddenPathsOnRequest", ) hidden_property_paths.hidden_paths_on_response = AAZListType( serialized_name="hiddenPathsOnResponse", ) hidden_paths_on_request = cls._schema_on_200_201.properties.logging_rules.Element.hidden_property_paths.hidden_paths_on_request hidden_paths_on_request.Element = AAZStrType() hidden_paths_on_response = cls._schema_on_200_201.properties.logging_rules.Element.hidden_property_paths.hidden_paths_on_response hidden_paths_on_response.Element = AAZStrType() managed_resource_group_configuration = cls._schema_on_200_201.properties.managed_resource_group_configuration managed_resource_group_configuration.application_ids = AAZListType( serialized_name="applicationIds", ) managed_resource_group_configuration.deny_assignment_configuration = AAZObjectType( serialized_name="denyAssignmentConfiguration", ) managed_resource_group_configuration.enabled = AAZBoolType() managed_resource_group_configuration.resource_group_location_override = AAZStrType( serialized_name="resourceGroupLocationOverride", ) application_ids = cls._schema_on_200_201.properties.managed_resource_group_configuration.application_ids application_ids.Element = AAZStrType() deny_assignment_configuration = cls._schema_on_200_201.properties.managed_resource_group_configuration.deny_assignment_configuration deny_assignment_configuration.enabled = AAZBoolType() deny_assignment_configuration.not_actions = AAZListType( serialized_name="notActions", ) not_actions = cls._schema_on_200_201.properties.managed_resource_group_configuration.deny_assignment_configuration.not_actions not_actions.Element = AAZStrType() management = cls._schema_on_200_201.properties.management management.authorization_owners = AAZListType( serialized_name="authorizationOwners", ) management.canary_manifest_owners = AAZListType( serialized_name="canaryManifestOwners", ) management.error_response_message_options = AAZObjectType( serialized_name="errorResponseMessageOptions", ) management.expedited_rollout_metadata = AAZObjectType( serialized_name="expeditedRolloutMetadata", ) management.expedited_rollout_submitters = AAZListType( serialized_name="expeditedRolloutSubmitters", ) management.incident_contact_email = AAZStrType( serialized_name="incidentContactEmail", ) management.incident_routing_service = AAZStrType( serialized_name="incidentRoutingService", ) management.incident_routing_team = AAZStrType( serialized_name="incidentRoutingTeam", ) management.manifest_owners = AAZListType( serialized_name="manifestOwners", ) management.pc_code = AAZStrType( serialized_name="pcCode", ) management.profit_center_program_id = AAZStrType( serialized_name="profitCenterProgramId", ) management.resource_access_policy = AAZStrType( serialized_name="resourceAccessPolicy", ) management.resource_access_roles = AAZListType( serialized_name="resourceAccessRoles", ) management.schema_owners = AAZListType( serialized_name="schemaOwners", ) management.service_tree_infos = AAZListType( serialized_name="serviceTreeInfos", ) authorization_owners = cls._schema_on_200_201.properties.management.authorization_owners authorization_owners.Element = AAZStrType() canary_manifest_owners = cls._schema_on_200_201.properties.management.canary_manifest_owners canary_manifest_owners.Element = AAZStrType() error_response_message_options = cls._schema_on_200_201.properties.management.error_response_message_options error_response_message_options.server_failure_response_message_type = AAZStrType( serialized_name="serverFailureResponseMessageType", ) expedited_rollout_metadata = cls._schema_on_200_201.properties.management.expedited_rollout_metadata expedited_rollout_metadata.enabled = AAZBoolType() expedited_rollout_metadata.expedited_rollout_intent = AAZStrType( serialized_name="expeditedRolloutIntent", ) expedited_rollout_submitters = cls._schema_on_200_201.properties.management.expedited_rollout_submitters expedited_rollout_submitters.Element = AAZStrType() manifest_owners = cls._schema_on_200_201.properties.management.manifest_owners manifest_owners.Element = AAZStrType() resource_access_roles = cls._schema_on_200_201.properties.management.resource_access_roles resource_access_roles.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.management.resource_access_roles.Element _element.actions = AAZListType() _element.allowed_group_claims = AAZListType( serialized_name="allowedGroupClaims", ) actions = cls._schema_on_200_201.properties.management.resource_access_roles.Element.actions actions.Element = AAZStrType() allowed_group_claims = cls._schema_on_200_201.properties.management.resource_access_roles.Element.allowed_group_claims allowed_group_claims.Element = AAZStrType() schema_owners = cls._schema_on_200_201.properties.management.schema_owners schema_owners.Element = AAZStrType() service_tree_infos = cls._schema_on_200_201.properties.management.service_tree_infos service_tree_infos.Element = AAZObjectType() _CreateHelper._build_schema_service_tree_info_read( service_tree_infos.Element) marketplace_options = cls._schema_on_200_201.properties.marketplace_options marketplace_options.add_on_plan_conversion_allowed = AAZBoolType( serialized_name="addOnPlanConversionAllowed", ) metadata = cls._schema_on_200_201.properties.metadata metadata.Element = AAZFreeFormDictType() notifications = cls._schema_on_200_201.properties.notifications notifications.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.notifications.Element _element.notification_type = AAZStrType( serialized_name="notificationType", ) _element.skip_notifications = AAZStrType( serialized_name="skipNotifications", ) on_behalf_of_tokens = cls._schema_on_200_201.properties.on_behalf_of_tokens on_behalf_of_tokens.action_name = AAZStrType( serialized_name="actionName", ) on_behalf_of_tokens.life_time = AAZStrType( serialized_name="lifeTime", ) open_api_configuration = cls._schema_on_200_201.properties.open_api_configuration open_api_configuration.validation = AAZObjectType() validation = cls._schema_on_200_201.properties.open_api_configuration.validation validation.allow_noncompliant_collection_response = AAZBoolType( serialized_name="allowNoncompliantCollectionResponse", ) private_endpoint_configuration = cls._schema_on_200_201.properties.private_endpoint_configuration private_endpoint_configuration.group_connectivity_information = AAZListType( serialized_name="groupConnectivityInformation", flags={"required": True}, ) private_endpoint_configuration.min_api_version = AAZStrType( serialized_name="minApiVersion", flags={"required": True}, ) group_connectivity_information = cls._schema_on_200_201.properties.private_endpoint_configuration.group_connectivity_information group_connectivity_information.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.private_endpoint_configuration.group_connectivity_information.Element _element.group_id = AAZStrType( serialized_name="groupId", flags={"required": True}, ) _element.redirect_map_id = AAZStrType( serialized_name="redirectMapId", ) _element.required_members = AAZListType( serialized_name="requiredMembers", flags={"required": True}, ) _element.required_zone_names = AAZListType( serialized_name="requiredZoneNames", flags={"required": True}, ) required_members = cls._schema_on_200_201.properties.private_endpoint_configuration.group_connectivity_information.Element.required_members required_members.Element = AAZStrType() required_zone_names = cls._schema_on_200_201.properties.private_endpoint_configuration.group_connectivity_information.Element.required_zone_names required_zone_names.Element = AAZStrType() quota_rule = cls._schema_on_200_201.properties.quota_rule quota_rule.location_rules = AAZListType( serialized_name="locationRules", ) quota_rule.quota_policy = AAZStrType( serialized_name="quotaPolicy", ) quota_rule.required_features = AAZListType( serialized_name="requiredFeatures", ) location_rules = cls._schema_on_200_201.properties.quota_rule.location_rules location_rules.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.quota_rule.location_rules.Element _element.location = AAZStrType() _element.policy = AAZStrType() _element.quota_id = AAZStrType( serialized_name="quotaId", ) required_features = cls._schema_on_200_201.properties.quota_rule.required_features required_features.Element = AAZStrType() request_header_options = cls._schema_on_200_201.properties.request_header_options request_header_options.opt_in_headers = AAZStrType( serialized_name="optInHeaders", ) request_header_options.opt_out_headers = AAZStrType( serialized_name="optOutHeaders", ) required_features = cls._schema_on_200_201.properties.required_features required_features.Element = AAZStrType() resource_cache = cls._schema_on_200_201.properties.resource_cache resource_cache.enable_resource_cache = AAZBoolType( serialized_name="enableResourceCache", ) resource_cache.resource_cache_expiration_timespan = AAZStrType( serialized_name="resourceCacheExpirationTimespan", ) resource_concurrency_control_options = cls._schema_on_200_201.properties.resource_concurrency_control_options resource_concurrency_control_options.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.resource_concurrency_control_options.Element _element.policy = AAZStrType() resource_graph_configuration = cls._schema_on_200_201.properties.resource_graph_configuration resource_graph_configuration.api_version = AAZStrType( serialized_name="apiVersion", ) resource_graph_configuration.enabled = AAZBoolType() resource_management_options = cls._schema_on_200_201.properties.resource_management_options resource_management_options.batch_provisioning_support = AAZObjectType( serialized_name="batchProvisioningSupport", ) resource_management_options.delete_dependencies = AAZListType( serialized_name="deleteDependencies", ) resource_management_options.nested_provisioning_support = AAZObjectType( serialized_name="nestedProvisioningSupport", ) batch_provisioning_support = cls._schema_on_200_201.properties.resource_management_options.batch_provisioning_support batch_provisioning_support.supported_operations = AAZStrType( serialized_name="supportedOperations", ) delete_dependencies = cls._schema_on_200_201.properties.resource_management_options.delete_dependencies delete_dependencies.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.resource_management_options.delete_dependencies.Element _element.linked_property = AAZStrType( serialized_name="linkedProperty", ) _element.linked_type = AAZStrType( serialized_name="linkedType", ) _element.required_features = AAZListType( serialized_name="requiredFeatures", ) required_features = cls._schema_on_200_201.properties.resource_management_options.delete_dependencies.Element.required_features required_features.Element = AAZStrType() nested_provisioning_support = cls._schema_on_200_201.properties.resource_management_options.nested_provisioning_support nested_provisioning_support.minimum_api_version = AAZStrType( serialized_name="minimumApiVersion", ) resource_move_policy = cls._schema_on_200_201.properties.resource_move_policy resource_move_policy.cross_resource_group_move_enabled = AAZBoolType( serialized_name="crossResourceGroupMoveEnabled", ) resource_move_policy.cross_subscription_move_enabled = AAZBoolType( serialized_name="crossSubscriptionMoveEnabled", ) resource_move_policy.validation_required = AAZBoolType( serialized_name="validationRequired", ) resource_provider_authorization_rules = cls._schema_on_200_201.properties.resource_provider_authorization_rules resource_provider_authorization_rules.async_operation_polling_rules = AAZObjectType( serialized_name="asyncOperationPollingRules", ) async_operation_polling_rules = cls._schema_on_200_201.properties.resource_provider_authorization_rules.async_operation_polling_rules async_operation_polling_rules.additional_options = AAZStrType( serialized_name="additionalOptions", ) async_operation_polling_rules.authorization_actions = AAZListType( serialized_name="authorizationActions", ) authorization_actions = cls._schema_on_200_201.properties.resource_provider_authorization_rules.async_operation_polling_rules.authorization_actions authorization_actions.Element = AAZStrType() resource_query_management = cls._schema_on_200_201.properties.resource_query_management resource_query_management.filter_option = AAZStrType( serialized_name="filterOption", ) resource_type_common_attribute_management = cls._schema_on_200_201.properties.resource_type_common_attribute_management resource_type_common_attribute_management.common_api_versions_merge_mode = AAZStrType( serialized_name="commonApiVersionsMergeMode", ) routing_rule = cls._schema_on_200_201.properties.routing_rule routing_rule.host_resource_type = AAZStrType( serialized_name="hostResourceType", ) service_tree_infos = cls._schema_on_200_201.properties.service_tree_infos service_tree_infos.Element = AAZObjectType() _CreateHelper._build_schema_service_tree_info_read( service_tree_infos.Element) subscription_lifecycle_notification_specifications = cls._schema_on_200_201.properties.subscription_lifecycle_notification_specifications subscription_lifecycle_notification_specifications.soft_delete_ttl = AAZStrType( serialized_name="softDeleteTTL", ) subscription_lifecycle_notification_specifications.subscription_state_override_actions = AAZListType( serialized_name="subscriptionStateOverrideActions", ) subscription_state_override_actions = cls._schema_on_200_201.properties.subscription_lifecycle_notification_specifications.subscription_state_override_actions subscription_state_override_actions.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.subscription_lifecycle_notification_specifications.subscription_state_override_actions.Element _element.action = AAZStrType( flags={"required": True}, ) _element.state = AAZStrType( flags={"required": True}, ) subscription_state_rules = cls._schema_on_200_201.properties.subscription_state_rules subscription_state_rules.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.subscription_state_rules.Element _element.allowed_actions = AAZListType( serialized_name="allowedActions", ) _element.state = AAZStrType() allowed_actions = cls._schema_on_200_201.properties.subscription_state_rules.Element.allowed_actions allowed_actions.Element = AAZStrType() swagger_specifications = cls._schema_on_200_201.properties.swagger_specifications swagger_specifications.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.swagger_specifications.Element _element.api_versions = AAZListType( serialized_name="apiVersions", ) _element.swagger_spec_folder_uri = AAZStrType( serialized_name="swaggerSpecFolderUri", ) api_versions = cls._schema_on_200_201.properties.swagger_specifications.Element.api_versions api_versions.Element = AAZStrType() template_deployment_options = cls._schema_on_200_201.properties.template_deployment_options template_deployment_options.preflight_options = AAZListType( serialized_name="preflightOptions", ) template_deployment_options.preflight_supported = AAZBoolType( serialized_name="preflightSupported", ) preflight_options = cls._schema_on_200_201.properties.template_deployment_options.preflight_options preflight_options.Element = AAZStrType() template_deployment_policy = cls._schema_on_200_201.properties.template_deployment_policy template_deployment_policy.capabilities = AAZStrType( flags={"required": True}, ) template_deployment_policy.preflight_notifications = AAZStrType( serialized_name="preflightNotifications", ) template_deployment_policy.preflight_options = AAZStrType( serialized_name="preflightOptions", flags={"required": True}, ) throttling_rules = cls._schema_on_200_201.properties.throttling_rules throttling_rules.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.throttling_rules.Element _element.action = AAZStrType( flags={"required": True}, ) _element.application_id = AAZListType( serialized_name="applicationId", ) _element.metrics = AAZListType( flags={"required": True}, ) _element.required_features = AAZListType( serialized_name="requiredFeatures", ) application_id = cls._schema_on_200_201.properties.throttling_rules.Element.application_id application_id.Element = AAZStrType() metrics = cls._schema_on_200_201.properties.throttling_rules.Element.metrics metrics.Element = AAZObjectType() _element = cls._schema_on_200_201.properties.throttling_rules.Element.metrics.Element _element.interval = AAZStrType() _element.limit = AAZIntType( flags={"required": True}, ) _element.type = AAZStrType( flags={"required": True}, ) required_features = cls._schema_on_200_201.properties.throttling_rules.Element.required_features required_features.Element = AAZStrType() system_data = cls._schema_on_200_201.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", ) system_data.created_by = AAZStrType( serialized_name="createdBy", ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", ) return cls._schema_on_200_201
class ResourceTypeRegistrationsCreateOrUpdate(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass @property def content(self): pass def on_200_201(self, session): pass @classmethod def _build_schema_on_200_201(cls): pass
19
0
183
27
155
0
15
0
1
1
1
0
9
1
10
10
1,849
284
1,565
231
1,546
0
1,070
222
1,059
135
1
1
147
10,292
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/providerhub/azext_providerhub/aaz/latest/providerhub/provider_registration/resource_action/_delete_resource.py
azext_providerhub.aaz.latest.providerhub.provider_registration.resource_action._delete_resource.DeleteResource.ResourceActionsDeleteResources
class ResourceActionsDeleteResources(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [202]: return self.client.build_lro_polling( self.ctx.args.no_wait, session, self.on_200_201, self.on_error, lro_options={"final-state-via": "azure-async-operation"}, path_format_arguments=self.url_parameters, ) if session.http_response.status_code in [200, 201]: return self.client.build_lro_polling( self.ctx.args.no_wait, session, self.on_200_201, self.on_error, lro_options={"final-state-via": "azure-async-operation"}, path_format_arguments=self.url_parameters, ) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourceActions/{resourceActionName}/deleteResources", **self.url_parameters ) @property def method(self): return "POST" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "providerNamespace", self.ctx.args.provider_namespace, required=True, ), **self.serialize_url_param( "resourceActionName", self.ctx.args.resource_action_name, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-04-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Content-Type", "application/json", ), } return parameters @property def content(self): _content_value, _builder = self.new_content_builder( self.ctx.args, typ=AAZObjectType, typ_kwargs={ "flags": {"required": True, "client_flatten": True}} ) _builder.set_prop("resources", AAZListType, ".resources") resources = _builder.get(".resources") if resources is not None: resources.set_elements(AAZObjectType, ".") _elements = _builder.get(".resources[]") if _elements is not None: _elements.set_prop( "homeTenantId", AAZStrType, ".home_tenant_id") _elements.set_prop("location", AAZStrType, ".location") _elements.set_prop("resourceId", AAZStrType, ".resource_id", typ_kwargs={ "flags": {"required": True}}) return self.serialize_content(_content_value) def on_200_201(self, session): pass
class ResourceActionsDeleteResources(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass @property def content(self): pass def on_200_201(self, session): pass
17
0
9
0
9
0
1
0
1
0
0
0
9
1
9
9
102
13
89
27
72
0
39
19
29
3
1
1
13
10,293
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/providerhub/azext_providerhub/aaz/latest/providerhub/provider_registration/_wait.py
azext_providerhub.aaz.latest.providerhub.provider_registration._wait.Wait.ProviderRegistrationsGet
class ProviderRegistrationsGet(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "providerNamespace", self.ctx.args.provider_namespace, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-04-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.id = AAZStrType( flags={"read_only": True}, ) _schema_on_200.kind = AAZStrType() _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) _schema_on_200.properties = AAZObjectType() _schema_on_200.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _schema_on_200.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200.properties properties.capabilities = AAZListType() properties.cross_tenant_token_validation = AAZStrType( serialized_name="crossTenantTokenValidation", ) properties.custom_manifest_version = AAZStrType( serialized_name="customManifestVersion", ) properties.dsts_configuration = AAZObjectType( serialized_name="dstsConfiguration", ) properties.enable_tenant_linked_notification = AAZBoolType( serialized_name="enableTenantLinkedNotification", nullable=True, ) properties.features_rule = AAZObjectType( serialized_name="featuresRule", ) properties.global_notification_endpoints = AAZListType( serialized_name="globalNotificationEndpoints", ) properties.legacy_namespace = AAZStrType( serialized_name="legacyNamespace", ) properties.legacy_registrations = AAZListType( serialized_name="legacyRegistrations", ) properties.linked_notification_rules = AAZListType( serialized_name="linkedNotificationRules", ) properties.management = AAZObjectType() properties.management_group_global_notification_endpoints = AAZListType( serialized_name="managementGroupGlobalNotificationEndpoints", ) properties.metadata = AAZFreeFormDictType() properties.namespace = AAZStrType() properties.notification_options = AAZStrType( serialized_name="notificationOptions", ) properties.notification_settings = AAZObjectType( serialized_name="notificationSettings", ) properties.notifications = AAZListType() properties.optional_features = AAZListType( serialized_name="optionalFeatures", ) properties.private_resource_provider_configuration = AAZObjectType( serialized_name="privateResourceProviderConfiguration", ) properties.provider_authentication = AAZObjectType( serialized_name="providerAuthentication", ) properties.provider_authorizations = AAZListType( serialized_name="providerAuthorizations", ) properties.provider_hub_metadata = AAZObjectType( serialized_name="providerHubMetadata", ) properties.provider_type = AAZStrType( serialized_name="providerType", ) properties.provider_version = AAZStrType( serialized_name="providerVersion", ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) properties.request_header_options = AAZObjectType( serialized_name="requestHeaderOptions", ) properties.required_features = AAZListType( serialized_name="requiredFeatures", ) properties.resource_group_lock_option_during_move = AAZObjectType( serialized_name="resourceGroupLockOptionDuringMove", ) properties.resource_hydration_accounts = AAZListType( serialized_name="resourceHydrationAccounts", ) properties.resource_provider_authorization_rules = AAZObjectType( serialized_name="resourceProviderAuthorizationRules", ) properties.response_options = AAZObjectType( serialized_name="responseOptions", ) properties.service_name = AAZStrType( serialized_name="serviceName", ) properties.services = AAZListType() properties.subscription_lifecycle_notification_specifications = AAZObjectType( serialized_name="subscriptionLifecycleNotificationSpecifications", ) properties.template_deployment_options = AAZObjectType( serialized_name="templateDeploymentOptions", ) properties.token_auth_configuration = AAZObjectType( serialized_name="tokenAuthConfiguration", ) _WaitHelper._build_schema_token_auth_configuration_read( properties.token_auth_configuration) capabilities = cls._schema_on_200.properties.capabilities capabilities.Element = AAZObjectType() _element = cls._schema_on_200.properties.capabilities.Element _element.effect = AAZStrType( flags={"required": True}, ) _element.quota_id = AAZStrType( serialized_name="quotaId", flags={"required": True}, ) _element.required_features = AAZListType( serialized_name="requiredFeatures", ) required_features = cls._schema_on_200.properties.capabilities.Element.required_features required_features.Element = AAZStrType() dsts_configuration = cls._schema_on_200.properties.dsts_configuration dsts_configuration.service_dns_name = AAZStrType( serialized_name="serviceDnsName", ) dsts_configuration.service_name = AAZStrType( serialized_name="serviceName", flags={"required": True}, ) features_rule = cls._schema_on_200.properties.features_rule features_rule.required_features_policy = AAZStrType( serialized_name="requiredFeaturesPolicy", flags={"required": True}, ) global_notification_endpoints = cls._schema_on_200.properties.global_notification_endpoints global_notification_endpoints.Element = AAZObjectType() _WaitHelper._build_schema_resource_provider_endpoint_read( global_notification_endpoints.Element) legacy_registrations = cls._schema_on_200.properties.legacy_registrations legacy_registrations.Element = AAZStrType() linked_notification_rules = cls._schema_on_200.properties.linked_notification_rules linked_notification_rules.Element = AAZObjectType() _element = cls._schema_on_200.properties.linked_notification_rules.Element _element.actions = AAZListType() _element.dsts_configuration = AAZObjectType( serialized_name="dstsConfiguration", ) _element.endpoints = AAZListType() _element.token_auth_configuration = AAZObjectType( serialized_name="tokenAuthConfiguration", ) _WaitHelper._build_schema_token_auth_configuration_read( _element.token_auth_configuration) actions = cls._schema_on_200.properties.linked_notification_rules.Element.actions actions.Element = AAZStrType() dsts_configuration = cls._schema_on_200.properties.linked_notification_rules.Element.dsts_configuration dsts_configuration.service_dns_name = AAZStrType( serialized_name="serviceDnsName", ) dsts_configuration.service_name = AAZStrType( serialized_name="serviceName", flags={"required": True}, ) endpoints = cls._schema_on_200.properties.linked_notification_rules.Element.endpoints endpoints.Element = AAZObjectType() _WaitHelper._build_schema_resource_provider_endpoint_read( endpoints.Element) management = cls._schema_on_200.properties.management management.authorization_owners = AAZListType( serialized_name="authorizationOwners", ) management.canary_manifest_owners = AAZListType( serialized_name="canaryManifestOwners", ) management.error_response_message_options = AAZObjectType( serialized_name="errorResponseMessageOptions", ) management.expedited_rollout_metadata = AAZObjectType( serialized_name="expeditedRolloutMetadata", ) management.expedited_rollout_submitters = AAZListType( serialized_name="expeditedRolloutSubmitters", ) management.incident_contact_email = AAZStrType( serialized_name="incidentContactEmail", ) management.incident_routing_service = AAZStrType( serialized_name="incidentRoutingService", ) management.incident_routing_team = AAZStrType( serialized_name="incidentRoutingTeam", ) management.manifest_owners = AAZListType( serialized_name="manifestOwners", ) management.pc_code = AAZStrType( serialized_name="pcCode", ) management.profit_center_program_id = AAZStrType( serialized_name="profitCenterProgramId", ) management.resource_access_policy = AAZStrType( serialized_name="resourceAccessPolicy", ) management.resource_access_roles = AAZListType( serialized_name="resourceAccessRoles", ) management.schema_owners = AAZListType( serialized_name="schemaOwners", ) management.service_tree_infos = AAZListType( serialized_name="serviceTreeInfos", ) authorization_owners = cls._schema_on_200.properties.management.authorization_owners authorization_owners.Element = AAZStrType() canary_manifest_owners = cls._schema_on_200.properties.management.canary_manifest_owners canary_manifest_owners.Element = AAZStrType() error_response_message_options = cls._schema_on_200.properties.management.error_response_message_options error_response_message_options.server_failure_response_message_type = AAZStrType( serialized_name="serverFailureResponseMessageType", ) expedited_rollout_metadata = cls._schema_on_200.properties.management.expedited_rollout_metadata expedited_rollout_metadata.enabled = AAZBoolType() expedited_rollout_metadata.expedited_rollout_intent = AAZStrType( serialized_name="expeditedRolloutIntent", ) expedited_rollout_submitters = cls._schema_on_200.properties.management.expedited_rollout_submitters expedited_rollout_submitters.Element = AAZStrType() manifest_owners = cls._schema_on_200.properties.management.manifest_owners manifest_owners.Element = AAZStrType() resource_access_roles = cls._schema_on_200.properties.management.resource_access_roles resource_access_roles.Element = AAZObjectType() _element = cls._schema_on_200.properties.management.resource_access_roles.Element _element.actions = AAZListType() _element.allowed_group_claims = AAZListType( serialized_name="allowedGroupClaims", ) actions = cls._schema_on_200.properties.management.resource_access_roles.Element.actions actions.Element = AAZStrType() allowed_group_claims = cls._schema_on_200.properties.management.resource_access_roles.Element.allowed_group_claims allowed_group_claims.Element = AAZStrType() schema_owners = cls._schema_on_200.properties.management.schema_owners schema_owners.Element = AAZStrType() service_tree_infos = cls._schema_on_200.properties.management.service_tree_infos service_tree_infos.Element = AAZObjectType() _element = cls._schema_on_200.properties.management.service_tree_infos.Element _element.component_id = AAZStrType( serialized_name="componentId", ) _element.readiness = AAZStrType() _element.service_id = AAZStrType( serialized_name="serviceId", ) management_group_global_notification_endpoints = cls._schema_on_200.properties.management_group_global_notification_endpoints management_group_global_notification_endpoints.Element = AAZObjectType() _WaitHelper._build_schema_resource_provider_endpoint_read( management_group_global_notification_endpoints.Element) notification_settings = cls._schema_on_200.properties.notification_settings notification_settings.subscriber_settings = AAZListType( serialized_name="subscriberSettings", ) subscriber_settings = cls._schema_on_200.properties.notification_settings.subscriber_settings subscriber_settings.Element = AAZObjectType() _element = cls._schema_on_200.properties.notification_settings.subscriber_settings.Element _element.filter_rules = AAZListType( serialized_name="filterRules", ) filter_rules = cls._schema_on_200.properties.notification_settings.subscriber_settings.Element.filter_rules filter_rules.Element = AAZObjectType() _element = cls._schema_on_200.properties.notification_settings.subscriber_settings.Element.filter_rules.Element _element.endpoint_information = AAZListType( serialized_name="endpointInformation", ) _element.filter_query = AAZStrType( serialized_name="filterQuery", ) endpoint_information = cls._schema_on_200.properties.notification_settings.subscriber_settings.Element.filter_rules.Element.endpoint_information endpoint_information.Element = AAZObjectType() _element = cls._schema_on_200.properties.notification_settings.subscriber_settings.Element.filter_rules.Element.endpoint_information.Element _element.endpoint = AAZStrType() _element.endpoint_type = AAZStrType( serialized_name="endpointType", ) _element.schema_version = AAZStrType( serialized_name="schemaVersion", ) notifications = cls._schema_on_200.properties.notifications notifications.Element = AAZObjectType() _element = cls._schema_on_200.properties.notifications.Element _element.notification_type = AAZStrType( serialized_name="notificationType", ) _element.skip_notifications = AAZStrType( serialized_name="skipNotifications", ) optional_features = cls._schema_on_200.properties.optional_features optional_features.Element = AAZStrType() private_resource_provider_configuration = cls._schema_on_200.properties.private_resource_provider_configuration private_resource_provider_configuration.allowed_subscriptions = AAZListType( serialized_name="allowedSubscriptions", ) allowed_subscriptions = cls._schema_on_200.properties.private_resource_provider_configuration.allowed_subscriptions allowed_subscriptions.Element = AAZStrType() provider_authentication = cls._schema_on_200.properties.provider_authentication provider_authentication.allowed_audiences = AAZListType( serialized_name="allowedAudiences", flags={"required": True}, ) allowed_audiences = cls._schema_on_200.properties.provider_authentication.allowed_audiences allowed_audiences.Element = AAZStrType() provider_authorizations = cls._schema_on_200.properties.provider_authorizations provider_authorizations.Element = AAZObjectType() _WaitHelper._build_schema_resource_provider_authorization_read( provider_authorizations.Element) provider_hub_metadata = cls._schema_on_200.properties.provider_hub_metadata provider_hub_metadata.direct_rp_role_definition_id = AAZStrType( serialized_name="directRpRoleDefinitionId", ) provider_hub_metadata.global_async_operation_resource_type_name = AAZStrType( serialized_name="globalAsyncOperationResourceTypeName", ) provider_hub_metadata.provider_authentication = AAZObjectType( serialized_name="providerAuthentication", ) provider_hub_metadata.provider_authorizations = AAZListType( serialized_name="providerAuthorizations", ) provider_hub_metadata.regional_async_operation_resource_type_name = AAZStrType( serialized_name="regionalAsyncOperationResourceTypeName", ) provider_hub_metadata.third_party_provider_authorization = AAZObjectType( serialized_name="thirdPartyProviderAuthorization", ) provider_authentication = cls._schema_on_200.properties.provider_hub_metadata.provider_authentication provider_authentication.allowed_audiences = AAZListType( serialized_name="allowedAudiences", flags={"required": True}, ) allowed_audiences = cls._schema_on_200.properties.provider_hub_metadata.provider_authentication.allowed_audiences allowed_audiences.Element = AAZStrType() provider_authorizations = cls._schema_on_200.properties.provider_hub_metadata.provider_authorizations provider_authorizations.Element = AAZObjectType() _WaitHelper._build_schema_resource_provider_authorization_read( provider_authorizations.Element) third_party_provider_authorization = cls._schema_on_200.properties.provider_hub_metadata.third_party_provider_authorization third_party_provider_authorization.authorizations = AAZListType() third_party_provider_authorization.managed_by_tenant_id = AAZStrType( serialized_name="managedByTenantId", ) authorizations = cls._schema_on_200.properties.provider_hub_metadata.third_party_provider_authorization.authorizations authorizations.Element = AAZObjectType() _element = cls._schema_on_200.properties.provider_hub_metadata.third_party_provider_authorization.authorizations.Element _element.principal_id = AAZStrType( serialized_name="principalId", flags={"required": True}, ) _element.role_definition_id = AAZStrType( serialized_name="roleDefinitionId", flags={"required": True}, ) request_header_options = cls._schema_on_200.properties.request_header_options request_header_options.opt_in_headers = AAZStrType( serialized_name="optInHeaders", ) request_header_options.opt_out_headers = AAZStrType( serialized_name="optOutHeaders", ) required_features = cls._schema_on_200.properties.required_features required_features.Element = AAZStrType() resource_group_lock_option_during_move = cls._schema_on_200.properties.resource_group_lock_option_during_move resource_group_lock_option_during_move.block_action_verb = AAZStrType( serialized_name="blockActionVerb", ) resource_hydration_accounts = cls._schema_on_200.properties.resource_hydration_accounts resource_hydration_accounts.Element = AAZObjectType() _element = cls._schema_on_200.properties.resource_hydration_accounts.Element _element.account_name = AAZStrType( serialized_name="accountName", ) _element.encrypted_key = AAZStrType( serialized_name="encryptedKey", ) _element.max_child_resource_consistency_job_limit = AAZIntType( serialized_name="maxChildResourceConsistencyJobLimit", ) _element.subscription_id = AAZStrType( serialized_name="subscriptionId", ) resource_provider_authorization_rules = cls._schema_on_200.properties.resource_provider_authorization_rules resource_provider_authorization_rules.async_operation_polling_rules = AAZObjectType( serialized_name="asyncOperationPollingRules", ) async_operation_polling_rules = cls._schema_on_200.properties.resource_provider_authorization_rules.async_operation_polling_rules async_operation_polling_rules.additional_options = AAZStrType( serialized_name="additionalOptions", ) async_operation_polling_rules.authorization_actions = AAZListType( serialized_name="authorizationActions", ) authorization_actions = cls._schema_on_200.properties.resource_provider_authorization_rules.async_operation_polling_rules.authorization_actions authorization_actions.Element = AAZStrType() response_options = cls._schema_on_200.properties.response_options response_options.service_client_options_type = AAZStrType( serialized_name="serviceClientOptionsType", ) services = cls._schema_on_200.properties.services services.Element = AAZObjectType() _element = cls._schema_on_200.properties.services.Element _element.service_name = AAZStrType( serialized_name="serviceName", ) _element.status = AAZStrType() subscription_lifecycle_notification_specifications = cls._schema_on_200.properties.subscription_lifecycle_notification_specifications subscription_lifecycle_notification_specifications.soft_delete_ttl = AAZStrType( serialized_name="softDeleteTTL", ) subscription_lifecycle_notification_specifications.subscription_state_override_actions = AAZListType( serialized_name="subscriptionStateOverrideActions", ) subscription_state_override_actions = cls._schema_on_200.properties.subscription_lifecycle_notification_specifications.subscription_state_override_actions subscription_state_override_actions.Element = AAZObjectType() _element = cls._schema_on_200.properties.subscription_lifecycle_notification_specifications.subscription_state_override_actions.Element _element.action = AAZStrType( flags={"required": True}, ) _element.state = AAZStrType( flags={"required": True}, ) template_deployment_options = cls._schema_on_200.properties.template_deployment_options template_deployment_options.preflight_options = AAZListType( serialized_name="preflightOptions", ) template_deployment_options.preflight_supported = AAZBoolType( serialized_name="preflightSupported", ) preflight_options = cls._schema_on_200.properties.template_deployment_options.preflight_options preflight_options.Element = AAZStrType() system_data = cls._schema_on_200.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", ) system_data.created_by = AAZStrType( serialized_name="createdBy", ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", ) return cls._schema_on_200
class ProviderRegistrationsGet(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
65
8
57
0
1
0
1
1
1
0
8
0
9
9
605
81
524
76
507
0
265
69
255
2
1
1
11
10,294
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/providerhub/azext_providerhub/aaz/latest/providerhub/provider_registration/_update.py
azext_providerhub.aaz.latest.providerhub.provider_registration._update.Update.ProviderRegistrationsGet
class ProviderRegistrationsGet(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "providerNamespace", self.ctx.args.provider_namespace, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-04-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _UpdateHelper._build_schema_provider_registration_read( cls._schema_on_200) return cls._schema_on_200
class ProviderRegistrationsGet(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
6
0
6
0
1
0
1
1
1
0
8
0
9
9
78
13
65
25
48
0
33
18
23
2
1
1
11
10,295
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/providerhub/azext_providerhub/aaz/latest/providerhub/provider_registration/_update.py
azext_providerhub.aaz.latest.providerhub.provider_registration._update.Update.ProviderRegistrationsCreateOrUpdate
class ProviderRegistrationsCreateOrUpdate(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [202]: return self.client.build_lro_polling( self.ctx.args.no_wait, session, self.on_200_201, self.on_error, lro_options={"final-state-via": "azure-async-operation"}, path_format_arguments=self.url_parameters, ) if session.http_response.status_code in [200, 201]: return self.client.build_lro_polling( self.ctx.args.no_wait, session, self.on_200_201, self.on_error, lro_options={"final-state-via": "azure-async-operation"}, path_format_arguments=self.url_parameters, ) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}", **self.url_parameters ) @property def method(self): return "PUT" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "providerNamespace", self.ctx.args.provider_namespace, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-04-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Content-Type", "application/json", ), **self.serialize_header_param( "Accept", "application/json", ), } return parameters @property def content(self): _content_value, _builder = self.new_content_builder( self.ctx.args, value=self.ctx.vars.instance, ) return self.serialize_content(_content_value) def on_200_201(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200_201 ) _schema_on_200_201 = None @classmethod def _build_schema_on_200_201(cls): if cls._schema_on_200_201 is not None: return cls._schema_on_200_201 cls._schema_on_200_201 = AAZObjectType() _UpdateHelper._build_schema_provider_registration_read( cls._schema_on_200_201) return cls._schema_on_200_201
class ProviderRegistrationsCreateOrUpdate(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass @property def content(self): pass def on_200_201(self, session): pass @classmethod def _build_schema_on_200_201(cls): pass
19
0
8
0
8
0
1
0
1
1
1
0
9
1
10
10
106
15
91
29
72
0
38
20
27
3
1
1
13
10,296
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/providerhub/azext_providerhub/aaz/latest/providerhub/provider_registration/_update.py
azext_providerhub.aaz.latest.providerhub.provider_registration._update.Update.InstanceUpdateByJson
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): def __call__(self, *args, **kwargs): self._update_instance(self.ctx.vars.instance) def _update_instance(self, instance): _instance_value, _builder = self.new_content_builder( self.ctx.args, value=instance, typ=AAZObjectType ) _builder.set_prop("kind", AAZStrType, ".kind") _builder.set_prop("properties", AAZObjectType) properties = _builder.get(".properties") if properties is not None: properties.set_prop( "capabilities", AAZListType, ".capabilities") properties.set_prop( "crossTenantTokenValidation", AAZStrType, ".cross_tenant_token_validation") properties.set_prop("customManifestVersion", AAZStrType, ".custom_manifest_version") properties.set_prop("dstsConfiguration", AAZObjectType, ".dsts_configuration") properties.set_prop("enableTenantLinkedNotification", AAZBoolType, ".enable_tenant_linked_notification", typ_kwargs={"nullable": True}) properties.set_prop("featuresRule", AAZObjectType) properties.set_prop( "globalNotificationEndpoints", AAZListType, ".global_notification_endpoints") properties.set_prop("legacyNamespace", AAZStrType, ".legacy_namespace") properties.set_prop("legacyRegistrations", AAZListType, ".legacy_registrations") properties.set_prop("linkedNotificationRules", AAZListType, ".linked_notification_rules") properties.set_prop("management", AAZObjectType) properties.set_prop("managementGroupGlobalNotificationEndpoints", AAZListType, ".management_group_global_notification_endpoints") properties.set_prop( "metadata", AAZFreeFormDictType, ".metadata") properties.set_prop("namespace", AAZStrType, ".namespace") properties.set_prop("notificationOptions", AAZStrType, ".notification_options") properties.set_prop("notificationSettings", AAZObjectType, ".notification_settings") properties.set_prop( "notifications", AAZListType, ".notifications") properties.set_prop("optionalFeatures", AAZListType, ".optional_features") properties.set_prop("privateResourceProviderConfiguration", AAZObjectType, ".private_resource_provider_configuration") properties.set_prop("providerAuthentication", AAZObjectType, ".provider_authentication") properties.set_prop("providerAuthorizations", AAZListType, ".provider_authorizations") properties.set_prop("providerHubMetadata", AAZObjectType, ".provider_hub_metadata") properties.set_prop( "providerType", AAZStrType, ".provider_type") properties.set_prop("providerVersion", AAZStrType, ".provider_version") properties.set_prop("requestHeaderOptions", AAZObjectType) properties.set_prop("requiredFeatures", AAZListType, ".required_features") properties.set_prop("resourceGroupLockOptionDuringMove", AAZObjectType, ".resource_group_lock_option_during_move") properties.set_prop("resourceHydrationAccounts", AAZListType, ".resource_hydration_accounts") properties.set_prop("resourceProviderAuthorizationRules", AAZObjectType, ".resource_provider_authorization_rules") properties.set_prop("responseOptions", AAZObjectType, ".response_options") properties.set_prop("serviceName", AAZStrType, ".service_name") properties.set_prop("services", AAZListType, ".services") properties.set_prop( "subscriptionLifecycleNotificationSpecifications", AAZObjectType) properties.set_prop("templateDeploymentOptions", AAZObjectType, ".template_deployment_options") _UpdateHelper._build_schema_token_auth_configuration_update(properties.set_prop( "tokenAuthConfiguration", AAZObjectType, ".token_auth_configuration")) capabilities = _builder.get(".properties.capabilities") if capabilities is not None: capabilities.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.capabilities[]") if _elements is not None: _elements.set_prop("effect", AAZStrType, ".effect", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("quotaId", AAZStrType, ".quota_id", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("requiredFeatures", AAZListType, ".required_features") required_features = _builder.get( ".properties.capabilities[].requiredFeatures") if required_features is not None: required_features.set_elements(AAZStrType, ".") dsts_configuration = _builder.get(".properties.dstsConfiguration") if dsts_configuration is not None: dsts_configuration.set_prop( "serviceDnsName", AAZStrType, ".service_dns_name") dsts_configuration.set_prop("serviceName", AAZStrType, ".service_name", typ_kwargs={ "flags": {"required": True}}) features_rule = _builder.get(".properties.featuresRule") if features_rule is not None: features_rule.set_prop("requiredFeaturesPolicy", AAZStrType, ".required_features_policy", typ_kwargs={ "flags": {"required": True}}) global_notification_endpoints = _builder.get( ".properties.globalNotificationEndpoints") if global_notification_endpoints is not None: _UpdateHelper._build_schema_resource_provider_endpoint_update( global_notification_endpoints.set_elements(AAZObjectType, ".")) legacy_registrations = _builder.get( ".properties.legacyRegistrations") if legacy_registrations is not None: legacy_registrations.set_elements(AAZStrType, ".") linked_notification_rules = _builder.get( ".properties.linkedNotificationRules") if linked_notification_rules is not None: linked_notification_rules.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.linkedNotificationRules[]") if _elements is not None: _elements.set_prop("actions", AAZListType, ".actions") _elements.set_prop("dstsConfiguration", AAZObjectType, ".dsts_configuration") _elements.set_prop("endpoints", AAZListType, ".endpoints") _UpdateHelper._build_schema_token_auth_configuration_update(_elements.set_prop( "tokenAuthConfiguration", AAZObjectType, ".token_auth_configuration")) actions = _builder.get( ".properties.linkedNotificationRules[].actions") if actions is not None: actions.set_elements(AAZStrType, ".") dsts_configuration = _builder.get( ".properties.linkedNotificationRules[].dstsConfiguration") if dsts_configuration is not None: dsts_configuration.set_prop( "serviceDnsName", AAZStrType, ".service_dns_name") dsts_configuration.set_prop("serviceName", AAZStrType, ".service_name", typ_kwargs={ "flags": {"required": True}}) endpoints = _builder.get( ".properties.linkedNotificationRules[].endpoints") if endpoints is not None: _UpdateHelper._build_schema_resource_provider_endpoint_update( endpoints.set_elements(AAZObjectType, ".")) management = _builder.get(".properties.management") if management is not None: management.set_prop("authorizationOwners", AAZListType, ".authorization_owners") management.set_prop("canaryManifestOwners", AAZListType, ".canary_manifest_owners") management.set_prop("errorResponseMessageOptions", AAZObjectType, ".error_response_message_options") management.set_prop("expeditedRolloutMetadata", AAZObjectType, ".expedited_rollout_metadata") management.set_prop( "expeditedRolloutSubmitters", AAZListType, ".expedited_rollout_submitters") management.set_prop("incidentContactEmail", AAZStrType, ".incident_contact_email") management.set_prop("incidentRoutingService", AAZStrType, ".incident_routing_service") management.set_prop("incidentRoutingTeam", AAZStrType, ".incident_routing_team") management.set_prop( "manifestOwners", AAZListType, ".manifest_owners") management.set_prop("pcCode", AAZStrType, ".pc_code") management.set_prop("profitCenterProgramId", AAZStrType, ".profit_center_program_id") management.set_prop("resourceAccessPolicy", AAZStrType, ".resource_access_policy") management.set_prop("resourceAccessRoles", AAZListType, ".resource_access_roles") management.set_prop( "schemaOwners", AAZListType, ".schema_owners") management.set_prop("serviceTreeInfos", AAZListType, ".service_tree_infos") authorization_owners = _builder.get( ".properties.management.authorizationOwners") if authorization_owners is not None: authorization_owners.set_elements(AAZStrType, ".") canary_manifest_owners = _builder.get( ".properties.management.canaryManifestOwners") if canary_manifest_owners is not None: canary_manifest_owners.set_elements(AAZStrType, ".") error_response_message_options = _builder.get( ".properties.management.errorResponseMessageOptions") if error_response_message_options is not None: error_response_message_options.set_prop( "serverFailureResponseMessageType", AAZStrType, ".server_failure_response_message_type") expedited_rollout_metadata = _builder.get( ".properties.management.expeditedRolloutMetadata") if expedited_rollout_metadata is not None: expedited_rollout_metadata.set_prop( "enabled", AAZBoolType, ".enabled") expedited_rollout_metadata.set_prop( "expeditedRolloutIntent", AAZStrType, ".expedited_rollout_intent") expedited_rollout_submitters = _builder.get( ".properties.management.expeditedRolloutSubmitters") if expedited_rollout_submitters is not None: expedited_rollout_submitters.set_elements(AAZStrType, ".") manifest_owners = _builder.get( ".properties.management.manifestOwners") if manifest_owners is not None: manifest_owners.set_elements(AAZStrType, ".") resource_access_roles = _builder.get( ".properties.management.resourceAccessRoles") if resource_access_roles is not None: resource_access_roles.set_elements(AAZObjectType, ".") _elements = _builder.get( ".properties.management.resourceAccessRoles[]") if _elements is not None: _elements.set_prop("actions", AAZListType, ".actions") _elements.set_prop("allowedGroupClaims", AAZListType, ".allowed_group_claims") actions = _builder.get( ".properties.management.resourceAccessRoles[].actions") if actions is not None: actions.set_elements(AAZStrType, ".") allowed_group_claims = _builder.get( ".properties.management.resourceAccessRoles[].allowedGroupClaims") if allowed_group_claims is not None: allowed_group_claims.set_elements(AAZStrType, ".") schema_owners = _builder.get(".properties.management.schemaOwners") if schema_owners is not None: schema_owners.set_elements(AAZStrType, ".") service_tree_infos = _builder.get( ".properties.management.serviceTreeInfos") if service_tree_infos is not None: service_tree_infos.set_elements(AAZObjectType, ".") _elements = _builder.get( ".properties.management.serviceTreeInfos[]") if _elements is not None: _elements.set_prop("componentId", AAZStrType, ".component_id") _elements.set_prop("readiness", AAZStrType, ".readiness") _elements.set_prop("serviceId", AAZStrType, ".service_id") management_group_global_notification_endpoints = _builder.get( ".properties.managementGroupGlobalNotificationEndpoints") if management_group_global_notification_endpoints is not None: _UpdateHelper._build_schema_resource_provider_endpoint_update( management_group_global_notification_endpoints.set_elements(AAZObjectType, ".")) metadata = _builder.get(".properties.metadata") if metadata is not None: metadata.set_anytype_elements(".") notification_settings = _builder.get( ".properties.notificationSettings") if notification_settings is not None: notification_settings.set_prop( "subscriberSettings", AAZListType, ".subscriber_settings") subscriber_settings = _builder.get( ".properties.notificationSettings.subscriberSettings") if subscriber_settings is not None: subscriber_settings.set_elements(AAZObjectType, ".") _elements = _builder.get( ".properties.notificationSettings.subscriberSettings[]") if _elements is not None: _elements.set_prop("filterRules", AAZListType, ".filter_rules") filter_rules = _builder.get( ".properties.notificationSettings.subscriberSettings[].filterRules") if filter_rules is not None: filter_rules.set_elements(AAZObjectType, ".") _elements = _builder.get( ".properties.notificationSettings.subscriberSettings[].filterRules[]") if _elements is not None: _elements.set_prop("endpointInformation", AAZListType, ".endpoint_information") _elements.set_prop("filterQuery", AAZStrType, ".filter_query") endpoint_information = _builder.get( ".properties.notificationSettings.subscriberSettings[].filterRules[].endpointInformation") if endpoint_information is not None: endpoint_information.set_elements(AAZObjectType, ".") _elements = _builder.get( ".properties.notificationSettings.subscriberSettings[].filterRules[].endpointInformation[]") if _elements is not None: _elements.set_prop("endpoint", AAZStrType, ".endpoint") _elements.set_prop( "endpointType", AAZStrType, ".endpoint_type") _elements.set_prop( "schemaVersion", AAZStrType, ".schema_version") notifications = _builder.get(".properties.notifications") if notifications is not None: notifications.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.notifications[]") if _elements is not None: _elements.set_prop("notificationType", AAZStrType, ".notification_type") _elements.set_prop("skipNotifications", AAZStrType, ".skip_notifications") optional_features = _builder.get(".properties.optionalFeatures") if optional_features is not None: optional_features.set_elements(AAZStrType, ".") private_resource_provider_configuration = _builder.get( ".properties.privateResourceProviderConfiguration") if private_resource_provider_configuration is not None: private_resource_provider_configuration.set_prop( "allowedSubscriptions", AAZListType, ".allowed_subscriptions") allowed_subscriptions = _builder.get( ".properties.privateResourceProviderConfiguration.allowedSubscriptions") if allowed_subscriptions is not None: allowed_subscriptions.set_elements(AAZStrType, ".") provider_authentication = _builder.get( ".properties.providerAuthentication") if provider_authentication is not None: provider_authentication.set_prop( "allowedAudiences", AAZListType, ".allowed_audiences", typ_kwargs={"flags": {"required": True}}) allowed_audiences = _builder.get( ".properties.providerAuthentication.allowedAudiences") if allowed_audiences is not None: allowed_audiences.set_elements(AAZStrType, ".") provider_authorizations = _builder.get( ".properties.providerAuthorizations") if provider_authorizations is not None: _UpdateHelper._build_schema_resource_provider_authorization_update( provider_authorizations.set_elements(AAZObjectType, ".")) provider_hub_metadata = _builder.get( ".properties.providerHubMetadata") if provider_hub_metadata is not None: provider_hub_metadata.set_prop( "directRpRoleDefinitionId", AAZStrType, ".direct_rp_role_definition_id") provider_hub_metadata.set_prop( "globalAsyncOperationResourceTypeName", AAZStrType, ".global_async_operation_resource_type_name") provider_hub_metadata.set_prop( "providerAuthentication", AAZObjectType, ".provider_authentication") provider_hub_metadata.set_prop( "providerAuthorizations", AAZListType, ".provider_authorizations") provider_hub_metadata.set_prop( "regionalAsyncOperationResourceTypeName", AAZStrType, ".regional_async_operation_resource_type_name") provider_hub_metadata.set_prop( "thirdPartyProviderAuthorization", AAZObjectType, ".third_party_provider_authorization") provider_authentication = _builder.get( ".properties.providerHubMetadata.providerAuthentication") if provider_authentication is not None: provider_authentication.set_prop( "allowedAudiences", AAZListType, ".allowed_audiences", typ_kwargs={"flags": {"required": True}}) allowed_audiences = _builder.get( ".properties.providerHubMetadata.providerAuthentication.allowedAudiences") if allowed_audiences is not None: allowed_audiences.set_elements(AAZStrType, ".") provider_authorizations = _builder.get( ".properties.providerHubMetadata.providerAuthorizations") if provider_authorizations is not None: _UpdateHelper._build_schema_resource_provider_authorization_update( provider_authorizations.set_elements(AAZObjectType, ".")) third_party_provider_authorization = _builder.get( ".properties.providerHubMetadata.thirdPartyProviderAuthorization") if third_party_provider_authorization is not None: third_party_provider_authorization.set_prop( "authorizations", AAZListType, ".authorizations") third_party_provider_authorization.set_prop( "managedByTenantId", AAZStrType, ".managed_by_tenant_id") authorizations = _builder.get( ".properties.providerHubMetadata.thirdPartyProviderAuthorization.authorizations") if authorizations is not None: authorizations.set_elements(AAZObjectType, ".") _elements = _builder.get( ".properties.providerHubMetadata.thirdPartyProviderAuthorization.authorizations[]") if _elements is not None: _elements.set_prop("principalId", AAZStrType, ".principal_id", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("roleDefinitionId", AAZStrType, ".role_definition_id", typ_kwargs={ "flags": {"required": True}}) request_header_options = _builder.get( ".properties.requestHeaderOptions") if request_header_options is not None: request_header_options.set_prop( "optInHeaders", AAZStrType, ".opt_in_headers") request_header_options.set_prop( "optOutHeaders", AAZStrType, ".opt_out_headers") required_features = _builder.get(".properties.requiredFeatures") if required_features is not None: required_features.set_elements(AAZStrType, ".") resource_group_lock_option_during_move = _builder.get( ".properties.resourceGroupLockOptionDuringMove") if resource_group_lock_option_during_move is not None: resource_group_lock_option_during_move.set_prop( "blockActionVerb", AAZStrType, ".block_action_verb") resource_hydration_accounts = _builder.get( ".properties.resourceHydrationAccounts") if resource_hydration_accounts is not None: resource_hydration_accounts.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.resourceHydrationAccounts[]") if _elements is not None: _elements.set_prop("accountName", AAZStrType, ".account_name") _elements.set_prop( "encryptedKey", AAZStrType, ".encrypted_key") _elements.set_prop("maxChildResourceConsistencyJobLimit", AAZIntType, ".max_child_resource_consistency_job_limit") _elements.set_prop( "subscriptionId", AAZStrType, ".subscription_id") resource_provider_authorization_rules = _builder.get( ".properties.resourceProviderAuthorizationRules") if resource_provider_authorization_rules is not None: resource_provider_authorization_rules.set_prop( "asyncOperationPollingRules", AAZObjectType, ".async_operation_polling_rules") async_operation_polling_rules = _builder.get( ".properties.resourceProviderAuthorizationRules.asyncOperationPollingRules") if async_operation_polling_rules is not None: async_operation_polling_rules.set_prop( "additionalOptions", AAZStrType, ".additional_options") async_operation_polling_rules.set_prop( "authorizationActions", AAZListType, ".authorization_actions") authorization_actions = _builder.get( ".properties.resourceProviderAuthorizationRules.asyncOperationPollingRules.authorizationActions") if authorization_actions is not None: authorization_actions.set_elements(AAZStrType, ".") response_options = _builder.get(".properties.responseOptions") if response_options is not None: response_options.set_prop( "serviceClientOptionsType", AAZStrType, ".service_client_options_type") services = _builder.get(".properties.services") if services is not None: services.set_elements(AAZObjectType, ".") _elements = _builder.get(".properties.services[]") if _elements is not None: _elements.set_prop("serviceName", AAZStrType, ".service_name") _elements.set_prop("status", AAZStrType, ".status") subscription_lifecycle_notification_specifications = _builder.get( ".properties.subscriptionLifecycleNotificationSpecifications") if subscription_lifecycle_notification_specifications is not None: subscription_lifecycle_notification_specifications.set_prop( "softDeleteTTL", AAZStrType, ".soft_delete_ttl") subscription_lifecycle_notification_specifications.set_prop( "subscriptionStateOverrideActions", AAZListType, ".subscription_state_override_actions") subscription_state_override_actions = _builder.get( ".properties.subscriptionLifecycleNotificationSpecifications.subscriptionStateOverrideActions") if subscription_state_override_actions is not None: subscription_state_override_actions.set_elements( AAZObjectType, ".") _elements = _builder.get( ".properties.subscriptionLifecycleNotificationSpecifications.subscriptionStateOverrideActions[]") if _elements is not None: _elements.set_prop("action", AAZStrType, ".action", typ_kwargs={ "flags": {"required": True}}) _elements.set_prop("state", AAZStrType, ".state", typ_kwargs={ "flags": {"required": True}}) template_deployment_options = _builder.get( ".properties.templateDeploymentOptions") if template_deployment_options is not None: template_deployment_options.set_prop( "preflightOptions", AAZListType, ".preflight_options") template_deployment_options.set_prop( "preflightSupported", AAZBoolType, ".preflight_supported") preflight_options = _builder.get( ".properties.templateDeploymentOptions.preflightOptions") if preflight_options is not None: preflight_options.set_elements(AAZStrType, ".") return _instance_value
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): def __call__(self, *args, **kwargs): pass def _update_instance(self, instance): pass
3
0
180
34
146
0
35
0
1
1
1
0
2
0
2
2
362
70
292
54
289
0
288
54
285
68
1
1
69
10,297
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/providerhub/azext_providerhub/aaz/latest/providerhub/provider_registration/_show.py
azext_providerhub.aaz.latest.providerhub.provider_registration._show.Show.ProviderRegistrationsGet
class ProviderRegistrationsGet(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "providerNamespace", self.ctx.args.provider_namespace, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-04-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.id = AAZStrType( flags={"read_only": True}, ) _schema_on_200.kind = AAZStrType() _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) _schema_on_200.properties = AAZObjectType() _schema_on_200.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _schema_on_200.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200.properties properties.capabilities = AAZListType() properties.cross_tenant_token_validation = AAZStrType( serialized_name="crossTenantTokenValidation", ) properties.custom_manifest_version = AAZStrType( serialized_name="customManifestVersion", ) properties.dsts_configuration = AAZObjectType( serialized_name="dstsConfiguration", ) properties.enable_tenant_linked_notification = AAZBoolType( serialized_name="enableTenantLinkedNotification", nullable=True, ) properties.features_rule = AAZObjectType( serialized_name="featuresRule", ) properties.global_notification_endpoints = AAZListType( serialized_name="globalNotificationEndpoints", ) properties.legacy_namespace = AAZStrType( serialized_name="legacyNamespace", ) properties.legacy_registrations = AAZListType( serialized_name="legacyRegistrations", ) properties.linked_notification_rules = AAZListType( serialized_name="linkedNotificationRules", ) properties.management = AAZObjectType() properties.management_group_global_notification_endpoints = AAZListType( serialized_name="managementGroupGlobalNotificationEndpoints", ) properties.metadata = AAZFreeFormDictType() properties.namespace = AAZStrType() properties.notification_options = AAZStrType( serialized_name="notificationOptions", ) properties.notification_settings = AAZObjectType( serialized_name="notificationSettings", ) properties.notifications = AAZListType() properties.optional_features = AAZListType( serialized_name="optionalFeatures", ) properties.private_resource_provider_configuration = AAZObjectType( serialized_name="privateResourceProviderConfiguration", ) properties.provider_authentication = AAZObjectType( serialized_name="providerAuthentication", ) properties.provider_authorizations = AAZListType( serialized_name="providerAuthorizations", ) properties.provider_hub_metadata = AAZObjectType( serialized_name="providerHubMetadata", ) properties.provider_type = AAZStrType( serialized_name="providerType", ) properties.provider_version = AAZStrType( serialized_name="providerVersion", ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) properties.request_header_options = AAZObjectType( serialized_name="requestHeaderOptions", ) properties.required_features = AAZListType( serialized_name="requiredFeatures", ) properties.resource_group_lock_option_during_move = AAZObjectType( serialized_name="resourceGroupLockOptionDuringMove", ) properties.resource_hydration_accounts = AAZListType( serialized_name="resourceHydrationAccounts", ) properties.resource_provider_authorization_rules = AAZObjectType( serialized_name="resourceProviderAuthorizationRules", ) properties.response_options = AAZObjectType( serialized_name="responseOptions", ) properties.service_name = AAZStrType( serialized_name="serviceName", ) properties.services = AAZListType() properties.subscription_lifecycle_notification_specifications = AAZObjectType( serialized_name="subscriptionLifecycleNotificationSpecifications", ) properties.template_deployment_options = AAZObjectType( serialized_name="templateDeploymentOptions", ) properties.token_auth_configuration = AAZObjectType( serialized_name="tokenAuthConfiguration", ) _ShowHelper._build_schema_token_auth_configuration_read( properties.token_auth_configuration) capabilities = cls._schema_on_200.properties.capabilities capabilities.Element = AAZObjectType() _element = cls._schema_on_200.properties.capabilities.Element _element.effect = AAZStrType( flags={"required": True}, ) _element.quota_id = AAZStrType( serialized_name="quotaId", flags={"required": True}, ) _element.required_features = AAZListType( serialized_name="requiredFeatures", ) required_features = cls._schema_on_200.properties.capabilities.Element.required_features required_features.Element = AAZStrType() dsts_configuration = cls._schema_on_200.properties.dsts_configuration dsts_configuration.service_dns_name = AAZStrType( serialized_name="serviceDnsName", ) dsts_configuration.service_name = AAZStrType( serialized_name="serviceName", flags={"required": True}, ) features_rule = cls._schema_on_200.properties.features_rule features_rule.required_features_policy = AAZStrType( serialized_name="requiredFeaturesPolicy", flags={"required": True}, ) global_notification_endpoints = cls._schema_on_200.properties.global_notification_endpoints global_notification_endpoints.Element = AAZObjectType() _ShowHelper._build_schema_resource_provider_endpoint_read( global_notification_endpoints.Element) legacy_registrations = cls._schema_on_200.properties.legacy_registrations legacy_registrations.Element = AAZStrType() linked_notification_rules = cls._schema_on_200.properties.linked_notification_rules linked_notification_rules.Element = AAZObjectType() _element = cls._schema_on_200.properties.linked_notification_rules.Element _element.actions = AAZListType() _element.dsts_configuration = AAZObjectType( serialized_name="dstsConfiguration", ) _element.endpoints = AAZListType() _element.token_auth_configuration = AAZObjectType( serialized_name="tokenAuthConfiguration", ) _ShowHelper._build_schema_token_auth_configuration_read( _element.token_auth_configuration) actions = cls._schema_on_200.properties.linked_notification_rules.Element.actions actions.Element = AAZStrType() dsts_configuration = cls._schema_on_200.properties.linked_notification_rules.Element.dsts_configuration dsts_configuration.service_dns_name = AAZStrType( serialized_name="serviceDnsName", ) dsts_configuration.service_name = AAZStrType( serialized_name="serviceName", flags={"required": True}, ) endpoints = cls._schema_on_200.properties.linked_notification_rules.Element.endpoints endpoints.Element = AAZObjectType() _ShowHelper._build_schema_resource_provider_endpoint_read( endpoints.Element) management = cls._schema_on_200.properties.management management.authorization_owners = AAZListType( serialized_name="authorizationOwners", ) management.canary_manifest_owners = AAZListType( serialized_name="canaryManifestOwners", ) management.error_response_message_options = AAZObjectType( serialized_name="errorResponseMessageOptions", ) management.expedited_rollout_metadata = AAZObjectType( serialized_name="expeditedRolloutMetadata", ) management.expedited_rollout_submitters = AAZListType( serialized_name="expeditedRolloutSubmitters", ) management.incident_contact_email = AAZStrType( serialized_name="incidentContactEmail", ) management.incident_routing_service = AAZStrType( serialized_name="incidentRoutingService", ) management.incident_routing_team = AAZStrType( serialized_name="incidentRoutingTeam", ) management.manifest_owners = AAZListType( serialized_name="manifestOwners", ) management.pc_code = AAZStrType( serialized_name="pcCode", ) management.profit_center_program_id = AAZStrType( serialized_name="profitCenterProgramId", ) management.resource_access_policy = AAZStrType( serialized_name="resourceAccessPolicy", ) management.resource_access_roles = AAZListType( serialized_name="resourceAccessRoles", ) management.schema_owners = AAZListType( serialized_name="schemaOwners", ) management.service_tree_infos = AAZListType( serialized_name="serviceTreeInfos", ) authorization_owners = cls._schema_on_200.properties.management.authorization_owners authorization_owners.Element = AAZStrType() canary_manifest_owners = cls._schema_on_200.properties.management.canary_manifest_owners canary_manifest_owners.Element = AAZStrType() error_response_message_options = cls._schema_on_200.properties.management.error_response_message_options error_response_message_options.server_failure_response_message_type = AAZStrType( serialized_name="serverFailureResponseMessageType", ) expedited_rollout_metadata = cls._schema_on_200.properties.management.expedited_rollout_metadata expedited_rollout_metadata.enabled = AAZBoolType() expedited_rollout_metadata.expedited_rollout_intent = AAZStrType( serialized_name="expeditedRolloutIntent", ) expedited_rollout_submitters = cls._schema_on_200.properties.management.expedited_rollout_submitters expedited_rollout_submitters.Element = AAZStrType() manifest_owners = cls._schema_on_200.properties.management.manifest_owners manifest_owners.Element = AAZStrType() resource_access_roles = cls._schema_on_200.properties.management.resource_access_roles resource_access_roles.Element = AAZObjectType() _element = cls._schema_on_200.properties.management.resource_access_roles.Element _element.actions = AAZListType() _element.allowed_group_claims = AAZListType( serialized_name="allowedGroupClaims", ) actions = cls._schema_on_200.properties.management.resource_access_roles.Element.actions actions.Element = AAZStrType() allowed_group_claims = cls._schema_on_200.properties.management.resource_access_roles.Element.allowed_group_claims allowed_group_claims.Element = AAZStrType() schema_owners = cls._schema_on_200.properties.management.schema_owners schema_owners.Element = AAZStrType() service_tree_infos = cls._schema_on_200.properties.management.service_tree_infos service_tree_infos.Element = AAZObjectType() _element = cls._schema_on_200.properties.management.service_tree_infos.Element _element.component_id = AAZStrType( serialized_name="componentId", ) _element.readiness = AAZStrType() _element.service_id = AAZStrType( serialized_name="serviceId", ) management_group_global_notification_endpoints = cls._schema_on_200.properties.management_group_global_notification_endpoints management_group_global_notification_endpoints.Element = AAZObjectType() _ShowHelper._build_schema_resource_provider_endpoint_read( management_group_global_notification_endpoints.Element) notification_settings = cls._schema_on_200.properties.notification_settings notification_settings.subscriber_settings = AAZListType( serialized_name="subscriberSettings", ) subscriber_settings = cls._schema_on_200.properties.notification_settings.subscriber_settings subscriber_settings.Element = AAZObjectType() _element = cls._schema_on_200.properties.notification_settings.subscriber_settings.Element _element.filter_rules = AAZListType( serialized_name="filterRules", ) filter_rules = cls._schema_on_200.properties.notification_settings.subscriber_settings.Element.filter_rules filter_rules.Element = AAZObjectType() _element = cls._schema_on_200.properties.notification_settings.subscriber_settings.Element.filter_rules.Element _element.endpoint_information = AAZListType( serialized_name="endpointInformation", ) _element.filter_query = AAZStrType( serialized_name="filterQuery", ) endpoint_information = cls._schema_on_200.properties.notification_settings.subscriber_settings.Element.filter_rules.Element.endpoint_information endpoint_information.Element = AAZObjectType() _element = cls._schema_on_200.properties.notification_settings.subscriber_settings.Element.filter_rules.Element.endpoint_information.Element _element.endpoint = AAZStrType() _element.endpoint_type = AAZStrType( serialized_name="endpointType", ) _element.schema_version = AAZStrType( serialized_name="schemaVersion", ) notifications = cls._schema_on_200.properties.notifications notifications.Element = AAZObjectType() _element = cls._schema_on_200.properties.notifications.Element _element.notification_type = AAZStrType( serialized_name="notificationType", ) _element.skip_notifications = AAZStrType( serialized_name="skipNotifications", ) optional_features = cls._schema_on_200.properties.optional_features optional_features.Element = AAZStrType() private_resource_provider_configuration = cls._schema_on_200.properties.private_resource_provider_configuration private_resource_provider_configuration.allowed_subscriptions = AAZListType( serialized_name="allowedSubscriptions", ) allowed_subscriptions = cls._schema_on_200.properties.private_resource_provider_configuration.allowed_subscriptions allowed_subscriptions.Element = AAZStrType() provider_authentication = cls._schema_on_200.properties.provider_authentication provider_authentication.allowed_audiences = AAZListType( serialized_name="allowedAudiences", flags={"required": True}, ) allowed_audiences = cls._schema_on_200.properties.provider_authentication.allowed_audiences allowed_audiences.Element = AAZStrType() provider_authorizations = cls._schema_on_200.properties.provider_authorizations provider_authorizations.Element = AAZObjectType() _ShowHelper._build_schema_resource_provider_authorization_read( provider_authorizations.Element) provider_hub_metadata = cls._schema_on_200.properties.provider_hub_metadata provider_hub_metadata.direct_rp_role_definition_id = AAZStrType( serialized_name="directRpRoleDefinitionId", ) provider_hub_metadata.global_async_operation_resource_type_name = AAZStrType( serialized_name="globalAsyncOperationResourceTypeName", ) provider_hub_metadata.provider_authentication = AAZObjectType( serialized_name="providerAuthentication", ) provider_hub_metadata.provider_authorizations = AAZListType( serialized_name="providerAuthorizations", ) provider_hub_metadata.regional_async_operation_resource_type_name = AAZStrType( serialized_name="regionalAsyncOperationResourceTypeName", ) provider_hub_metadata.third_party_provider_authorization = AAZObjectType( serialized_name="thirdPartyProviderAuthorization", ) provider_authentication = cls._schema_on_200.properties.provider_hub_metadata.provider_authentication provider_authentication.allowed_audiences = AAZListType( serialized_name="allowedAudiences", flags={"required": True}, ) allowed_audiences = cls._schema_on_200.properties.provider_hub_metadata.provider_authentication.allowed_audiences allowed_audiences.Element = AAZStrType() provider_authorizations = cls._schema_on_200.properties.provider_hub_metadata.provider_authorizations provider_authorizations.Element = AAZObjectType() _ShowHelper._build_schema_resource_provider_authorization_read( provider_authorizations.Element) third_party_provider_authorization = cls._schema_on_200.properties.provider_hub_metadata.third_party_provider_authorization third_party_provider_authorization.authorizations = AAZListType() third_party_provider_authorization.managed_by_tenant_id = AAZStrType( serialized_name="managedByTenantId", ) authorizations = cls._schema_on_200.properties.provider_hub_metadata.third_party_provider_authorization.authorizations authorizations.Element = AAZObjectType() _element = cls._schema_on_200.properties.provider_hub_metadata.third_party_provider_authorization.authorizations.Element _element.principal_id = AAZStrType( serialized_name="principalId", flags={"required": True}, ) _element.role_definition_id = AAZStrType( serialized_name="roleDefinitionId", flags={"required": True}, ) request_header_options = cls._schema_on_200.properties.request_header_options request_header_options.opt_in_headers = AAZStrType( serialized_name="optInHeaders", ) request_header_options.opt_out_headers = AAZStrType( serialized_name="optOutHeaders", ) required_features = cls._schema_on_200.properties.required_features required_features.Element = AAZStrType() resource_group_lock_option_during_move = cls._schema_on_200.properties.resource_group_lock_option_during_move resource_group_lock_option_during_move.block_action_verb = AAZStrType( serialized_name="blockActionVerb", ) resource_hydration_accounts = cls._schema_on_200.properties.resource_hydration_accounts resource_hydration_accounts.Element = AAZObjectType() _element = cls._schema_on_200.properties.resource_hydration_accounts.Element _element.account_name = AAZStrType( serialized_name="accountName", ) _element.encrypted_key = AAZStrType( serialized_name="encryptedKey", ) _element.max_child_resource_consistency_job_limit = AAZIntType( serialized_name="maxChildResourceConsistencyJobLimit", ) _element.subscription_id = AAZStrType( serialized_name="subscriptionId", ) resource_provider_authorization_rules = cls._schema_on_200.properties.resource_provider_authorization_rules resource_provider_authorization_rules.async_operation_polling_rules = AAZObjectType( serialized_name="asyncOperationPollingRules", ) async_operation_polling_rules = cls._schema_on_200.properties.resource_provider_authorization_rules.async_operation_polling_rules async_operation_polling_rules.additional_options = AAZStrType( serialized_name="additionalOptions", ) async_operation_polling_rules.authorization_actions = AAZListType( serialized_name="authorizationActions", ) authorization_actions = cls._schema_on_200.properties.resource_provider_authorization_rules.async_operation_polling_rules.authorization_actions authorization_actions.Element = AAZStrType() response_options = cls._schema_on_200.properties.response_options response_options.service_client_options_type = AAZStrType( serialized_name="serviceClientOptionsType", ) services = cls._schema_on_200.properties.services services.Element = AAZObjectType() _element = cls._schema_on_200.properties.services.Element _element.service_name = AAZStrType( serialized_name="serviceName", ) _element.status = AAZStrType() subscription_lifecycle_notification_specifications = cls._schema_on_200.properties.subscription_lifecycle_notification_specifications subscription_lifecycle_notification_specifications.soft_delete_ttl = AAZStrType( serialized_name="softDeleteTTL", ) subscription_lifecycle_notification_specifications.subscription_state_override_actions = AAZListType( serialized_name="subscriptionStateOverrideActions", ) subscription_state_override_actions = cls._schema_on_200.properties.subscription_lifecycle_notification_specifications.subscription_state_override_actions subscription_state_override_actions.Element = AAZObjectType() _element = cls._schema_on_200.properties.subscription_lifecycle_notification_specifications.subscription_state_override_actions.Element _element.action = AAZStrType( flags={"required": True}, ) _element.state = AAZStrType( flags={"required": True}, ) template_deployment_options = cls._schema_on_200.properties.template_deployment_options template_deployment_options.preflight_options = AAZListType( serialized_name="preflightOptions", ) template_deployment_options.preflight_supported = AAZBoolType( serialized_name="preflightSupported", ) preflight_options = cls._schema_on_200.properties.template_deployment_options.preflight_options preflight_options.Element = AAZStrType() system_data = cls._schema_on_200.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", ) system_data.created_by = AAZStrType( serialized_name="createdBy", ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", ) return cls._schema_on_200
class ProviderRegistrationsGet(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
65
8
57
0
1
0
1
1
1
0
8
0
9
9
605
81
524
76
507
0
265
69
255
2
1
1
11
10,298
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/providerhub/azext_providerhub/aaz/latest/providerhub/provider_registration/_list.py
azext_providerhub.aaz.latest.providerhub.provider_registration._list.List.ProviderRegistrationsList
class ProviderRegistrationsList(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations", **self.url_parameters ) @property def method(self): return "GET" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-04-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.next_link = AAZStrType( serialized_name="nextLink", ) _schema_on_200.value = AAZListType() value = cls._schema_on_200.value value.Element = AAZObjectType() _element = cls._schema_on_200.value.Element _element.id = AAZStrType( flags={"read_only": True}, ) _element.kind = AAZStrType() _element.name = AAZStrType( flags={"read_only": True}, ) _element.properties = AAZObjectType() _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, ) _element.type = AAZStrType( flags={"read_only": True}, ) properties = cls._schema_on_200.value.Element.properties properties.capabilities = AAZListType() properties.cross_tenant_token_validation = AAZStrType( serialized_name="crossTenantTokenValidation", ) properties.custom_manifest_version = AAZStrType( serialized_name="customManifestVersion", ) properties.dsts_configuration = AAZObjectType( serialized_name="dstsConfiguration", ) properties.enable_tenant_linked_notification = AAZBoolType( serialized_name="enableTenantLinkedNotification", nullable=True, ) properties.features_rule = AAZObjectType( serialized_name="featuresRule", ) properties.global_notification_endpoints = AAZListType( serialized_name="globalNotificationEndpoints", ) properties.legacy_namespace = AAZStrType( serialized_name="legacyNamespace", ) properties.legacy_registrations = AAZListType( serialized_name="legacyRegistrations", ) properties.linked_notification_rules = AAZListType( serialized_name="linkedNotificationRules", ) properties.management = AAZObjectType() properties.management_group_global_notification_endpoints = AAZListType( serialized_name="managementGroupGlobalNotificationEndpoints", ) properties.metadata = AAZFreeFormDictType() properties.namespace = AAZStrType() properties.notification_options = AAZStrType( serialized_name="notificationOptions", ) properties.notification_settings = AAZObjectType( serialized_name="notificationSettings", ) properties.notifications = AAZListType() properties.optional_features = AAZListType( serialized_name="optionalFeatures", ) properties.private_resource_provider_configuration = AAZObjectType( serialized_name="privateResourceProviderConfiguration", ) properties.provider_authentication = AAZObjectType( serialized_name="providerAuthentication", ) properties.provider_authorizations = AAZListType( serialized_name="providerAuthorizations", ) properties.provider_hub_metadata = AAZObjectType( serialized_name="providerHubMetadata", ) properties.provider_type = AAZStrType( serialized_name="providerType", ) properties.provider_version = AAZStrType( serialized_name="providerVersion", ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, ) properties.request_header_options = AAZObjectType( serialized_name="requestHeaderOptions", ) properties.required_features = AAZListType( serialized_name="requiredFeatures", ) properties.resource_group_lock_option_during_move = AAZObjectType( serialized_name="resourceGroupLockOptionDuringMove", ) properties.resource_hydration_accounts = AAZListType( serialized_name="resourceHydrationAccounts", ) properties.resource_provider_authorization_rules = AAZObjectType( serialized_name="resourceProviderAuthorizationRules", ) properties.response_options = AAZObjectType( serialized_name="responseOptions", ) properties.service_name = AAZStrType( serialized_name="serviceName", ) properties.services = AAZListType() properties.subscription_lifecycle_notification_specifications = AAZObjectType( serialized_name="subscriptionLifecycleNotificationSpecifications", ) properties.template_deployment_options = AAZObjectType( serialized_name="templateDeploymentOptions", ) properties.token_auth_configuration = AAZObjectType( serialized_name="tokenAuthConfiguration", ) _ListHelper._build_schema_token_auth_configuration_read( properties.token_auth_configuration) capabilities = cls._schema_on_200.value.Element.properties.capabilities capabilities.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.capabilities.Element _element.effect = AAZStrType( flags={"required": True}, ) _element.quota_id = AAZStrType( serialized_name="quotaId", flags={"required": True}, ) _element.required_features = AAZListType( serialized_name="requiredFeatures", ) required_features = cls._schema_on_200.value.Element.properties.capabilities.Element.required_features required_features.Element = AAZStrType() dsts_configuration = cls._schema_on_200.value.Element.properties.dsts_configuration dsts_configuration.service_dns_name = AAZStrType( serialized_name="serviceDnsName", ) dsts_configuration.service_name = AAZStrType( serialized_name="serviceName", flags={"required": True}, ) features_rule = cls._schema_on_200.value.Element.properties.features_rule features_rule.required_features_policy = AAZStrType( serialized_name="requiredFeaturesPolicy", flags={"required": True}, ) global_notification_endpoints = cls._schema_on_200.value.Element.properties.global_notification_endpoints global_notification_endpoints.Element = AAZObjectType() _ListHelper._build_schema_resource_provider_endpoint_read( global_notification_endpoints.Element) legacy_registrations = cls._schema_on_200.value.Element.properties.legacy_registrations legacy_registrations.Element = AAZStrType() linked_notification_rules = cls._schema_on_200.value.Element.properties.linked_notification_rules linked_notification_rules.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.linked_notification_rules.Element _element.actions = AAZListType() _element.dsts_configuration = AAZObjectType( serialized_name="dstsConfiguration", ) _element.endpoints = AAZListType() _element.token_auth_configuration = AAZObjectType( serialized_name="tokenAuthConfiguration", ) _ListHelper._build_schema_token_auth_configuration_read( _element.token_auth_configuration) actions = cls._schema_on_200.value.Element.properties.linked_notification_rules.Element.actions actions.Element = AAZStrType() dsts_configuration = cls._schema_on_200.value.Element.properties.linked_notification_rules.Element.dsts_configuration dsts_configuration.service_dns_name = AAZStrType( serialized_name="serviceDnsName", ) dsts_configuration.service_name = AAZStrType( serialized_name="serviceName", flags={"required": True}, ) endpoints = cls._schema_on_200.value.Element.properties.linked_notification_rules.Element.endpoints endpoints.Element = AAZObjectType() _ListHelper._build_schema_resource_provider_endpoint_read( endpoints.Element) management = cls._schema_on_200.value.Element.properties.management management.authorization_owners = AAZListType( serialized_name="authorizationOwners", ) management.canary_manifest_owners = AAZListType( serialized_name="canaryManifestOwners", ) management.error_response_message_options = AAZObjectType( serialized_name="errorResponseMessageOptions", ) management.expedited_rollout_metadata = AAZObjectType( serialized_name="expeditedRolloutMetadata", ) management.expedited_rollout_submitters = AAZListType( serialized_name="expeditedRolloutSubmitters", ) management.incident_contact_email = AAZStrType( serialized_name="incidentContactEmail", ) management.incident_routing_service = AAZStrType( serialized_name="incidentRoutingService", ) management.incident_routing_team = AAZStrType( serialized_name="incidentRoutingTeam", ) management.manifest_owners = AAZListType( serialized_name="manifestOwners", ) management.pc_code = AAZStrType( serialized_name="pcCode", ) management.profit_center_program_id = AAZStrType( serialized_name="profitCenterProgramId", ) management.resource_access_policy = AAZStrType( serialized_name="resourceAccessPolicy", ) management.resource_access_roles = AAZListType( serialized_name="resourceAccessRoles", ) management.schema_owners = AAZListType( serialized_name="schemaOwners", ) management.service_tree_infos = AAZListType( serialized_name="serviceTreeInfos", ) authorization_owners = cls._schema_on_200.value.Element.properties.management.authorization_owners authorization_owners.Element = AAZStrType() canary_manifest_owners = cls._schema_on_200.value.Element.properties.management.canary_manifest_owners canary_manifest_owners.Element = AAZStrType() error_response_message_options = cls._schema_on_200.value.Element.properties.management.error_response_message_options error_response_message_options.server_failure_response_message_type = AAZStrType( serialized_name="serverFailureResponseMessageType", ) expedited_rollout_metadata = cls._schema_on_200.value.Element.properties.management.expedited_rollout_metadata expedited_rollout_metadata.enabled = AAZBoolType() expedited_rollout_metadata.expedited_rollout_intent = AAZStrType( serialized_name="expeditedRolloutIntent", ) expedited_rollout_submitters = cls._schema_on_200.value.Element.properties.management.expedited_rollout_submitters expedited_rollout_submitters.Element = AAZStrType() manifest_owners = cls._schema_on_200.value.Element.properties.management.manifest_owners manifest_owners.Element = AAZStrType() resource_access_roles = cls._schema_on_200.value.Element.properties.management.resource_access_roles resource_access_roles.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.management.resource_access_roles.Element _element.actions = AAZListType() _element.allowed_group_claims = AAZListType( serialized_name="allowedGroupClaims", ) actions = cls._schema_on_200.value.Element.properties.management.resource_access_roles.Element.actions actions.Element = AAZStrType() allowed_group_claims = cls._schema_on_200.value.Element.properties.management.resource_access_roles.Element.allowed_group_claims allowed_group_claims.Element = AAZStrType() schema_owners = cls._schema_on_200.value.Element.properties.management.schema_owners schema_owners.Element = AAZStrType() service_tree_infos = cls._schema_on_200.value.Element.properties.management.service_tree_infos service_tree_infos.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.management.service_tree_infos.Element _element.component_id = AAZStrType( serialized_name="componentId", ) _element.readiness = AAZStrType() _element.service_id = AAZStrType( serialized_name="serviceId", ) management_group_global_notification_endpoints = cls._schema_on_200.value.Element.properties.management_group_global_notification_endpoints management_group_global_notification_endpoints.Element = AAZObjectType() _ListHelper._build_schema_resource_provider_endpoint_read( management_group_global_notification_endpoints.Element) notification_settings = cls._schema_on_200.value.Element.properties.notification_settings notification_settings.subscriber_settings = AAZListType( serialized_name="subscriberSettings", ) subscriber_settings = cls._schema_on_200.value.Element.properties.notification_settings.subscriber_settings subscriber_settings.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.notification_settings.subscriber_settings.Element _element.filter_rules = AAZListType( serialized_name="filterRules", ) filter_rules = cls._schema_on_200.value.Element.properties.notification_settings.subscriber_settings.Element.filter_rules filter_rules.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.notification_settings.subscriber_settings.Element.filter_rules.Element _element.endpoint_information = AAZListType( serialized_name="endpointInformation", ) _element.filter_query = AAZStrType( serialized_name="filterQuery", ) endpoint_information = cls._schema_on_200.value.Element.properties.notification_settings.subscriber_settings.Element.filter_rules.Element.endpoint_information endpoint_information.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.notification_settings.subscriber_settings.Element.filter_rules.Element.endpoint_information.Element _element.endpoint = AAZStrType() _element.endpoint_type = AAZStrType( serialized_name="endpointType", ) _element.schema_version = AAZStrType( serialized_name="schemaVersion", ) notifications = cls._schema_on_200.value.Element.properties.notifications notifications.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.notifications.Element _element.notification_type = AAZStrType( serialized_name="notificationType", ) _element.skip_notifications = AAZStrType( serialized_name="skipNotifications", ) optional_features = cls._schema_on_200.value.Element.properties.optional_features optional_features.Element = AAZStrType() private_resource_provider_configuration = cls._schema_on_200.value.Element.properties.private_resource_provider_configuration private_resource_provider_configuration.allowed_subscriptions = AAZListType( serialized_name="allowedSubscriptions", ) allowed_subscriptions = cls._schema_on_200.value.Element.properties.private_resource_provider_configuration.allowed_subscriptions allowed_subscriptions.Element = AAZStrType() provider_authentication = cls._schema_on_200.value.Element.properties.provider_authentication provider_authentication.allowed_audiences = AAZListType( serialized_name="allowedAudiences", flags={"required": True}, ) allowed_audiences = cls._schema_on_200.value.Element.properties.provider_authentication.allowed_audiences allowed_audiences.Element = AAZStrType() provider_authorizations = cls._schema_on_200.value.Element.properties.provider_authorizations provider_authorizations.Element = AAZObjectType() _ListHelper._build_schema_resource_provider_authorization_read( provider_authorizations.Element) provider_hub_metadata = cls._schema_on_200.value.Element.properties.provider_hub_metadata provider_hub_metadata.direct_rp_role_definition_id = AAZStrType( serialized_name="directRpRoleDefinitionId", ) provider_hub_metadata.global_async_operation_resource_type_name = AAZStrType( serialized_name="globalAsyncOperationResourceTypeName", ) provider_hub_metadata.provider_authentication = AAZObjectType( serialized_name="providerAuthentication", ) provider_hub_metadata.provider_authorizations = AAZListType( serialized_name="providerAuthorizations", ) provider_hub_metadata.regional_async_operation_resource_type_name = AAZStrType( serialized_name="regionalAsyncOperationResourceTypeName", ) provider_hub_metadata.third_party_provider_authorization = AAZObjectType( serialized_name="thirdPartyProviderAuthorization", ) provider_authentication = cls._schema_on_200.value.Element.properties.provider_hub_metadata.provider_authentication provider_authentication.allowed_audiences = AAZListType( serialized_name="allowedAudiences", flags={"required": True}, ) allowed_audiences = cls._schema_on_200.value.Element.properties.provider_hub_metadata.provider_authentication.allowed_audiences allowed_audiences.Element = AAZStrType() provider_authorizations = cls._schema_on_200.value.Element.properties.provider_hub_metadata.provider_authorizations provider_authorizations.Element = AAZObjectType() _ListHelper._build_schema_resource_provider_authorization_read( provider_authorizations.Element) third_party_provider_authorization = cls._schema_on_200.value.Element.properties.provider_hub_metadata.third_party_provider_authorization third_party_provider_authorization.authorizations = AAZListType() third_party_provider_authorization.managed_by_tenant_id = AAZStrType( serialized_name="managedByTenantId", ) authorizations = cls._schema_on_200.value.Element.properties.provider_hub_metadata.third_party_provider_authorization.authorizations authorizations.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.provider_hub_metadata.third_party_provider_authorization.authorizations.Element _element.principal_id = AAZStrType( serialized_name="principalId", flags={"required": True}, ) _element.role_definition_id = AAZStrType( serialized_name="roleDefinitionId", flags={"required": True}, ) request_header_options = cls._schema_on_200.value.Element.properties.request_header_options request_header_options.opt_in_headers = AAZStrType( serialized_name="optInHeaders", ) request_header_options.opt_out_headers = AAZStrType( serialized_name="optOutHeaders", ) required_features = cls._schema_on_200.value.Element.properties.required_features required_features.Element = AAZStrType() resource_group_lock_option_during_move = cls._schema_on_200.value.Element.properties.resource_group_lock_option_during_move resource_group_lock_option_during_move.block_action_verb = AAZStrType( serialized_name="blockActionVerb", ) resource_hydration_accounts = cls._schema_on_200.value.Element.properties.resource_hydration_accounts resource_hydration_accounts.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.resource_hydration_accounts.Element _element.account_name = AAZStrType( serialized_name="accountName", ) _element.encrypted_key = AAZStrType( serialized_name="encryptedKey", ) _element.max_child_resource_consistency_job_limit = AAZIntType( serialized_name="maxChildResourceConsistencyJobLimit", ) _element.subscription_id = AAZStrType( serialized_name="subscriptionId", ) resource_provider_authorization_rules = cls._schema_on_200.value.Element.properties.resource_provider_authorization_rules resource_provider_authorization_rules.async_operation_polling_rules = AAZObjectType( serialized_name="asyncOperationPollingRules", ) async_operation_polling_rules = cls._schema_on_200.value.Element.properties.resource_provider_authorization_rules.async_operation_polling_rules async_operation_polling_rules.additional_options = AAZStrType( serialized_name="additionalOptions", ) async_operation_polling_rules.authorization_actions = AAZListType( serialized_name="authorizationActions", ) authorization_actions = cls._schema_on_200.value.Element.properties.resource_provider_authorization_rules.async_operation_polling_rules.authorization_actions authorization_actions.Element = AAZStrType() response_options = cls._schema_on_200.value.Element.properties.response_options response_options.service_client_options_type = AAZStrType( serialized_name="serviceClientOptionsType", ) services = cls._schema_on_200.value.Element.properties.services services.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.services.Element _element.service_name = AAZStrType( serialized_name="serviceName", ) _element.status = AAZStrType() subscription_lifecycle_notification_specifications = cls._schema_on_200.value.Element.properties.subscription_lifecycle_notification_specifications subscription_lifecycle_notification_specifications.soft_delete_ttl = AAZStrType( serialized_name="softDeleteTTL", ) subscription_lifecycle_notification_specifications.subscription_state_override_actions = AAZListType( serialized_name="subscriptionStateOverrideActions", ) subscription_state_override_actions = cls._schema_on_200.value.Element.properties.subscription_lifecycle_notification_specifications.subscription_state_override_actions subscription_state_override_actions.Element = AAZObjectType() _element = cls._schema_on_200.value.Element.properties.subscription_lifecycle_notification_specifications.subscription_state_override_actions.Element _element.action = AAZStrType( flags={"required": True}, ) _element.state = AAZStrType( flags={"required": True}, ) template_deployment_options = cls._schema_on_200.value.Element.properties.template_deployment_options template_deployment_options.preflight_options = AAZListType( serialized_name="preflightOptions", ) template_deployment_options.preflight_supported = AAZBoolType( serialized_name="preflightSupported", ) preflight_options = cls._schema_on_200.value.Element.properties.template_deployment_options.preflight_options preflight_options.Element = AAZStrType() system_data = cls._schema_on_200.value.Element.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", ) system_data.created_by = AAZStrType( serialized_name="createdBy", ) system_data.created_by_type = AAZStrType( serialized_name="createdByType", ) system_data.last_modified_at = AAZStrType( serialized_name="lastModifiedAt", ) system_data.last_modified_by = AAZStrType( serialized_name="lastModifiedBy", ) system_data.last_modified_by_type = AAZStrType( serialized_name="lastModifiedByType", ) return cls._schema_on_200
class ProviderRegistrationsList(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
66
8
57
0
1
0
1
1
1
0
8
0
9
9
610
83
527
77
510
0
270
70
260
2
1
1
11
10,299
Azure/azure-cli-extensions
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/providerhub/azext_providerhub/aaz/latest/providerhub/provider_registration/_generate_operation.py
azext_providerhub.aaz.latest.providerhub.provider_registration._generate_operation.GenerateOperation.ProviderRegistrationsGenerateOperations
class ProviderRegistrationsGenerateOperations(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): request = self.make_request() session = self.client.send_request( request=request, stream=False, **kwargs) if session.http_response.status_code in [200]: return self.on_200(session) return self.on_error(session.http_response) @property def url(self): return self.client.format_url( "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/generateOperations", **self.url_parameters ) @property def method(self): return "POST" @property def error_format(self): return "MgmtErrorFormat" @property def url_parameters(self): parameters = { **self.serialize_url_param( "providerNamespace", self.ctx.args.provider_namespace, required=True, ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, ), } return parameters @property def query_parameters(self): parameters = { **self.serialize_query_param( "api-version", "2024-04-01-preview", required=True, ), } return parameters @property def header_parameters(self): parameters = { **self.serialize_header_param( "Accept", "application/json", ), } return parameters def on_200(self, session): data = self.deserialize_http_content(session) self.ctx.set_var( "instance", data, schema_builder=self._build_schema_on_200 ) _schema_on_200 = None @classmethod def _build_schema_on_200(cls): if cls._schema_on_200 is not None: return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 _schema_on_200.contents = AAZListType() _schema_on_200.id = AAZStrType( flags={"read_only": True}, ) _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) _schema_on_200.type = AAZStrType( flags={"read_only": True}, ) contents = cls._schema_on_200.contents contents.Element = AAZObjectType() _element = cls._schema_on_200.contents.Element _element.action_type = AAZStrType( serialized_name="actionType", ) _element.display = AAZObjectType( flags={"required": True}, ) _element.is_data_action = AAZBoolType( serialized_name="isDataAction", ) _element.name = AAZStrType( flags={"required": True}, ) _element.origin = AAZStrType() display = cls._schema_on_200.contents.Element.display display.description = AAZStrType( flags={"required": True}, ) display.operation = AAZStrType( flags={"required": True}, ) display.provider = AAZStrType( flags={"required": True}, ) display.resource = AAZStrType( flags={"required": True}, ) return cls._schema_on_200
class ProviderRegistrationsGenerateOperations(AAZHttpOperation): def __call__(self, *args, **kwargs): pass @property def url(self): pass @property def method(self): pass @property def error_format(self): pass @property def url_parameters(self): pass @property def query_parameters(self): pass @property def header_parameters(self): pass def on_200(self, session): pass @classmethod def _build_schema_on_200(cls): pass
17
0
11
1
10
0
1
0
1
0
0
0
8
0
9
9
121
17
104
29
87
0
50
22
40
2
1
1
11