diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/_meta.json b/sdk/computeschedule/azure-mgmt-computeschedule/_meta.json index a6070dd43671..7e561a04e367 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/_meta.json +++ b/sdk/computeschedule/azure-mgmt-computeschedule/_meta.json @@ -1,6 +1,6 @@ { - "commit": "b6075dbc2321933382ea91c787ee62c6bdb87e5d", + "commit": "9e8e1c4fcb919939d2ace763df0ece20652eef05", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "typespec_src": "specification/computeschedule/ComputeSchedule.Management", - "@azure-tools/typespec-python": "0.37.3" + "@azure-tools/typespec-python": "0.40.0" } \ No newline at end of file diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/apiview-properties.json b/sdk/computeschedule/azure-mgmt-computeschedule/apiview-properties.json new file mode 100644 index 000000000000..8fbca3ed8b3b --- /dev/null +++ b/sdk/computeschedule/azure-mgmt-computeschedule/apiview-properties.json @@ -0,0 +1,50 @@ +{ + "CrossLanguagePackageId": "Microsoft.ComputeSchedule", + "CrossLanguageDefinitionId": { + "azure.mgmt.computeschedule.models.CancelOperationsRequest": "Microsoft.ComputeSchedule.CancelOperationsRequest", + "azure.mgmt.computeschedule.models.CancelOperationsResponse": "Microsoft.ComputeSchedule.CancelOperationsResponse", + "azure.mgmt.computeschedule.models.DeallocateResourceOperationResponse": "Microsoft.ComputeSchedule.DeallocateResourceOperationResponse", + "azure.mgmt.computeschedule.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "azure.mgmt.computeschedule.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "azure.mgmt.computeschedule.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "azure.mgmt.computeschedule.models.ExecuteDeallocateRequest": "Microsoft.ComputeSchedule.ExecuteDeallocateRequest", + "azure.mgmt.computeschedule.models.ExecuteHibernateRequest": "Microsoft.ComputeSchedule.ExecuteHibernateRequest", + "azure.mgmt.computeschedule.models.ExecuteStartRequest": "Microsoft.ComputeSchedule.ExecuteStartRequest", + "azure.mgmt.computeschedule.models.ExecutionParameters": "Microsoft.ComputeSchedule.ExecutionParameters", + "azure.mgmt.computeschedule.models.GetOperationErrorsRequest": "Microsoft.ComputeSchedule.GetOperationErrorsRequest", + "azure.mgmt.computeschedule.models.GetOperationErrorsResponse": "Microsoft.ComputeSchedule.GetOperationErrorsResponse", + "azure.mgmt.computeschedule.models.GetOperationStatusRequest": "Microsoft.ComputeSchedule.GetOperationStatusRequest", + "azure.mgmt.computeschedule.models.GetOperationStatusResponse": "Microsoft.ComputeSchedule.GetOperationStatusResponse", + "azure.mgmt.computeschedule.models.HibernateResourceOperationResponse": "Microsoft.ComputeSchedule.HibernateResourceOperationResponse", + "azure.mgmt.computeschedule.models.Operation": "Azure.ResourceManager.CommonTypes.Operation", + "azure.mgmt.computeschedule.models.OperationDisplay": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "azure.mgmt.computeschedule.models.OperationErrorDetails": "Microsoft.ComputeSchedule.OperationErrorDetails", + "azure.mgmt.computeschedule.models.OperationErrorsResult": "Microsoft.ComputeSchedule.OperationErrorsResult", + "azure.mgmt.computeschedule.models.ResourceOperation": "Microsoft.ComputeSchedule.ResourceOperation", + "azure.mgmt.computeschedule.models.ResourceOperationDetails": "Microsoft.ComputeSchedule.ResourceOperationDetails", + "azure.mgmt.computeschedule.models.ResourceOperationError": "Microsoft.ComputeSchedule.ResourceOperationError", + "azure.mgmt.computeschedule.models.Resources": "Microsoft.ComputeSchedule.Resources", + "azure.mgmt.computeschedule.models.RetryPolicy": "Microsoft.ComputeSchedule.RetryPolicy", + "azure.mgmt.computeschedule.models.Schedule": "Microsoft.ComputeSchedule.Schedule", + "azure.mgmt.computeschedule.models.StartResourceOperationResponse": "Microsoft.ComputeSchedule.StartResourceOperationResponse", + "azure.mgmt.computeschedule.models.SubmitDeallocateRequest": "Microsoft.ComputeSchedule.SubmitDeallocateRequest", + "azure.mgmt.computeschedule.models.SubmitHibernateRequest": "Microsoft.ComputeSchedule.SubmitHibernateRequest", + "azure.mgmt.computeschedule.models.SubmitStartRequest": "Microsoft.ComputeSchedule.SubmitStartRequest", + "azure.mgmt.computeschedule.models.Origin": "Azure.ResourceManager.CommonTypes.Origin", + "azure.mgmt.computeschedule.models.ActionType": "Azure.ResourceManager.CommonTypes.ActionType", + "azure.mgmt.computeschedule.models.ResourceOperationType": "Microsoft.ComputeSchedule.ResourceOperationType", + "azure.mgmt.computeschedule.models.DeadlineType": "Microsoft.ComputeSchedule.DeadlineType", + "azure.mgmt.computeschedule.models.OperationState": "Microsoft.ComputeSchedule.OperationState", + "azure.mgmt.computeschedule.models.OptimizationPreference": "Microsoft.ComputeSchedule.OptimizationPreference", + "azure.mgmt.computeschedule.ComputeScheduleMgmtClient.operations.list": "Azure.ResourceManager.Operations.list", + "azure.mgmt.computeschedule.ComputeScheduleMgmtClient.scheduled_actions.virtual_machines_submit_deallocate": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitDeallocate", + "azure.mgmt.computeschedule.ComputeScheduleMgmtClient.scheduled_actions.virtual_machines_submit_hibernate": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitHibernate", + "azure.mgmt.computeschedule.ComputeScheduleMgmtClient.scheduled_actions.virtual_machines_submit_start": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitStart", + "azure.mgmt.computeschedule.ComputeScheduleMgmtClient.scheduled_actions.virtual_machines_execute_deallocate": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDeallocate", + "azure.mgmt.computeschedule.ComputeScheduleMgmtClient.scheduled_actions.virtual_machines_execute_hibernate": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteHibernate", + "azure.mgmt.computeschedule.ComputeScheduleMgmtClient.scheduled_actions.virtual_machines_execute_start": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteStart", + "azure.mgmt.computeschedule.ComputeScheduleMgmtClient.scheduled_actions.virtual_machines_get_operation_status": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationStatus", + "azure.mgmt.computeschedule.ComputeScheduleMgmtClient.scheduled_actions.virtual_machines_cancel_operations": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesCancelOperations", + "azure.mgmt.computeschedule.ComputeScheduleMgmtClient.scheduled_actions.virtual_machines_get_operation_errors": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationErrors" + } +} \ No newline at end of file diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_model_base.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_model_base.py index 7f73b97b23ef..3072ee252ed9 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_model_base.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_model_base.py @@ -373,15 +373,34 @@ def __ne__(self, other: typing.Any) -> bool: return not self.__eq__(other) def keys(self) -> typing.KeysView[str]: + """ + :returns: a set-like object providing a view on D's keys + :rtype: ~typing.KeysView + """ return self._data.keys() def values(self) -> typing.ValuesView[typing.Any]: + """ + :returns: an object providing a view on D's values + :rtype: ~typing.ValuesView + """ return self._data.values() def items(self) -> typing.ItemsView[str, typing.Any]: + """ + :returns: set-like object providing a view on D's items + :rtype: ~typing.ItemsView + """ return self._data.items() def get(self, key: str, default: typing.Any = None) -> typing.Any: + """ + Get the value for key if key is in the dictionary, else default. + :param str key: The key to look up. + :param any default: The value to return if key is not in the dictionary. Defaults to None + :returns: D[k] if k in D, else d. + :rtype: any + """ try: return self[key] except KeyError: @@ -397,17 +416,38 @@ def pop(self, key: str, default: _T) -> _T: ... def pop(self, key: str, default: typing.Any) -> typing.Any: ... def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Removes specified key and return the corresponding value. + :param str key: The key to pop. + :param any default: The value to return if key is not in the dictionary + :returns: The value corresponding to the key. + :rtype: any + :raises KeyError: If key is not found and default is not given. + """ if default is _UNSET: return self._data.pop(key) return self._data.pop(key, default) def popitem(self) -> typing.Tuple[str, typing.Any]: + """ + Removes and returns some (key, value) pair + :returns: The (key, value) pair. + :rtype: tuple + :raises KeyError: if D is empty. + """ return self._data.popitem() def clear(self) -> None: + """ + Remove all items from D. + """ self._data.clear() def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: + """ + Updates D from mapping/iterable E and F. + :param any args: Either a mapping object or an iterable of key-value pairs. + """ self._data.update(*args, **kwargs) @typing.overload @@ -417,6 +457,13 @@ def setdefault(self, key: str, default: None = None) -> None: ... def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Same as calling D.get(k, d), and setting D[k]=d if k not found + :param str key: The key to look up. + :param any default: The value to set if key is not in the dictionary + :returns: D[k] if k in D, else d. + :rtype: any + """ if default is _UNSET: return self._data.setdefault(key) return self._data.setdefault(key, default) @@ -910,6 +957,19 @@ def _failsafe_deserialize( return None +def _failsafe_deserialize_xml( + deserializer: typing.Any, + value: typing.Any, +) -> typing.Any: + try: + return _deserialize_xml(deserializer, value) + except DeserializationError: + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + class _RestField: def __init__( self, diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_serialization.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_serialization.py index b24ab2885450..7a0232de5ddc 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_serialization.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_serialization.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. @@ -48,9 +48,7 @@ IO, Mapping, Callable, - TypeVar, MutableMapping, - Type, List, ) @@ -61,13 +59,13 @@ import xml.etree.ElementTree as ET import isodate # type: ignore +from typing_extensions import Self from azure.core.exceptions import DeserializationError, SerializationError from azure.core.serialization import NULL as CoreNull _BOM = codecs.BOM_UTF8.decode(encoding="utf-8") -ModelType = TypeVar("ModelType", bound="Model") JSON = MutableMapping[str, Any] @@ -185,73 +183,7 @@ def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], except NameError: _long_type = int - -class UTC(datetime.tzinfo): - """Time Zone info for handling UTC""" - - def utcoffset(self, dt): - """UTF offset for UTC is 0. - - :param datetime.datetime dt: The datetime - :returns: The offset - :rtype: datetime.timedelta - """ - return datetime.timedelta(0) - - def tzname(self, dt): - """Timestamp representation. - - :param datetime.datetime dt: The datetime - :returns: The timestamp representation - :rtype: str - """ - return "Z" - - def dst(self, dt): - """No daylight saving for UTC. - - :param datetime.datetime dt: The datetime - :returns: The daylight saving time - :rtype: datetime.timedelta - """ - return datetime.timedelta(hours=1) - - -try: - from datetime import timezone as _FixedOffset # type: ignore -except ImportError: # Python 2.7 - - class _FixedOffset(datetime.tzinfo): # type: ignore - """Fixed offset in minutes east from UTC. - Copy/pasted from Python doc - :param datetime.timedelta offset: offset in timedelta format - """ - - def __init__(self, offset) -> None: - self.__offset = offset - - def utcoffset(self, dt): - return self.__offset - - def tzname(self, dt): - return str(self.__offset.total_seconds() / 3600) - - def __repr__(self): - return "".format(self.tzname(None)) - - def dst(self, dt): - return datetime.timedelta(0) - - def __getinitargs__(self): - return (self.__offset,) - - -try: - from datetime import timezone - - TZ_UTC = timezone.utc -except ImportError: - TZ_UTC = UTC() # type: ignore +TZ_UTC = datetime.timezone.utc _FLATTEN = re.compile(r"(? ModelType: + def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self: """Parse a str using the RestAPI syntax and return a model. :param str data: A str using RestAPI structure. JSON by default. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model - :raises: DeserializationError if something went wrong - :rtype: ModelType + :raises DeserializationError: if something went wrong + :rtype: Self """ deserializer = Deserializer(cls._infer_class_models()) return deserializer(cls.__name__, data, content_type=content_type) # type: ignore @classmethod def from_dict( - cls: Type[ModelType], + cls, data: Any, key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, content_type: Optional[str] = None, - ) -> ModelType: + ) -> Self: """Parse a dict using given key extractor return a model. By default consider key @@ -479,8 +411,8 @@ def from_dict( :param function key_extractors: A key extractor function. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model - :raises: DeserializationError if something went wrong - :rtype: ModelType + :raises DeserializationError: if something went wrong + :rtype: Self """ deserializer = Deserializer(cls._infer_class_models()) deserializer.key_extractors = ( # type: ignore @@ -626,7 +558,7 @@ def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, to :param object target_obj: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str, dict - :raises: SerializationError if serialization fails. + :raises SerializationError: if serialization fails. :returns: The serialized data. """ key_transformer = kwargs.get("key_transformer", self.key_transformer) @@ -736,8 +668,8 @@ def body(self, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: dict - :raises: SerializationError if serialization fails. - :raises: ValueError if data is None + :raises SerializationError: if serialization fails. + :raises ValueError: if data is None :returns: The serialized request body """ @@ -781,8 +713,8 @@ def url(self, name, data, data_type, **kwargs): :param str data_type: The type to be serialized from. :rtype: str :returns: The serialized URL path - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None """ try: output = self.serialize_data(data, data_type, **kwargs) @@ -805,8 +737,8 @@ def query(self, name, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str, list - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None :returns: The serialized query parameter """ try: @@ -835,8 +767,8 @@ def header(self, name, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None :returns: The serialized header """ try: @@ -855,9 +787,9 @@ def serialize_data(self, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. - :raises: AttributeError if required data is None. - :raises: ValueError if data is None - :raises: SerializationError if serialization fails. + :raises AttributeError: if required data is None. + :raises ValueError: if data is None + :raises SerializationError: if serialization fails. :returns: The serialized data. :rtype: str, int, float, bool, dict, list """ @@ -1192,7 +1124,7 @@ def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument :param Datetime attr: Object to be serialized. :rtype: str - :raises: TypeError if format invalid. + :raises TypeError: if format invalid. :return: serialized rfc """ try: @@ -1218,7 +1150,7 @@ def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument :param Datetime attr: Object to be serialized. :rtype: str - :raises: SerializationError if format invalid. + :raises SerializationError: if format invalid. :return: serialized iso """ if isinstance(attr, str): @@ -1251,7 +1183,7 @@ def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument :param Datetime attr: Object to be serialized. :rtype: int - :raises: SerializationError if format invalid + :raises SerializationError: if format invalid :return: serialied unix """ if isinstance(attr, int): @@ -1429,7 +1361,7 @@ def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument # Iter and wrapped, should have found one node only (the wrap one) if len(children) != 1: raise DeserializationError( - "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( # pylint: disable=line-too-long + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( xml_name ) ) @@ -1488,7 +1420,7 @@ def __call__(self, target_obj, response_data, content_type=None): :param str target_obj: Target data type to deserialize to. :param requests.Response response_data: REST response object. :param str content_type: Swagger "produces" if available. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. :rtype: object """ @@ -1502,7 +1434,7 @@ def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return :param str target_obj: Target data type to deserialize to. :param object data: Object to deserialize. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. :rtype: object """ @@ -1717,7 +1649,7 @@ def deserialize_data(self, data, data_type): # pylint: disable=too-many-return- :param str data: The response string to be deserialized. :param str data_type: The type to deserialize to. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. :rtype: object """ @@ -1799,7 +1731,7 @@ def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return :param dict attr: Dictionary to be deserialized. :return: Deserialized object. :rtype: dict - :raises: TypeError if non-builtin datatype encountered. + :raises TypeError: if non-builtin datatype encountered. """ if attr is None: return None @@ -1845,7 +1777,7 @@ def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return :param str data_type: deserialization data type. :return: Deserialized basic type. :rtype: str, int, float or bool - :raises: TypeError if string format is not valid. + :raises TypeError: if string format is not valid. """ # If we're here, data is supposed to be a basic type. # If it's still an XML node, take the text @@ -1936,7 +1868,7 @@ def deserialize_bytearray(attr): :param str attr: response string to be deserialized. :return: Deserialized bytearray :rtype: bytearray - :raises: TypeError if string format invalid. + :raises TypeError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1949,7 +1881,7 @@ def deserialize_base64(attr): :param str attr: response string to be deserialized. :return: Deserialized base64 string :rtype: bytearray - :raises: TypeError if string format invalid. + :raises TypeError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1964,7 +1896,7 @@ def deserialize_decimal(attr): :param str attr: response string to be deserialized. :return: Deserialized decimal - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. :rtype: decimal """ if isinstance(attr, ET.Element): @@ -1982,7 +1914,7 @@ def deserialize_long(attr): :param str attr: response string to be deserialized. :return: Deserialized int :rtype: long or int - :raises: ValueError if string format invalid. + :raises ValueError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1995,7 +1927,7 @@ def deserialize_duration(attr): :param str attr: response string to be deserialized. :return: Deserialized duration :rtype: TimeDelta - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2013,7 +1945,7 @@ def deserialize_date(attr): :param str attr: response string to be deserialized. :return: Deserialized date :rtype: Date - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2029,7 +1961,7 @@ def deserialize_time(attr): :param str attr: response string to be deserialized. :return: Deserialized time :rtype: datetime.time - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2044,14 +1976,14 @@ def deserialize_rfc(attr): :param str attr: response string to be deserialized. :return: Deserialized RFC datetime :rtype: Datetime - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text try: parsed_date = email.utils.parsedate_tz(attr) # type: ignore date_obj = datetime.datetime( - *parsed_date[:6], tzinfo=_FixedOffset(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) + *parsed_date[:6], tzinfo=datetime.timezone(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) ) if not date_obj.tzinfo: date_obj = date_obj.astimezone(tz=TZ_UTC) @@ -2067,7 +1999,7 @@ def deserialize_iso(attr): :param str attr: response string to be deserialized. :return: Deserialized ISO datetime :rtype: Datetime - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2105,7 +2037,7 @@ def deserialize_unix(attr): :param int attr: Object to be serialized. :return: Deserialized datetime :rtype: Datetime - :raises: DeserializationError if format invalid + :raises DeserializationError: if format invalid """ if isinstance(attr, ET.Element): attr = int(attr.text) # type: ignore diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_version.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_version.py index 0ec13ea52bbf..be71c81bd282 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_version.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/_operations.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/_operations.py index 7408944cf3a3..8456ca50e415 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/_operations.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/_operations.py @@ -12,6 +12,7 @@ from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,6 +33,7 @@ from ... import models as _models from ..._model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize +from ..._serialization import Deserializer, Serializer from ...operations._operations import ( build_operations_list_request, build_scheduled_actions_virtual_machines_cancel_operations_request, @@ -44,6 +46,7 @@ build_scheduled_actions_virtual_machines_submit_hibernate_request, build_scheduled_actions_virtual_machines_submit_start_request, ) +from .._configuration import ComputeScheduleMgmtClientConfiguration if sys.version_info >= (3, 9): from collections.abc import MutableMapping @@ -66,10 +69,10 @@ class Operations: def __init__(self, *args, **kwargs) -> None: 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._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ComputeScheduleMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: @@ -131,7 +134,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.Operation], deserialized["value"]) + list_of_elem = _deserialize(List[_models.Operation], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -167,10 +170,10 @@ class ScheduledActionsOperations: def __init__(self, *args, **kwargs) -> None: 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._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ComputeScheduleMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload async def virtual_machines_submit_deallocate( diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_models.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_models.py index 8524abc67d85..a06e8163e00b 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_models.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_models.py @@ -21,17 +21,17 @@ class CancelOperationsRequest(_model_base.Model): """This is the request to cancel running operations in scheduled actions using the operation ids. - All required parameters must be populated in order to send to server. - :ivar operation_ids: The list of operation ids to cancel operations on. Required. :vartype operation_ids: list[str] :ivar correlationid: CorrelationId item. Required. :vartype correlationid: str """ - operation_ids: List[str] = rest_field(name="operationIds") + operation_ids: List[str] = rest_field( + name="operationIds", visibility=["read", "create", "update", "delete", "query"] + ) """The list of operation ids to cancel operations on. Required.""" - correlationid: str = rest_field() + correlationid: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """CorrelationId item. Required.""" @overload @@ -56,12 +56,11 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class CancelOperationsResponse(_model_base.Model): """This is the response from a cancel operations request. - :ivar results: An array of resource operations that were successfully cancelled. Required. :vartype results: list[~azure.mgmt.computeschedule.models.ResourceOperation] """ - results: List["_models.ResourceOperation"] = rest_field() + results: List["_models.ResourceOperation"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """An array of resource operations that were successfully cancelled. Required.""" @overload @@ -85,7 +84,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class DeallocateResourceOperationResponse(_model_base.Model): """The response from a deallocate request. - :ivar description: The description of the operation response. Required. :vartype description: str :ivar type: The type of resources used in the deallocate request eg virtual machines. Required. @@ -96,13 +94,15 @@ class DeallocateResourceOperationResponse(_model_base.Model): :vartype results: list[~azure.mgmt.computeschedule.models.ResourceOperation] """ - description: str = rest_field() + description: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The description of the operation response. Required.""" - type: str = rest_field() + type: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The type of resources used in the deallocate request eg virtual machines. Required.""" location: str = rest_field(visibility=["read", "create"]) """The location of the deallocate request eg westus. Required.""" - results: Optional[List["_models.ResourceOperation"]] = rest_field() + results: Optional[List["_models.ResourceOperation"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The results from the deallocate request if no errors exist.""" @overload @@ -129,8 +129,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class ErrorAdditionalInfo(_model_base.Model): """The resource management error additional info. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. @@ -146,8 +144,6 @@ class ErrorAdditionalInfo(_model_base.Model): class ErrorDetail(_model_base.Model): """The error detail. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar code: The error code. :vartype code: str :ivar message: The error message. @@ -182,7 +178,7 @@ class ErrorResponse(_model_base.Model): :vartype error: ~azure.mgmt.computeschedule.models.ErrorDetail """ - error: Optional["_models.ErrorDetail"] = rest_field() + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The error object.""" @overload @@ -206,8 +202,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class ExecuteDeallocateRequest(_model_base.Model): """The ExecuteDeallocateRequest request for executeDeallocate operations. - All required parameters must be populated in order to send to server. - :ivar execution_parameters: The execution parameters for the request. Required. :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters :ivar resources: The resources for the request. Required. @@ -216,11 +210,13 @@ class ExecuteDeallocateRequest(_model_base.Model): :vartype correlationid: str """ - execution_parameters: "_models.ExecutionParameters" = rest_field(name="executionParameters") + execution_parameters: "_models.ExecutionParameters" = rest_field( + name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + ) """The execution parameters for the request. Required.""" - resources: "_models.Resources" = rest_field() + resources: "_models.Resources" = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The resources for the request. Required.""" - correlationid: str = rest_field() + correlationid: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """CorrelationId item. Required.""" @overload @@ -246,8 +242,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class ExecuteHibernateRequest(_model_base.Model): """The ExecuteHibernateRequest request for executeHibernate operations. - All required parameters must be populated in order to send to server. - :ivar execution_parameters: The execution parameters for the request. Required. :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters :ivar resources: The resources for the request. Required. @@ -256,11 +250,13 @@ class ExecuteHibernateRequest(_model_base.Model): :vartype correlationid: str """ - execution_parameters: "_models.ExecutionParameters" = rest_field(name="executionParameters") + execution_parameters: "_models.ExecutionParameters" = rest_field( + name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + ) """The execution parameters for the request. Required.""" - resources: "_models.Resources" = rest_field() + resources: "_models.Resources" = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The resources for the request. Required.""" - correlationid: str = rest_field() + correlationid: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """CorrelationId item. Required.""" @overload @@ -286,8 +282,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class ExecuteStartRequest(_model_base.Model): """The ExecuteStartRequest request for executeStart operations. - All required parameters must be populated in order to send to server. - :ivar execution_parameters: The execution parameters for the request. Required. :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters :ivar resources: The resources for the request. Required. @@ -296,11 +290,13 @@ class ExecuteStartRequest(_model_base.Model): :vartype correlationid: str """ - execution_parameters: "_models.ExecutionParameters" = rest_field(name="executionParameters") + execution_parameters: "_models.ExecutionParameters" = rest_field( + name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + ) """The execution parameters for the request. Required.""" - resources: "_models.Resources" = rest_field() + resources: "_models.Resources" = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The resources for the request. Required.""" - correlationid: str = rest_field() + correlationid: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """CorrelationId item. Required.""" @overload @@ -335,11 +331,13 @@ class ExecutionParameters(_model_base.Model): """ optimization_preference: Optional[Union[str, "_models.OptimizationPreference"]] = rest_field( - name="optimizationPreference" + name="optimizationPreference", visibility=["read", "create", "update", "delete", "query"] ) """Details that could optimize the user's request. Known values are: \"Cost\", \"Availability\", and \"CostAvailabilityBalanced\".""" - retry_policy: Optional["_models.RetryPolicy"] = rest_field(name="retryPolicy") + retry_policy: Optional["_models.RetryPolicy"] = rest_field( + name="retryPolicy", visibility=["read", "create", "update", "delete", "query"] + ) """Retry policy the user can pass.""" @overload @@ -364,13 +362,13 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class GetOperationErrorsRequest(_model_base.Model): """This is the request to get errors per vm operations. - All required parameters must be populated in order to send to server. - :ivar operation_ids: The list of operation ids to query errors of. Required. :vartype operation_ids: list[str] """ - operation_ids: List[str] = rest_field(name="operationIds") + operation_ids: List[str] = rest_field( + name="operationIds", visibility=["read", "create", "update", "delete", "query"] + ) """The list of operation ids to query errors of. Required.""" @overload @@ -394,12 +392,13 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class GetOperationErrorsResponse(_model_base.Model): """This is the response from a get operations errors request. - :ivar results: An array of operationids and their corresponding errors if any. Required. :vartype results: list[~azure.mgmt.computeschedule.models.OperationErrorsResult] """ - results: List["_models.OperationErrorsResult"] = rest_field() + results: List["_models.OperationErrorsResult"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """An array of operationids and their corresponding errors if any. Required.""" @overload @@ -423,17 +422,17 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class GetOperationStatusRequest(_model_base.Model): """This is the request to get operation status using operationids. - All required parameters must be populated in order to send to server. - :ivar operation_ids: The list of operation ids to get the status of. Required. :vartype operation_ids: list[str] :ivar correlationid: CorrelationId item. Required. :vartype correlationid: str """ - operation_ids: List[str] = rest_field(name="operationIds") + operation_ids: List[str] = rest_field( + name="operationIds", visibility=["read", "create", "update", "delete", "query"] + ) """The list of operation ids to get the status of. Required.""" - correlationid: str = rest_field() + correlationid: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """CorrelationId item. Required.""" @overload @@ -458,12 +457,11 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class GetOperationStatusResponse(_model_base.Model): """This is the response from a get operations status request. - :ivar results: An array of resource operations based on their operation ids. Required. :vartype results: list[~azure.mgmt.computeschedule.models.ResourceOperation] """ - results: List["_models.ResourceOperation"] = rest_field() + results: List["_models.ResourceOperation"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """An array of resource operations based on their operation ids. Required.""" @overload @@ -487,7 +485,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class HibernateResourceOperationResponse(_model_base.Model): """The response from a Hibernate request. - :ivar description: The description of the operation response. Required. :vartype description: str :ivar type: The type of resources used in the Hibernate request eg virtual machines. Required. @@ -498,13 +495,15 @@ class HibernateResourceOperationResponse(_model_base.Model): :vartype results: list[~azure.mgmt.computeschedule.models.ResourceOperation] """ - description: str = rest_field() + description: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The description of the operation response. Required.""" - type: str = rest_field() + type: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The type of resources used in the Hibernate request eg virtual machines. Required.""" location: str = rest_field(visibility=["read", "create"]) """The location of the Hibernate request eg westus. Required.""" - results: Optional[List["_models.ResourceOperation"]] = rest_field() + results: Optional[List["_models.ResourceOperation"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The results from the Hibernate request if no errors exist.""" @overload @@ -531,8 +530,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class Operation(_model_base.Model): """Details of a REST API operation, returned from the Resource Provider Operations API. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". :vartype name: str @@ -557,7 +554,9 @@ class Operation(_model_base.Model): is_data_action: Optional[bool] = rest_field(name="isDataAction", visibility=["read"]) """Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for Azure Resource Manager/control-plane operations.""" - display: Optional["_models.OperationDisplay"] = rest_field() + display: Optional["_models.OperationDisplay"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Localized display information for this particular operation.""" origin: Optional[Union[str, "_models.Origin"]] = rest_field(visibility=["read"]) """The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit @@ -588,8 +587,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class OperationDisplay(_model_base.Model): """Localized display information for and operation. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar provider: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". :vartype provider: str @@ -621,7 +618,6 @@ class OperationDisplay(_model_base.Model): class OperationErrorDetails(_model_base.Model): """This defines a list of operation errors associated with a unique operationId. - :ivar error_code: The error code of the operation. Required. :vartype error_code: str :ivar error_details: The error details of the operation. Required. @@ -636,17 +632,25 @@ class OperationErrorDetails(_model_base.Model): :vartype crp_operation_id: str """ - error_code: str = rest_field(name="errorCode") + error_code: str = rest_field(name="errorCode", visibility=["read", "create", "update", "delete", "query"]) """The error code of the operation. Required.""" - error_details: str = rest_field(name="errorDetails") + error_details: str = rest_field(name="errorDetails", visibility=["read", "create", "update", "delete", "query"]) """The error details of the operation. Required.""" - timestamp: Optional[datetime.datetime] = rest_field(format="rfc3339") + timestamp: Optional[datetime.datetime] = rest_field( + visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) """The timestamp of the error occurence.""" - time_stamp: Optional[datetime.datetime] = rest_field(name="timeStamp", format="rfc3339") + time_stamp: Optional[datetime.datetime] = rest_field( + name="timeStamp", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) """The timestamp of the error occurence.""" - azure_operation_name: Optional[str] = rest_field(name="azureOperationName") + azure_operation_name: Optional[str] = rest_field( + name="azureOperationName", visibility=["read", "create", "update", "delete", "query"] + ) """The compute operationid of the Start/Deallocate/Hibernate request.""" - crp_operation_id: Optional[str] = rest_field(name="crpOperationId") + crp_operation_id: Optional[str] = rest_field( + name="crpOperationId", visibility=["read", "create", "update", "delete", "query"] + ) """The compute operationid of the Start/Deallocate/Hibernate request.""" @overload @@ -692,19 +696,33 @@ class OperationErrorsResult(_model_base.Model): :vartype request_error_details: str """ - operation_id: Optional[str] = rest_field(name="operationId") + operation_id: Optional[str] = rest_field( + name="operationId", visibility=["read", "create", "update", "delete", "query"] + ) """The operationId identifying a vm operation.""" - creation_time: Optional[datetime.datetime] = rest_field(name="creationTime", format="rfc3339") + creation_time: Optional[datetime.datetime] = rest_field( + name="creationTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) """The creation time of the error result.""" - activation_time: Optional[datetime.datetime] = rest_field(name="activationTime", format="rfc3339") + activation_time: Optional[datetime.datetime] = rest_field( + name="activationTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) """The activation time of a vm operation.""" - completed_at: Optional[datetime.datetime] = rest_field(name="completedAt", format="rfc3339") + completed_at: Optional[datetime.datetime] = rest_field( + name="completedAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) """The completion time of the operation if the operation was completed.""" - operation_errors: Optional[List["_models.OperationErrorDetails"]] = rest_field(name="operationErrors") + operation_errors: Optional[List["_models.OperationErrorDetails"]] = rest_field( + name="operationErrors", visibility=["read", "create", "update", "delete", "query"] + ) """A list of errors associated with the operationid.""" - request_error_code: Optional[str] = rest_field(name="requestErrorCode") + request_error_code: Optional[str] = rest_field( + name="requestErrorCode", visibility=["read", "create", "update", "delete", "query"] + ) """Request level error code.""" - request_error_details: Optional[str] = rest_field(name="requestErrorDetails") + request_error_details: Optional[str] = rest_field( + name="requestErrorDetails", visibility=["read", "create", "update", "delete", "query"] + ) """Request level error details.""" @overload @@ -744,13 +762,19 @@ class ResourceOperation(_model_base.Model): :vartype operation: ~azure.mgmt.computeschedule.models.ResourceOperationDetails """ - resource_id: Optional[str] = rest_field(name="resourceId") + resource_id: Optional[str] = rest_field( + name="resourceId", visibility=["read", "create", "update", "delete", "query"] + ) """Unique identifier for the resource involved in the operation, eg ArmId.""" - error_code: Optional[str] = rest_field(name="errorCode") + error_code: Optional[str] = rest_field(name="errorCode", visibility=["read", "create", "update", "delete", "query"]) """Resource level error code if it exists.""" - error_details: Optional[str] = rest_field(name="errorDetails") + error_details: Optional[str] = rest_field( + name="errorDetails", visibility=["read", "create", "update", "delete", "query"] + ) """Resource level error details if they exist.""" - operation: Optional["_models.ResourceOperationDetails"] = rest_field() + operation: Optional["_models.ResourceOperationDetails"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Details of the operation performed on a resource.""" @overload @@ -777,7 +801,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class ResourceOperationDetails(_model_base.Model): """The details of a response from an operation on a resource. - :ivar operation_id: Operation identifier for the unique operation. Required. :vartype operation_id: str :ivar resource_id: Unique identifier for the resource involved in the operation, eg ArmId. @@ -808,33 +831,51 @@ class ResourceOperationDetails(_model_base.Model): :vartype retry_policy: ~azure.mgmt.computeschedule.models.RetryPolicy """ - operation_id: str = rest_field(name="operationId") + operation_id: str = rest_field(name="operationId", visibility=["read", "create", "update", "delete", "query"]) """Operation identifier for the unique operation. Required.""" - resource_id: Optional[str] = rest_field(name="resourceId") + resource_id: Optional[str] = rest_field( + name="resourceId", visibility=["read", "create", "update", "delete", "query"] + ) """Unique identifier for the resource involved in the operation, eg ArmId.""" - op_type: Optional[Union[str, "_models.ResourceOperationType"]] = rest_field(name="opType") + op_type: Optional[Union[str, "_models.ResourceOperationType"]] = rest_field( + name="opType", visibility=["read", "create", "update", "delete", "query"] + ) """Type of operation performed on the resources. Known values are: \"Unknown\", \"Start\", \"Deallocate\", and \"Hibernate\".""" - subscription_id: Optional[str] = rest_field(name="subscriptionId") + subscription_id: Optional[str] = rest_field( + name="subscriptionId", visibility=["read", "create", "update", "delete", "query"] + ) """Subscription id attached to the request.""" - deadline: Optional[datetime.datetime] = rest_field(format="rfc3339") + deadline: Optional[datetime.datetime] = rest_field( + visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) """Deadline for the operation.""" - deadline_type: Optional[Union[str, "_models.DeadlineType"]] = rest_field(name="deadlineType") + deadline_type: Optional[Union[str, "_models.DeadlineType"]] = rest_field( + name="deadlineType", visibility=["read", "create", "update", "delete", "query"] + ) """Type of deadline of the operation. Known values are: \"Unknown\", \"InitiateAt\", and \"CompleteBy\".""" - state: Optional[Union[str, "_models.OperationState"]] = rest_field() + state: Optional[Union[str, "_models.OperationState"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Current state of the operation. Known values are: \"Unknown\", \"PendingScheduling\", \"Scheduled\", \"PendingExecution\", \"Executing\", \"Succeeded\", \"Failed\", \"Cancelled\", and \"Blocked\".""" - timezone: Optional[str] = rest_field() + timezone: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Timezone for the operation.""" - time_zone: Optional[str] = rest_field(name="timeZone") + time_zone: Optional[str] = rest_field(name="timeZone", visibility=["read", "create", "update", "delete", "query"]) """Timezone for the operation.""" - resource_operation_error: Optional["_models.ResourceOperationError"] = rest_field(name="resourceOperationError") + resource_operation_error: Optional["_models.ResourceOperationError"] = rest_field( + name="resourceOperationError", visibility=["read", "create", "update", "delete", "query"] + ) """Operation level errors if they exist.""" - completed_at: Optional[datetime.datetime] = rest_field(name="completedAt", format="rfc3339") + completed_at: Optional[datetime.datetime] = rest_field( + name="completedAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) """Time the operation was complete if errors are null.""" - retry_policy: Optional["_models.RetryPolicy"] = rest_field(name="retryPolicy") + retry_policy: Optional["_models.RetryPolicy"] = rest_field( + name="retryPolicy", visibility=["read", "create", "update", "delete", "query"] + ) """Retry policy the user can pass.""" @overload @@ -869,16 +910,15 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class ResourceOperationError(_model_base.Model): """These describe errors that occur at the resource level. - :ivar error_code: Code for the error eg 404, 500. Required. :vartype error_code: str :ivar error_details: Detailed message about the error. Required. :vartype error_details: str """ - error_code: str = rest_field(name="errorCode") + error_code: str = rest_field(name="errorCode", visibility=["read", "create", "update", "delete", "query"]) """Code for the error eg 404, 500. Required.""" - error_details: str = rest_field(name="errorDetails") + error_details: str = rest_field(name="errorDetails", visibility=["read", "create", "update", "delete", "query"]) """Detailed message about the error. Required.""" @overload @@ -903,13 +943,11 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class Resources(_model_base.Model): """The resources needed for the user request. - All required parameters must be populated in order to send to server. - :ivar ids: The resource ids used for the request. Required. :vartype ids: list[str] """ - ids: List[str] = rest_field() + ids: List[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The resource ids used for the request. Required.""" @overload @@ -939,9 +977,13 @@ class RetryPolicy(_model_base.Model): :vartype retry_window_in_minutes: int """ - retry_count: Optional[int] = rest_field(name="retryCount") + retry_count: Optional[int] = rest_field( + name="retryCount", visibility=["read", "create", "update", "delete", "query"] + ) """Retry count for user request.""" - retry_window_in_minutes: Optional[int] = rest_field(name="retryWindowInMinutes") + retry_window_in_minutes: Optional[int] = rest_field( + name="retryWindowInMinutes", visibility=["read", "create", "update", "delete", "query"] + ) """Retry window in minutes for user request.""" @overload @@ -966,8 +1008,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class Schedule(_model_base.Model): """The schedule details for the user request. - All required parameters must be populated in order to send to server. - :ivar deadline: The deadline for the operation. :vartype deadline: ~datetime.datetime :ivar dead_line: The deadline for the operation. @@ -981,15 +1021,21 @@ class Schedule(_model_base.Model): :vartype deadline_type: str or ~azure.mgmt.computeschedule.models.DeadlineType """ - deadline: Optional[datetime.datetime] = rest_field(format="rfc3339") + deadline: Optional[datetime.datetime] = rest_field( + visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) """The deadline for the operation.""" - dead_line: Optional[datetime.datetime] = rest_field(name="deadLine", format="rfc3339") + dead_line: Optional[datetime.datetime] = rest_field( + name="deadLine", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) """The deadline for the operation.""" - timezone: Optional[str] = rest_field() + timezone: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The timezone for the operation.""" - time_zone: Optional[str] = rest_field(name="timeZone") + time_zone: Optional[str] = rest_field(name="timeZone", visibility=["read", "create", "update", "delete", "query"]) """The timezone for the operation.""" - deadline_type: Union[str, "_models.DeadlineType"] = rest_field(name="deadlineType") + deadline_type: Union[str, "_models.DeadlineType"] = rest_field( + name="deadlineType", visibility=["read", "create", "update", "delete", "query"] + ) """The deadlinetype of the operation, this can either be InitiateAt or CompleteBy. Required. Known values are: \"Unknown\", \"InitiateAt\", and \"CompleteBy\".""" @@ -1018,7 +1064,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class StartResourceOperationResponse(_model_base.Model): """The response from a start request. - :ivar description: The description of the operation response. Required. :vartype description: str :ivar type: The type of resources used in the start request eg virtual machines. Required. @@ -1029,13 +1074,15 @@ class StartResourceOperationResponse(_model_base.Model): :vartype results: list[~azure.mgmt.computeschedule.models.ResourceOperation] """ - description: str = rest_field() + description: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The description of the operation response. Required.""" - type: str = rest_field() + type: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The type of resources used in the start request eg virtual machines. Required.""" location: str = rest_field(visibility=["read", "create"]) """The location of the start request eg westus. Required.""" - results: Optional[List["_models.ResourceOperation"]] = rest_field() + results: Optional[List["_models.ResourceOperation"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The results from the start request if no errors exist.""" @overload @@ -1062,8 +1109,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class SubmitDeallocateRequest(_model_base.Model): """The deallocate request for resources. - All required parameters must be populated in order to send to server. - :ivar schedule: The schedule for the request. Required. :vartype schedule: ~azure.mgmt.computeschedule.models.Schedule :ivar execution_parameters: The execution parameters for the request. Required. @@ -1074,13 +1119,15 @@ class SubmitDeallocateRequest(_model_base.Model): :vartype correlationid: str """ - schedule: "_models.Schedule" = rest_field() + schedule: "_models.Schedule" = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The schedule for the request. Required.""" - execution_parameters: "_models.ExecutionParameters" = rest_field(name="executionParameters") + execution_parameters: "_models.ExecutionParameters" = rest_field( + name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + ) """The execution parameters for the request. Required.""" - resources: "_models.Resources" = rest_field() + resources: "_models.Resources" = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The resources for the request. Required.""" - correlationid: str = rest_field() + correlationid: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """CorrelationId item. Required.""" @overload @@ -1107,8 +1154,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class SubmitHibernateRequest(_model_base.Model): """This is the request for hibernate. - All required parameters must be populated in order to send to server. - :ivar schedule: The schedule for the request. Required. :vartype schedule: ~azure.mgmt.computeschedule.models.Schedule :ivar execution_parameters: The execution parameters for the request. Required. @@ -1119,13 +1164,15 @@ class SubmitHibernateRequest(_model_base.Model): :vartype correlationid: str """ - schedule: "_models.Schedule" = rest_field() + schedule: "_models.Schedule" = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The schedule for the request. Required.""" - execution_parameters: "_models.ExecutionParameters" = rest_field(name="executionParameters") + execution_parameters: "_models.ExecutionParameters" = rest_field( + name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + ) """The execution parameters for the request. Required.""" - resources: "_models.Resources" = rest_field() + resources: "_models.Resources" = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The resources for the request. Required.""" - correlationid: str = rest_field() + correlationid: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """CorrelationId item. Required.""" @overload @@ -1152,8 +1199,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class SubmitStartRequest(_model_base.Model): """This is the request for start. - All required parameters must be populated in order to send to server. - :ivar schedule: The schedule for the request. Required. :vartype schedule: ~azure.mgmt.computeschedule.models.Schedule :ivar execution_parameters: The execution parameters for the request. Required. @@ -1164,13 +1209,15 @@ class SubmitStartRequest(_model_base.Model): :vartype correlationid: str """ - schedule: "_models.Schedule" = rest_field() + schedule: "_models.Schedule" = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The schedule for the request. Required.""" - execution_parameters: "_models.ExecutionParameters" = rest_field(name="executionParameters") + execution_parameters: "_models.ExecutionParameters" = rest_field( + name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + ) """The execution parameters for the request. Required.""" - resources: "_models.Resources" = rest_field() + resources: "_models.Resources" = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The resources for the request. Required.""" - correlationid: str = rest_field() + correlationid: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """CorrelationId item. Required.""" @overload diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/_operations.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/_operations.py index a22209e54381..06829c2a4d18 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/_operations.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +12,7 @@ from typing import Any, Callable, Dict, IO, Iterable, List, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -30,8 +31,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models +from .._configuration import ComputeScheduleMgmtClientConfiguration from .._model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize -from .._serialization import Serializer +from .._serialization import Deserializer, Serializer if sys.version_info >= (3, 9): from collections.abc import MutableMapping @@ -75,7 +77,7 @@ def build_scheduled_actions_virtual_machines_submit_deallocate_request( # pylin accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitDeallocate" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitDeallocate" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "locationparameter": _SERIALIZER.url("locationparameter", locationparameter, "str"), @@ -105,7 +107,7 @@ def build_scheduled_actions_virtual_machines_submit_hibernate_request( # pylint accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitHibernate" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitHibernate" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "locationparameter": _SERIALIZER.url("locationparameter", locationparameter, "str"), @@ -135,7 +137,7 @@ def build_scheduled_actions_virtual_machines_submit_start_request( # pylint: di accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitStart" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitStart" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "locationparameter": _SERIALIZER.url("locationparameter", locationparameter, "str"), @@ -165,7 +167,7 @@ def build_scheduled_actions_virtual_machines_execute_deallocate_request( # pyli accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteDeallocate" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteDeallocate" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "locationparameter": _SERIALIZER.url("locationparameter", locationparameter, "str"), @@ -195,7 +197,7 @@ def build_scheduled_actions_virtual_machines_execute_hibernate_request( # pylin accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteHibernate" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteHibernate" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "locationparameter": _SERIALIZER.url("locationparameter", locationparameter, "str"), @@ -225,7 +227,7 @@ def build_scheduled_actions_virtual_machines_execute_start_request( # pylint: d accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteStart" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteStart" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "locationparameter": _SERIALIZER.url("locationparameter", locationparameter, "str"), @@ -255,7 +257,7 @@ def build_scheduled_actions_virtual_machines_get_operation_status_request( # py accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesGetOperationStatus" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesGetOperationStatus" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "locationparameter": _SERIALIZER.url("locationparameter", locationparameter, "str"), @@ -285,7 +287,7 @@ def build_scheduled_actions_virtual_machines_cancel_operations_request( # pylin accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesCancelOperations" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesCancelOperations" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "locationparameter": _SERIALIZER.url("locationparameter", locationparameter, "str"), @@ -315,7 +317,7 @@ def build_scheduled_actions_virtual_machines_get_operation_errors_request( # py accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesGetOperationErrors" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesGetOperationErrors" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "locationparameter": _SERIALIZER.url("locationparameter", locationparameter, "str"), @@ -346,10 +348,10 @@ class Operations: 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._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ComputeScheduleMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: @@ -411,7 +413,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.Operation], deserialized["value"]) + list_of_elem = _deserialize(List[_models.Operation], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -447,10 +449,10 @@ class ScheduledActionsOperations: 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._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ComputeScheduleMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload def virtual_machines_submit_deallocate( diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_deallocate.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_deallocate.py index ca2887c4c9d8..b8b807a7ea7c 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_deallocate.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_deallocate.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_hibernate.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_hibernate.py index b83004f355c8..4cda47400216 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_hibernate.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_hibernate.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_start.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_start.py index ab3af28b87a9..64b9678948f3 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_start.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_start.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_deallocate.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_deallocate.py index 577024f94eec..f8902303b012 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_deallocate.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_deallocate.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_hibernate.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_hibernate.py index 3df671ad7099..9c7755743b9f 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_hibernate.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_hibernate.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_start.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_start.py index 46a5ffe7df18..e0cd2205e558 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_start.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_start.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/tsp-location.yaml b/sdk/computeschedule/azure-mgmt-computeschedule/tsp-location.yaml index 335977793938..9bf84d1c2933 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/tsp-location.yaml +++ b/sdk/computeschedule/azure-mgmt-computeschedule/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/computeschedule/ComputeSchedule.Management -commit: b6075dbc2321933382ea91c787ee62c6bdb87e5d +commit: 9e8e1c4fcb919939d2ace763df0ece20652eef05 repo: Azure/azure-rest-api-specs additionalDirectories: