Skip to content

Commit

Permalink
CodeGen from PR 24020 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
ViewPropertiesUpdate (Azure#24020)
  • Loading branch information
SDKAuto committed May 22, 2023
1 parent 97e27a1 commit 0c60817
Show file tree
Hide file tree
Showing 221 changed files with 7,150 additions and 2,205 deletions.
6 changes: 3 additions & 3 deletions sdk/costmanagement/azure-mgmt-costmanagement/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "e77f2f011a17a05457e14a0e78b10c100337a557",
"commit": "a9c6594b909c2859a89b9e41fb09c234e1aa6324",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/python@6.2.1",
"@autorest/python@6.4.12",
"@autorest/[email protected]"
],
"autorest_command": "autorest specification/cost-management/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.2.1 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
"autorest_command": "autorest specification/cost-management/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.4.12 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
"readme": "specification/cost-management/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

try:
from ._patch import __all__ as _patch_all
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
from ._patch import * # pylint: disable=unused-wildcard-import
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

import sys
from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
Expand All @@ -15,11 +14,6 @@

from ._version import VERSION

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential
Expand All @@ -33,14 +27,14 @@ class CostManagementClientConfiguration(Configuration): # pylint: disable=too-m
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:keyword api_version: Api Version. Default value is "2022-10-01". Note that overriding this
:keyword api_version: Api Version. Default value is "2023-03-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "TokenCredential", **kwargs: Any) -> None:
super(CostManagementClientConfiguration, self).__init__(**kwargs)
api_version = kwargs.pop("api_version", "2022-10-01") # type: Literal["2022-10-01"]
api_version: str = kwargs.pop("api_version", "2023-03-01")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand All @@ -51,10 +45,7 @@ def __init__(self, credential: "TokenCredential", **kwargs: Any) -> None:
kwargs.setdefault("sdk_moniker", "mgmt-costmanagement/{}".format(VERSION))
self._configure(**kwargs)

def _configure(
self, **kwargs # type: Any
):
# type: (...) -> None
def _configure(self, **kwargs: Any) -> None:
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
from azure.core.rest import HttpRequest, HttpResponse
from azure.mgmt.core import ARMPipelineClient

from . import models
from . import models as _models
from ._configuration import CostManagementClientConfiguration
from ._serialization import Deserializer, Serializer
from .operations import (
AlertsOperations,
BenefitRecommendationsOperations,
BenefitUtilizationSummariesOperations,
BillingAccountScopeOperations,
BillingProfileScopeOperations,
DimensionsOperations,
ExportsOperations,
ForecastOperations,
Expand All @@ -30,6 +32,10 @@
Operations,
PriceSheetOperations,
QueryOperations,
ReservationOrderScopeOperations,
ReservationScopeOperations,
SavingsPlanOrderScopeOperations,
SavingsPlanScopeOperations,
ScheduledActionsOperations,
ViewsOperations,
)
Expand All @@ -45,20 +51,28 @@ class CostManagementClient: # pylint: disable=client-accepts-api-version-keywor
:ivar operations: Operations operations
:vartype operations: azure.mgmt.costmanagement.operations.Operations
:ivar views: ViewsOperations operations
:vartype views: azure.mgmt.costmanagement.operations.ViewsOperations
:ivar alerts: AlertsOperations operations
:vartype alerts: azure.mgmt.costmanagement.operations.AlertsOperations
:ivar forecast: ForecastOperations operations
:vartype forecast: azure.mgmt.costmanagement.operations.ForecastOperations
:ivar dimensions: DimensionsOperations operations
:vartype dimensions: azure.mgmt.costmanagement.operations.DimensionsOperations
:ivar query: QueryOperations operations
:vartype query: azure.mgmt.costmanagement.operations.QueryOperations
:ivar generate_reservation_details_report: GenerateReservationDetailsReportOperations
operations
:vartype generate_reservation_details_report:
azure.mgmt.costmanagement.operations.GenerateReservationDetailsReportOperations
:ivar benefit_recommendations: BenefitRecommendationsOperations operations
:vartype benefit_recommendations:
azure.mgmt.costmanagement.operations.BenefitRecommendationsOperations
:ivar benefit_utilization_summaries: BenefitUtilizationSummariesOperations operations
:vartype benefit_utilization_summaries:
azure.mgmt.costmanagement.operations.BenefitUtilizationSummariesOperations
:ivar billing_account_scope: BillingAccountScopeOperations operations
:vartype billing_account_scope:
azure.mgmt.costmanagement.operations.BillingAccountScopeOperations
:ivar billing_profile_scope: BillingProfileScopeOperations operations
:vartype billing_profile_scope:
azure.mgmt.costmanagement.operations.BillingProfileScopeOperations
:ivar reservation_order_scope: ReservationOrderScopeOperations operations
:vartype reservation_order_scope:
azure.mgmt.costmanagement.operations.ReservationOrderScopeOperations
:ivar reservation_scope: ReservationScopeOperations operations
:vartype reservation_scope: azure.mgmt.costmanagement.operations.ReservationScopeOperations
:ivar savings_plan_order_scope: SavingsPlanOrderScopeOperations operations
:vartype savings_plan_order_scope:
azure.mgmt.costmanagement.operations.SavingsPlanOrderScopeOperations
:ivar savings_plan_scope: SavingsPlanScopeOperations operations
:vartype savings_plan_scope: azure.mgmt.costmanagement.operations.SavingsPlanScopeOperations
:ivar exports: ExportsOperations operations
:vartype exports: azure.mgmt.costmanagement.operations.ExportsOperations
:ivar generate_cost_details_report: GenerateCostDetailsReportOperations operations
Expand All @@ -75,21 +89,29 @@ class CostManagementClient: # pylint: disable=client-accepts-api-version-keywor
GenerateDetailedCostReportOperationStatusOperations operations
:vartype generate_detailed_cost_report_operation_status:
azure.mgmt.costmanagement.operations.GenerateDetailedCostReportOperationStatusOperations
:ivar views: ViewsOperations operations
:vartype views: azure.mgmt.costmanagement.operations.ViewsOperations
:ivar alerts: AlertsOperations operations
:vartype alerts: azure.mgmt.costmanagement.operations.AlertsOperations
:ivar forecast: ForecastOperations operations
:vartype forecast: azure.mgmt.costmanagement.operations.ForecastOperations
:ivar dimensions: DimensionsOperations operations
:vartype dimensions: azure.mgmt.costmanagement.operations.DimensionsOperations
:ivar query: QueryOperations operations
:vartype query: azure.mgmt.costmanagement.operations.QueryOperations
:ivar generate_reservation_details_report: GenerateReservationDetailsReportOperations
operations
:vartype generate_reservation_details_report:
azure.mgmt.costmanagement.operations.GenerateReservationDetailsReportOperations
:ivar price_sheet: PriceSheetOperations operations
:vartype price_sheet: azure.mgmt.costmanagement.operations.PriceSheetOperations
:ivar scheduled_actions: ScheduledActionsOperations operations
:vartype scheduled_actions: azure.mgmt.costmanagement.operations.ScheduledActionsOperations
:ivar benefit_recommendations: BenefitRecommendationsOperations operations
:vartype benefit_recommendations:
azure.mgmt.costmanagement.operations.BenefitRecommendationsOperations
:ivar benefit_utilization_summaries: BenefitUtilizationSummariesOperations operations
:vartype benefit_utilization_summaries:
azure.mgmt.costmanagement.operations.BenefitUtilizationSummariesOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2022-10-01". Note that overriding this
:keyword api_version: Api Version. Default value is "2023-03-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Expand All @@ -100,19 +122,35 @@ def __init__(
self, credential: "TokenCredential", base_url: str = "https://management.azure.com", **kwargs: Any
) -> None:
self._config = CostManagementClientConfiguration(credential=credential, **kwargs)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.views = ViewsOperations(self._client, self._config, self._serialize, self._deserialize)
self.alerts = AlertsOperations(self._client, self._config, self._serialize, self._deserialize)
self.forecast = ForecastOperations(self._client, self._config, self._serialize, self._deserialize)
self.dimensions = DimensionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.query = QueryOperations(self._client, self._config, self._serialize, self._deserialize)
self.generate_reservation_details_report = GenerateReservationDetailsReportOperations(
self.benefit_recommendations = BenefitRecommendationsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.benefit_utilization_summaries = BenefitUtilizationSummariesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.billing_account_scope = BillingAccountScopeOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.billing_profile_scope = BillingProfileScopeOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.reservation_order_scope = ReservationOrderScopeOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.reservation_scope = ReservationScopeOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.savings_plan_order_scope = SavingsPlanOrderScopeOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.savings_plan_scope = SavingsPlanScopeOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.exports = ExportsOperations(self._client, self._config, self._serialize, self._deserialize)
Expand All @@ -128,14 +166,16 @@ def __init__(
self.generate_detailed_cost_report_operation_status = GenerateDetailedCostReportOperationStatusOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.price_sheet = PriceSheetOperations(self._client, self._config, self._serialize, self._deserialize)
self.scheduled_actions = ScheduledActionsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.benefit_recommendations = BenefitRecommendationsOperations(
self.views = ViewsOperations(self._client, self._config, self._serialize, self._deserialize)
self.alerts = AlertsOperations(self._client, self._config, self._serialize, self._deserialize)
self.forecast = ForecastOperations(self._client, self._config, self._serialize, self._deserialize)
self.dimensions = DimensionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.query = QueryOperations(self._client, self._config, self._serialize, self._deserialize)
self.generate_reservation_details_report = GenerateReservationDetailsReportOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.benefit_utilization_summaries = BenefitUtilizationSummariesOperations(
self.price_sheet = PriceSheetOperations(self._client, self._config, self._serialize, self._deserialize)
self.scheduled_actions = ScheduledActionsOperations(
self._client, self._config, self._serialize, self._deserialize
)

Expand All @@ -161,15 +201,12 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
request_copy.url = self._client.format_url(request_copy.url)
return self._client.send_request(request_copy, **kwargs)

def close(self):
# type: () -> None
def close(self) -> None:
self._client.close()

def __enter__(self):
# type: () -> CostManagementClient
def __enter__(self) -> "CostManagementClient":
self._client.__enter__()
return self

def __exit__(self, *exc_details):
# type: (Any) -> None
def __exit__(self, *exc_details: Any) -> None:
self._client.__exit__(*exc_details)
Loading

0 comments on commit 0c60817

Please sign in to comment.