Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR track2_azure-mgmt-resource] Update Operation ID for Microsoft.Resources/changes for docs #87

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sdk/resources/azure-mgmt-resource/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"@autorest/[email protected]",
"@autorest/[email protected]"
],
"commit": "7541a993a77afbb3ef49f9b0b93b537af093e8da",
"commit": "d96cc3b17a5c9867b072dc737bf0a388fc445d13",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/resources/resource-manager/readme.md --multiapi --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.7.2",
"autorest_command": "autorest specification/resources/resource-manager/readme.md --multiapi --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --python3-only --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.7.2",
"readme": "specification/resources/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -96,29 +96,16 @@ def models(cls, api_version=DEFAULT_API_VERSION):
raise ValueError("API version {} is not available".format(api_version))

@property
def change_resource(self):
def changes(self):
"""Instance depends on the API version:

* 2022-03-01-preview: :class:`ChangeResourceOperations<azure.mgmt.resource.changes.v2022_03_01_preview.operations.ChangeResourceOperations>`
* 2022-03-01-preview: :class:`ChangesOperations<azure.mgmt.resource.changes.v2022_03_01_preview.operations.ChangesOperations>`
"""
api_version = self._get_api_version('change_resource')
api_version = self._get_api_version('changes')
if api_version == '2022-03-01-preview':
from .v2022_03_01_preview.operations import ChangeResourceOperations as OperationClass
from .v2022_03_01_preview.operations import ChangesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'change_resource'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def change_resources(self):
"""Instance depends on the API version:

* 2022-03-01-preview: :class:`ChangeResourcesOperations<azure.mgmt.resource.changes.v2022_03_01_preview.operations.ChangeResourcesOperations>`
"""
api_version = self._get_api_version('change_resources')
if api_version == '2022-03-01-preview':
from .v2022_03_01_preview.operations import ChangeResourcesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'change_resources'".format(api_version))
raise ValueError("API version {} does not have operation group 'changes'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

def close(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,29 +95,16 @@ def models(cls, api_version=DEFAULT_API_VERSION):
raise ValueError("API version {} is not available".format(api_version))

@property
def change_resource(self):
def changes(self):
"""Instance depends on the API version:

* 2022-03-01-preview: :class:`ChangeResourceOperations<azure.mgmt.resource.changes.v2022_03_01_preview.aio.operations.ChangeResourceOperations>`
* 2022-03-01-preview: :class:`ChangesOperations<azure.mgmt.resource.changes.v2022_03_01_preview.aio.operations.ChangesOperations>`
"""
api_version = self._get_api_version('change_resource')
api_version = self._get_api_version('changes')
if api_version == '2022-03-01-preview':
from ..v2022_03_01_preview.aio.operations import ChangeResourceOperations as OperationClass
from ..v2022_03_01_preview.aio.operations import ChangesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'change_resource'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def change_resources(self):
"""Instance depends on the API version:

* 2022-03-01-preview: :class:`ChangeResourcesOperations<azure.mgmt.resource.changes.v2022_03_01_preview.aio.operations.ChangeResourcesOperations>`
"""
api_version = self._get_api_version('change_resources')
if api_version == '2022-03-01-preview':
from ..v2022_03_01_preview.aio.operations import ChangeResourcesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'change_resources'".format(api_version))
raise ValueError("API version {} does not have operation group 'changes'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

async def close(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from . import models
from ._configuration import ChangesClientConfiguration
from .operations import ChangeResourceOperations, ChangeResourcesOperations
from .operations import ChangesOperations

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
Expand All @@ -25,12 +25,8 @@
class ChangesClient:
"""The Resource Changes Client.

:ivar change_resources: ChangeResourcesOperations operations
:vartype change_resources:
azure.mgmt.resource.changes.v2022_03_01_preview.operations.ChangeResourcesOperations
:ivar change_resource: ChangeResourceOperations operations
:vartype change_resource:
azure.mgmt.resource.changes.v2022_03_01_preview.operations.ChangeResourceOperations
:ivar changes: ChangesOperations operations
:vartype changes: azure.mgmt.resource.changes.v2022_03_01_preview.operations.ChangesOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The Azure subscription ID. This is a GUID-formatted string (e.g.
Expand All @@ -57,8 +53,7 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.change_resources = ChangeResourcesOperations(self._client, self._config, self._serialize, self._deserialize)
self.change_resource = ChangeResourceOperations(self._client, self._config, self._serialize, self._deserialize)
self.changes = ChangesOperations(self._client, self._config, self._serialize, self._deserialize)


def _send_request(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\", \"AsyncARMChallengeAuthenticationPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
},
"operation_groups": {
"change_resources": "ChangeResourcesOperations",
"change_resource": "ChangeResourceOperations"
"changes": "ChangesOperations"
}
}
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 = "21.1.0b1"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from .. import models
from ._configuration import ChangesClientConfiguration
from .operations import ChangeResourceOperations, ChangeResourcesOperations
from .operations import ChangesOperations

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
Expand All @@ -25,12 +25,9 @@
class ChangesClient:
"""The Resource Changes Client.

:ivar change_resources: ChangeResourcesOperations operations
:vartype change_resources:
azure.mgmt.resource.changes.v2022_03_01_preview.aio.operations.ChangeResourcesOperations
:ivar change_resource: ChangeResourceOperations operations
:vartype change_resource:
azure.mgmt.resource.changes.v2022_03_01_preview.aio.operations.ChangeResourceOperations
:ivar changes: ChangesOperations operations
:vartype changes:
azure.mgmt.resource.changes.v2022_03_01_preview.aio.operations.ChangesOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The Azure subscription ID. This is a GUID-formatted string (e.g.
Expand All @@ -57,8 +54,7 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.change_resources = ChangeResourcesOperations(self._client, self._config, self._serialize, self._deserialize)
self.change_resource = ChangeResourceOperations(self._client, self._config, self._serialize, self._deserialize)
self.changes = ChangesOperations(self._client, self._config, self._serialize, self._deserialize)


def _send_request(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._operations import ChangeResourcesOperations
from ._operations import ChangeResourceOperations
from ._operations import ChangesOperations

__all__ = [
'ChangeResourcesOperations',
'ChangeResourceOperations',
'ChangesOperations',
]
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@

from ... import models as _models
from ..._vendor import _convert_request
from ...operations._operations import build_change_resource_get_request, build_change_resources_list_request
from ...operations._operations import build_changes_get_request, build_changes_list_request
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

class ChangeResourcesOperations:
"""ChangeResourcesOperations async operations.
class ChangesOperations:
"""ChangesOperations async operations.

You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
Expand Down Expand Up @@ -87,7 +87,7 @@ def list(
def prepare_request(next_link=None):
if not next_link:

request = build_change_resources_list_request(
request = build_changes_list_request(
subscription_id=self._config.subscription_id,
resource_group_name=resource_group_name,
resource_provider_namespace=resource_provider_namespace,
Expand All @@ -103,7 +103,7 @@ def prepare_request(next_link=None):

else:

request = build_change_resources_list_request(
request = build_changes_list_request(
subscription_id=self._config.subscription_id,
resource_group_name=resource_group_name,
resource_provider_namespace=resource_provider_namespace,
Expand Down Expand Up @@ -145,27 +145,6 @@ async def get_next(next_link=None):
get_next, extract_data
)
list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Resources/changes"} # type: ignore
class ChangeResourceOperations:
"""ChangeResourceOperations async operations.

You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.

:ivar models: Alias to model classes used in this operation group.
:type models: ~azure.mgmt.resource.changes.v2022_03_01_preview.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
"""

models = _models

def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self._config = config

@distributed_trace_async
async def get(
Expand Down Expand Up @@ -203,7 +182,7 @@ async def get(
api_version = kwargs.pop('api_version', "2022-03-01-preview") # type: str


request = build_change_resource_get_request(
request = build_changes_get_request(
subscription_id=self._config.subscription_id,
resource_group_name=resource_group_name,
resource_provider_namespace=resource_provider_namespace,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._operations import ChangeResourcesOperations
from ._operations import ChangeResourceOperations
from ._operations import ChangesOperations

__all__ = [
'ChangeResourcesOperations',
'ChangeResourceOperations',
'ChangesOperations',
]
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
_SERIALIZER = Serializer()
_SERIALIZER.client_side_validation = False

def build_change_resources_list_request(
def build_changes_list_request(
subscription_id: str,
resource_group_name: str,
resource_provider_namespace: str,
Expand Down Expand Up @@ -73,7 +73,7 @@ def build_change_resources_list_request(
)


def build_change_resource_get_request(
def build_changes_get_request(
subscription_id: str,
resource_group_name: str,
resource_provider_namespace: str,
Expand Down Expand Up @@ -114,8 +114,8 @@ def build_change_resource_get_request(
**kwargs
)

class ChangeResourcesOperations(object):
"""ChangeResourcesOperations operations.
class ChangesOperations(object):
"""ChangesOperations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
Expand Down Expand Up @@ -178,7 +178,7 @@ def list(
def prepare_request(next_link=None):
if not next_link:

request = build_change_resources_list_request(
request = build_changes_list_request(
subscription_id=self._config.subscription_id,
resource_group_name=resource_group_name,
resource_provider_namespace=resource_provider_namespace,
Expand All @@ -194,7 +194,7 @@ def prepare_request(next_link=None):

else:

request = build_change_resources_list_request(
request = build_changes_list_request(
subscription_id=self._config.subscription_id,
resource_group_name=resource_group_name,
resource_provider_namespace=resource_provider_namespace,
Expand Down Expand Up @@ -236,27 +236,6 @@ def get_next(next_link=None):
get_next, extract_data
)
list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Resources/changes"} # type: ignore
class ChangeResourceOperations(object):
"""ChangeResourceOperations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.

:ivar models: Alias to model classes used in this operation group.
:type models: ~azure.mgmt.resource.changes.v2022_03_01_preview.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
"""

models = _models

def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self._config = config

@distributed_trace
def get(
Expand Down Expand Up @@ -294,7 +273,7 @@ def get(
api_version = kwargs.pop('api_version', "2022-03-01-preview") # type: str


request = build_change_resource_get_request(
request = build_changes_get_request(
subscription_id=self._config.subscription_id,
resource_group_name=resource_group_name,
resource_provider_namespace=resource_provider_namespace,
Expand Down
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 = "21.1.0b1"
VERSION = "1.0.0b1"
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 = "21.1.0b1"
VERSION = "1.0.0b1"
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 = "21.1.0b1"
VERSION = "1.0.0b1"
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 = "21.1.0b1"
VERSION = "1.0.0b1"
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 = "21.1.0b1"
VERSION = "1.0.0b1"
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 = "21.1.0b1"
VERSION = "1.0.0b1"
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 = "21.1.0b1"
VERSION = "1.0.0b1"
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 = "21.1.0b1"
VERSION = "1.0.0b1"
Loading