Skip to content

Commit

Permalink
CodeGen from PR 16886 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge c00e5ce96ae9732e967d50cb3c6e1e73e5abf34e into 37d6907
  • Loading branch information
SDKAuto committed Nov 26, 2021
1 parent a479ea8 commit 6eccb1f
Show file tree
Hide file tree
Showing 37 changed files with 2,253 additions and 2,225 deletions.
2 changes: 1 addition & 1 deletion sdk/costmanagement/azure-mgmt-costmanagement/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"@autorest/[email protected]",
"@autorest/[email protected]"
],
"commit": "74efe54fbc55c91a1d9213afbb2723747acfddf9",
"commit": "2c59c559d6804068f72b8ead08d287c4f6e48fc0",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/cost-management/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.4.5",
"readme": "specification/cost-management/resource-manager/readme.md"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(
super(CostManagementClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.api_version = "2019-11-01"
self.api_version = "2021-10-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-costmanagement/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,30 @@
from azure.core.pipeline.transport import HttpRequest, HttpResponse

from ._configuration import CostManagementClientConfiguration
from .operations import SettingsOperations
from .operations import ExportsOperations
from .operations import GenerateDetailedCostReportOperations
from .operations import GenerateDetailedCostReportOperationResultsOperations
from .operations import GenerateDetailedCostReportOperationStatusOperations
from .operations import ViewsOperations
from .operations import AlertsOperations
from .operations import ForecastOperations
from .operations import DimensionsOperations
from .operations import QueryOperations
from .operations import GenerateReservationDetailsReportOperations
from .operations import Operations
from .operations import ExportsOperations
from . import models


class CostManagementClient(object):
"""CostManagementClient.
:ivar settings: SettingsOperations operations
:vartype settings: azure.mgmt.costmanagement.operations.SettingsOperations
:ivar exports: ExportsOperations operations
:vartype exports: azure.mgmt.costmanagement.operations.ExportsOperations
:ivar generate_detailed_cost_report: GenerateDetailedCostReportOperations operations
:vartype generate_detailed_cost_report: azure.mgmt.costmanagement.operations.GenerateDetailedCostReportOperations
:ivar generate_detailed_cost_report_operation_results: GenerateDetailedCostReportOperationResultsOperations operations
:vartype generate_detailed_cost_report_operation_results: azure.mgmt.costmanagement.operations.GenerateDetailedCostReportOperationResultsOperations
:ivar generate_detailed_cost_report_operation_status: 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
Expand All @@ -46,12 +53,8 @@ class CostManagementClient(object):
: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 operations: Operations operations
:vartype operations: azure.mgmt.costmanagement.operations.Operations
:ivar exports: ExportsOperations operations
:vartype exports: azure.mgmt.costmanagement.operations.ExportsOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param str base_url: Service URL
Expand All @@ -75,7 +78,13 @@ def __init__(
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.settings = SettingsOperations(
self.exports = ExportsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.generate_detailed_cost_report = GenerateDetailedCostReportOperations(
self._client, self._config, self._serialize, self._deserialize)
self.generate_detailed_cost_report_operation_results = GenerateDetailedCostReportOperationResultsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.generate_detailed_cost_report_operation_status = GenerateDetailedCostReportOperationStatusOperations(
self._client, self._config, self._serialize, self._deserialize)
self.views = ViewsOperations(
self._client, self._config, self._serialize, self._deserialize)
Expand All @@ -87,12 +96,8 @@ def __init__(
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.operations = Operations(
self._client, self._config, self._serialize, self._deserialize)
self.exports = ExportsOperations(
self._client, self._config, self._serialize, self._deserialize)

def _send_request(self, http_request, **kwargs):
# type: (HttpRequest, Any) -> HttpResponse
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"chosen_version": "2019-11-01",
"total_api_version_list": ["2019-11-01"],
"chosen_version": "2021-10-01",
"total_api_version_list": ["2021-10-01"],
"client": {
"name": "CostManagementClient",
"filename": "_cost_management_client",
Expand Down Expand Up @@ -86,14 +86,15 @@
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
},
"operation_groups": {
"settings": "SettingsOperations",
"exports": "ExportsOperations",
"generate_detailed_cost_report": "GenerateDetailedCostReportOperations",
"generate_detailed_cost_report_operation_results": "GenerateDetailedCostReportOperationResultsOperations",
"generate_detailed_cost_report_operation_status": "GenerateDetailedCostReportOperationStatusOperations",
"views": "ViewsOperations",
"alerts": "AlertsOperations",
"forecast": "ForecastOperations",
"dimensions": "DimensionsOperations",
"query": "QueryOperations",
"generate_reservation_details_report": "GenerateReservationDetailsReportOperations",
"operations": "Operations",
"exports": "ExportsOperations"
"operations": "Operations"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "3.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __init__(
super(CostManagementClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.api_version = "2019-11-01"
self.api_version = "2021-10-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-costmanagement/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,30 @@
from azure.core.credentials_async import AsyncTokenCredential

from ._configuration import CostManagementClientConfiguration
from .operations import SettingsOperations
from .operations import ExportsOperations
from .operations import GenerateDetailedCostReportOperations
from .operations import GenerateDetailedCostReportOperationResultsOperations
from .operations import GenerateDetailedCostReportOperationStatusOperations
from .operations import ViewsOperations
from .operations import AlertsOperations
from .operations import ForecastOperations
from .operations import DimensionsOperations
from .operations import QueryOperations
from .operations import GenerateReservationDetailsReportOperations
from .operations import Operations
from .operations import ExportsOperations
from .. import models


class CostManagementClient(object):
"""CostManagementClient.
:ivar settings: SettingsOperations operations
:vartype settings: azure.mgmt.costmanagement.aio.operations.SettingsOperations
:ivar exports: ExportsOperations operations
:vartype exports: azure.mgmt.costmanagement.aio.operations.ExportsOperations
:ivar generate_detailed_cost_report: GenerateDetailedCostReportOperations operations
:vartype generate_detailed_cost_report: azure.mgmt.costmanagement.aio.operations.GenerateDetailedCostReportOperations
:ivar generate_detailed_cost_report_operation_results: GenerateDetailedCostReportOperationResultsOperations operations
:vartype generate_detailed_cost_report_operation_results: azure.mgmt.costmanagement.aio.operations.GenerateDetailedCostReportOperationResultsOperations
:ivar generate_detailed_cost_report_operation_status: GenerateDetailedCostReportOperationStatusOperations operations
:vartype generate_detailed_cost_report_operation_status: azure.mgmt.costmanagement.aio.operations.GenerateDetailedCostReportOperationStatusOperations
:ivar views: ViewsOperations operations
:vartype views: azure.mgmt.costmanagement.aio.operations.ViewsOperations
:ivar alerts: AlertsOperations operations
Expand All @@ -44,12 +51,8 @@ class CostManagementClient(object):
:vartype dimensions: azure.mgmt.costmanagement.aio.operations.DimensionsOperations
:ivar query: QueryOperations operations
:vartype query: azure.mgmt.costmanagement.aio.operations.QueryOperations
:ivar generate_reservation_details_report: GenerateReservationDetailsReportOperations operations
:vartype generate_reservation_details_report: azure.mgmt.costmanagement.aio.operations.GenerateReservationDetailsReportOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.costmanagement.aio.operations.Operations
:ivar exports: ExportsOperations operations
:vartype exports: azure.mgmt.costmanagement.aio.operations.ExportsOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param str base_url: Service URL
Expand All @@ -72,7 +75,13 @@ def __init__(
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.settings = SettingsOperations(
self.exports = ExportsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.generate_detailed_cost_report = GenerateDetailedCostReportOperations(
self._client, self._config, self._serialize, self._deserialize)
self.generate_detailed_cost_report_operation_results = GenerateDetailedCostReportOperationResultsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.generate_detailed_cost_report_operation_status = GenerateDetailedCostReportOperationStatusOperations(
self._client, self._config, self._serialize, self._deserialize)
self.views = ViewsOperations(
self._client, self._config, self._serialize, self._deserialize)
Expand All @@ -84,12 +93,8 @@ def __init__(
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.operations = Operations(
self._client, self._config, self._serialize, self._deserialize)
self.exports = ExportsOperations(
self._client, self._config, self._serialize, self._deserialize)

async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
"""Runs the network request through the client's chained policies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,26 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._settings_operations import SettingsOperations
from ._exports_operations import ExportsOperations
from ._generate_detailed_cost_report_operations import GenerateDetailedCostReportOperations
from ._generate_detailed_cost_report_operation_results_operations import GenerateDetailedCostReportOperationResultsOperations
from ._generate_detailed_cost_report_operation_status_operations import GenerateDetailedCostReportOperationStatusOperations
from ._views_operations import ViewsOperations
from ._alerts_operations import AlertsOperations
from ._forecast_operations import ForecastOperations
from ._dimensions_operations import DimensionsOperations
from ._query_operations import QueryOperations
from ._generate_reservation_details_report_operations import GenerateReservationDetailsReportOperations
from ._operations import Operations
from ._exports_operations import ExportsOperations

__all__ = [
'SettingsOperations',
'ExportsOperations',
'GenerateDetailedCostReportOperations',
'GenerateDetailedCostReportOperationResultsOperations',
'GenerateDetailedCostReportOperationStatusOperations',
'ViewsOperations',
'AlertsOperations',
'ForecastOperations',
'DimensionsOperations',
'QueryOperations',
'GenerateReservationDetailsReportOperations',
'Operations',
'ExportsOperations',
]
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ async def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2019-11-01"
api_version = "2021-10-01"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -146,7 +146,7 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2019-11-01"
api_version = "2021-10-01"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -222,7 +222,7 @@ async def dismiss(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2019-11-01"
api_version = "2021-10-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -288,7 +288,7 @@ async def list_external(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2019-11-01"
api_version = "2021-10-01"
accept = "application/json"

# Construct URL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2019-11-01"
api_version = "2021-10-01"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down Expand Up @@ -191,7 +191,7 @@ def by_external_cloud_provider_type(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2019-11-01"
api_version = "2021-10-01"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down
Loading

0 comments on commit 6eccb1f

Please sign in to comment.