diff --git a/sdk/scheduler/azure-mgmt-scheduler/MANIFEST.in b/sdk/scheduler/azure-mgmt-scheduler/MANIFEST.in index 19a6573fb37d..188dd1a5e32f 100644 --- a/sdk/scheduler/azure-mgmt-scheduler/MANIFEST.in +++ b/sdk/scheduler/azure-mgmt-scheduler/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json include *.md include azure/__init__.py include azure/mgmt/__init__.py diff --git a/sdk/scheduler/azure-mgmt-scheduler/_meta.json b/sdk/scheduler/azure-mgmt-scheduler/_meta.json new file mode 100644 index 000000000000..2a4aad252d87 --- /dev/null +++ b/sdk/scheduler/azure-mgmt-scheduler/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "V2", + "use": "@microsoft.azure/autorest.python@~4.0.71", + "commit": "c76db05c209e7e3273990521da05e77fd774174b", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/scheduler/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2", + "readme": "specification/scheduler/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/__init__.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/__init__.py index 66aad00c4f82..2d7ac3661712 100644 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/__init__.py +++ b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .scheduler_management_client import SchedulerManagementClient -from .version import VERSION +from ._configuration import SchedulerManagementClientConfiguration +from ._scheduler_management_client import SchedulerManagementClient +__all__ = ['SchedulerManagementClient', 'SchedulerManagementClientConfiguration'] -__all__ = ['SchedulerManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/_configuration.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/_configuration.py new file mode 100644 index 000000000000..8641785c7900 --- /dev/null +++ b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/_configuration.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class SchedulerManagementClientConfiguration(AzureConfiguration): + """Configuration for SchedulerManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription id. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(SchedulerManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-scheduler/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/scheduler_management_client.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/_scheduler_management_client.py similarity index 58% rename from sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/scheduler_management_client.py rename to sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/_scheduler_management_client.py index d2b479f5e98b..2960228c860d 100644 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/scheduler_management_client.py +++ b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/_scheduler_management_client.py @@ -11,44 +11,11 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.job_collections_operations import JobCollectionsOperations -from .operations.jobs_operations import JobsOperations -from . import models -from .patch import patch_client - - -class SchedulerManagementClientConfiguration(AzureConfiguration): - """Configuration for SchedulerManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The subscription id. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(SchedulerManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-scheduler/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import SchedulerManagementClientConfiguration +from .operations import JobCollectionsOperations +from .operations import JobsOperations +from . import models class SchedulerManagementClient(SDKClient): @@ -85,5 +52,3 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.jobs = JobsOperations( self._client, self.config, self._serialize, self._deserialize) - - patch_client(self) diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/__init__.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/__init__.py index 8c1d83bea4f8..decd35f6873e 100644 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/__init__.py +++ b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/__init__.py @@ -10,69 +10,69 @@ # -------------------------------------------------------------------------- try: - from .sku_py3 import Sku - from .job_max_recurrence_py3 import JobMaxRecurrence - from .job_collection_quota_py3 import JobCollectionQuota - from .job_collection_properties_py3 import JobCollectionProperties - from .job_collection_definition_py3 import JobCollectionDefinition - from .http_authentication_py3 import HttpAuthentication - from .http_request_py3 import HttpRequest - from .storage_queue_message_py3 import StorageQueueMessage - from .service_bus_queue_message_py3 import ServiceBusQueueMessage - from .service_bus_topic_message_py3 import ServiceBusTopicMessage - from .retry_policy_py3 import RetryPolicy - from .job_error_action_py3 import JobErrorAction - from .job_action_py3 import JobAction - from .job_recurrence_schedule_monthly_occurrence_py3 import JobRecurrenceScheduleMonthlyOccurrence - from .job_recurrence_schedule_py3 import JobRecurrenceSchedule - from .job_recurrence_py3 import JobRecurrence - from .job_status_py3 import JobStatus - from .job_properties_py3 import JobProperties - from .job_definition_py3 import JobDefinition - from .job_history_definition_properties_py3 import JobHistoryDefinitionProperties - from .job_history_definition_py3 import JobHistoryDefinition - from .client_cert_authentication_py3 import ClientCertAuthentication - from .basic_authentication_py3 import BasicAuthentication - from .oauth_authentication_py3 import OAuthAuthentication - from .service_bus_authentication_py3 import ServiceBusAuthentication - from .service_bus_brokered_message_properties_py3 import ServiceBusBrokeredMessageProperties - from .service_bus_message_py3 import ServiceBusMessage - from .job_state_filter_py3 import JobStateFilter - from .job_history_filter_py3 import JobHistoryFilter + from ._models_py3 import BasicAuthentication + from ._models_py3 import ClientCertAuthentication + from ._models_py3 import HttpAuthentication + from ._models_py3 import HttpRequest + from ._models_py3 import JobAction + from ._models_py3 import JobCollectionDefinition + from ._models_py3 import JobCollectionProperties + from ._models_py3 import JobCollectionQuota + from ._models_py3 import JobDefinition + from ._models_py3 import JobErrorAction + from ._models_py3 import JobHistoryDefinition + from ._models_py3 import JobHistoryDefinitionProperties + from ._models_py3 import JobHistoryFilter + from ._models_py3 import JobMaxRecurrence + from ._models_py3 import JobProperties + from ._models_py3 import JobRecurrence + from ._models_py3 import JobRecurrenceSchedule + from ._models_py3 import JobRecurrenceScheduleMonthlyOccurrence + from ._models_py3 import JobStateFilter + from ._models_py3 import JobStatus + from ._models_py3 import OAuthAuthentication + from ._models_py3 import RetryPolicy + from ._models_py3 import ServiceBusAuthentication + from ._models_py3 import ServiceBusBrokeredMessageProperties + from ._models_py3 import ServiceBusMessage + from ._models_py3 import ServiceBusQueueMessage + from ._models_py3 import ServiceBusTopicMessage + from ._models_py3 import Sku + from ._models_py3 import StorageQueueMessage except (SyntaxError, ImportError): - from .sku import Sku - from .job_max_recurrence import JobMaxRecurrence - from .job_collection_quota import JobCollectionQuota - from .job_collection_properties import JobCollectionProperties - from .job_collection_definition import JobCollectionDefinition - from .http_authentication import HttpAuthentication - from .http_request import HttpRequest - from .storage_queue_message import StorageQueueMessage - from .service_bus_queue_message import ServiceBusQueueMessage - from .service_bus_topic_message import ServiceBusTopicMessage - from .retry_policy import RetryPolicy - from .job_error_action import JobErrorAction - from .job_action import JobAction - from .job_recurrence_schedule_monthly_occurrence import JobRecurrenceScheduleMonthlyOccurrence - from .job_recurrence_schedule import JobRecurrenceSchedule - from .job_recurrence import JobRecurrence - from .job_status import JobStatus - from .job_properties import JobProperties - from .job_definition import JobDefinition - from .job_history_definition_properties import JobHistoryDefinitionProperties - from .job_history_definition import JobHistoryDefinition - from .client_cert_authentication import ClientCertAuthentication - from .basic_authentication import BasicAuthentication - from .oauth_authentication import OAuthAuthentication - from .service_bus_authentication import ServiceBusAuthentication - from .service_bus_brokered_message_properties import ServiceBusBrokeredMessageProperties - from .service_bus_message import ServiceBusMessage - from .job_state_filter import JobStateFilter - from .job_history_filter import JobHistoryFilter -from .job_collection_definition_paged import JobCollectionDefinitionPaged -from .job_definition_paged import JobDefinitionPaged -from .job_history_definition_paged import JobHistoryDefinitionPaged -from .scheduler_management_client_enums import ( + from ._models import BasicAuthentication + from ._models import ClientCertAuthentication + from ._models import HttpAuthentication + from ._models import HttpRequest + from ._models import JobAction + from ._models import JobCollectionDefinition + from ._models import JobCollectionProperties + from ._models import JobCollectionQuota + from ._models import JobDefinition + from ._models import JobErrorAction + from ._models import JobHistoryDefinition + from ._models import JobHistoryDefinitionProperties + from ._models import JobHistoryFilter + from ._models import JobMaxRecurrence + from ._models import JobProperties + from ._models import JobRecurrence + from ._models import JobRecurrenceSchedule + from ._models import JobRecurrenceScheduleMonthlyOccurrence + from ._models import JobStateFilter + from ._models import JobStatus + from ._models import OAuthAuthentication + from ._models import RetryPolicy + from ._models import ServiceBusAuthentication + from ._models import ServiceBusBrokeredMessageProperties + from ._models import ServiceBusMessage + from ._models import ServiceBusQueueMessage + from ._models import ServiceBusTopicMessage + from ._models import Sku + from ._models import StorageQueueMessage +from ._paged_models import JobCollectionDefinitionPaged +from ._paged_models import JobDefinitionPaged +from ._paged_models import JobHistoryDefinitionPaged +from ._scheduler_management_client_enums import ( SkuDefinition, JobCollectionState, RecurrenceFrequency, @@ -88,35 +88,35 @@ ) __all__ = [ - 'Sku', - 'JobMaxRecurrence', - 'JobCollectionQuota', - 'JobCollectionProperties', - 'JobCollectionDefinition', + 'BasicAuthentication', + 'ClientCertAuthentication', 'HttpAuthentication', 'HttpRequest', - 'StorageQueueMessage', - 'ServiceBusQueueMessage', - 'ServiceBusTopicMessage', - 'RetryPolicy', - 'JobErrorAction', 'JobAction', - 'JobRecurrenceScheduleMonthlyOccurrence', - 'JobRecurrenceSchedule', - 'JobRecurrence', - 'JobStatus', - 'JobProperties', + 'JobCollectionDefinition', + 'JobCollectionProperties', + 'JobCollectionQuota', 'JobDefinition', - 'JobHistoryDefinitionProperties', + 'JobErrorAction', 'JobHistoryDefinition', - 'ClientCertAuthentication', - 'BasicAuthentication', + 'JobHistoryDefinitionProperties', + 'JobHistoryFilter', + 'JobMaxRecurrence', + 'JobProperties', + 'JobRecurrence', + 'JobRecurrenceSchedule', + 'JobRecurrenceScheduleMonthlyOccurrence', + 'JobStateFilter', + 'JobStatus', 'OAuthAuthentication', + 'RetryPolicy', 'ServiceBusAuthentication', 'ServiceBusBrokeredMessageProperties', 'ServiceBusMessage', - 'JobStateFilter', - 'JobHistoryFilter', + 'ServiceBusQueueMessage', + 'ServiceBusTopicMessage', + 'Sku', + 'StorageQueueMessage', 'JobCollectionDefinitionPaged', 'JobDefinitionPaged', 'JobHistoryDefinitionPaged', diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/_models.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/_models.py new file mode 100644 index 000000000000..c0d8d853e2ac --- /dev/null +++ b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/_models.py @@ -0,0 +1,1039 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HttpAuthentication(Model): + """HttpAuthentication. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ClientCertAuthentication, BasicAuthentication, + OAuthAuthentication + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'ClientCertificate': 'ClientCertAuthentication', 'Basic': 'BasicAuthentication', 'ActiveDirectoryOAuth': 'OAuthAuthentication'} + } + + def __init__(self, **kwargs): + super(HttpAuthentication, self).__init__(**kwargs) + self.type = None + + +class BasicAuthentication(HttpAuthentication): + """BasicAuthentication. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param username: Gets or sets the username. + :type username: str + :param password: Gets or sets the password, return value will always be + empty. + :type password: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BasicAuthentication, self).__init__(**kwargs) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.type = 'Basic' + + +class ClientCertAuthentication(HttpAuthentication): + """ClientCertAuthentication. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param password: Gets or sets the certificate password, return value will + always be empty. + :type password: str + :param pfx: Gets or sets the pfx certificate. Accepts certification in + base64 encoding, return value will always be empty. + :type pfx: str + :param certificate_thumbprint: Gets or sets the certificate thumbprint. + :type certificate_thumbprint: str + :param certificate_expiration_date: Gets or sets the certificate + expiration date. + :type certificate_expiration_date: datetime + :param certificate_subject_name: Gets or sets the certificate subject + name. + :type certificate_subject_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'pfx': {'key': 'pfx', 'type': 'str'}, + 'certificate_thumbprint': {'key': 'certificateThumbprint', 'type': 'str'}, + 'certificate_expiration_date': {'key': 'certificateExpirationDate', 'type': 'iso-8601'}, + 'certificate_subject_name': {'key': 'certificateSubjectName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ClientCertAuthentication, self).__init__(**kwargs) + self.password = kwargs.get('password', None) + self.pfx = kwargs.get('pfx', None) + self.certificate_thumbprint = kwargs.get('certificate_thumbprint', None) + self.certificate_expiration_date = kwargs.get('certificate_expiration_date', None) + self.certificate_subject_name = kwargs.get('certificate_subject_name', None) + self.type = 'ClientCertificate' + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class HttpRequest(Model): + """HttpRequest. + + :param authentication: Gets or sets the authentication method of the + request. + :type authentication: ~azure.mgmt.scheduler.models.HttpAuthentication + :param uri: Gets or sets the URI of the request. + :type uri: str + :param method: Gets or sets the method of the request. + :type method: str + :param body: Gets or sets the request body. + :type body: str + :param headers: Gets or sets the headers. + :type headers: dict[str, str] + """ + + _attribute_map = { + 'authentication': {'key': 'authentication', 'type': 'HttpAuthentication'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'method': {'key': 'method', 'type': 'str'}, + 'body': {'key': 'body', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(HttpRequest, self).__init__(**kwargs) + self.authentication = kwargs.get('authentication', None) + self.uri = kwargs.get('uri', None) + self.method = kwargs.get('method', None) + self.body = kwargs.get('body', None) + self.headers = kwargs.get('headers', None) + + +class JobAction(Model): + """JobAction. + + :param type: Gets or sets the job action type. Possible values include: + 'Http', 'Https', 'StorageQueue', 'ServiceBusQueue', 'ServiceBusTopic' + :type type: str or ~azure.mgmt.scheduler.models.JobActionType + :param request: Gets or sets the http requests. + :type request: ~azure.mgmt.scheduler.models.HttpRequest + :param queue_message: Gets or sets the storage queue message. + :type queue_message: ~azure.mgmt.scheduler.models.StorageQueueMessage + :param service_bus_queue_message: Gets or sets the service bus queue + message. + :type service_bus_queue_message: + ~azure.mgmt.scheduler.models.ServiceBusQueueMessage + :param service_bus_topic_message: Gets or sets the service bus topic + message. + :type service_bus_topic_message: + ~azure.mgmt.scheduler.models.ServiceBusTopicMessage + :param retry_policy: Gets or sets the retry policy. + :type retry_policy: ~azure.mgmt.scheduler.models.RetryPolicy + :param error_action: Gets or sets the error action. + :type error_action: ~azure.mgmt.scheduler.models.JobErrorAction + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'JobActionType'}, + 'request': {'key': 'request', 'type': 'HttpRequest'}, + 'queue_message': {'key': 'queueMessage', 'type': 'StorageQueueMessage'}, + 'service_bus_queue_message': {'key': 'serviceBusQueueMessage', 'type': 'ServiceBusQueueMessage'}, + 'service_bus_topic_message': {'key': 'serviceBusTopicMessage', 'type': 'ServiceBusTopicMessage'}, + 'retry_policy': {'key': 'retryPolicy', 'type': 'RetryPolicy'}, + 'error_action': {'key': 'errorAction', 'type': 'JobErrorAction'}, + } + + def __init__(self, **kwargs): + super(JobAction, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.request = kwargs.get('request', None) + self.queue_message = kwargs.get('queue_message', None) + self.service_bus_queue_message = kwargs.get('service_bus_queue_message', None) + self.service_bus_topic_message = kwargs.get('service_bus_topic_message', None) + self.retry_policy = kwargs.get('retry_policy', None) + self.error_action = kwargs.get('error_action', None) + + +class JobCollectionDefinition(Model): + """JobCollectionDefinition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Gets the job collection resource identifier. + :vartype id: str + :ivar type: Gets the job collection resource type. + :vartype type: str + :param name: Gets or sets the job collection resource name. + :type name: str + :param location: Gets or sets the storage account location. + :type location: str + :param tags: Gets or sets the tags. + :type tags: dict[str, str] + :param properties: Gets or sets the job collection properties. + :type properties: ~azure.mgmt.scheduler.models.JobCollectionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'JobCollectionProperties'}, + } + + def __init__(self, **kwargs): + super(JobCollectionDefinition, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.properties = kwargs.get('properties', None) + + +class JobCollectionProperties(Model): + """JobCollectionProperties. + + :param sku: Gets or sets the SKU. + :type sku: ~azure.mgmt.scheduler.models.Sku + :param state: Gets or sets the state. Possible values include: 'Enabled', + 'Disabled', 'Suspended', 'Deleted' + :type state: str or ~azure.mgmt.scheduler.models.JobCollectionState + :param quota: Gets or sets the job collection quota. + :type quota: ~azure.mgmt.scheduler.models.JobCollectionQuota + """ + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'state': {'key': 'state', 'type': 'JobCollectionState'}, + 'quota': {'key': 'quota', 'type': 'JobCollectionQuota'}, + } + + def __init__(self, **kwargs): + super(JobCollectionProperties, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.state = kwargs.get('state', None) + self.quota = kwargs.get('quota', None) + + +class JobCollectionQuota(Model): + """JobCollectionQuota. + + :param max_job_count: Gets or set the maximum job count. + :type max_job_count: int + :param max_job_occurrence: Gets or sets the maximum job occurrence. + :type max_job_occurrence: int + :param max_recurrence: Gets or set the maximum recurrence. + :type max_recurrence: ~azure.mgmt.scheduler.models.JobMaxRecurrence + """ + + _attribute_map = { + 'max_job_count': {'key': 'maxJobCount', 'type': 'int'}, + 'max_job_occurrence': {'key': 'maxJobOccurrence', 'type': 'int'}, + 'max_recurrence': {'key': 'maxRecurrence', 'type': 'JobMaxRecurrence'}, + } + + def __init__(self, **kwargs): + super(JobCollectionQuota, self).__init__(**kwargs) + self.max_job_count = kwargs.get('max_job_count', None) + self.max_job_occurrence = kwargs.get('max_job_occurrence', None) + self.max_recurrence = kwargs.get('max_recurrence', None) + + +class JobDefinition(Model): + """JobDefinition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Gets the job resource identifier. + :vartype id: str + :ivar type: Gets the job resource type. + :vartype type: str + :ivar name: Gets the job resource name. + :vartype name: str + :param properties: Gets or sets the job properties. + :type properties: ~azure.mgmt.scheduler.models.JobProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'JobProperties'}, + } + + def __init__(self, **kwargs): + super(JobDefinition, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.properties = kwargs.get('properties', None) + + +class JobErrorAction(Model): + """JobErrorAction. + + :param type: Gets or sets the job error action type. Possible values + include: 'Http', 'Https', 'StorageQueue', 'ServiceBusQueue', + 'ServiceBusTopic' + :type type: str or ~azure.mgmt.scheduler.models.JobActionType + :param request: Gets or sets the http requests. + :type request: ~azure.mgmt.scheduler.models.HttpRequest + :param queue_message: Gets or sets the storage queue message. + :type queue_message: ~azure.mgmt.scheduler.models.StorageQueueMessage + :param service_bus_queue_message: Gets or sets the service bus queue + message. + :type service_bus_queue_message: + ~azure.mgmt.scheduler.models.ServiceBusQueueMessage + :param service_bus_topic_message: Gets or sets the service bus topic + message. + :type service_bus_topic_message: + ~azure.mgmt.scheduler.models.ServiceBusTopicMessage + :param retry_policy: Gets or sets the retry policy. + :type retry_policy: ~azure.mgmt.scheduler.models.RetryPolicy + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'JobActionType'}, + 'request': {'key': 'request', 'type': 'HttpRequest'}, + 'queue_message': {'key': 'queueMessage', 'type': 'StorageQueueMessage'}, + 'service_bus_queue_message': {'key': 'serviceBusQueueMessage', 'type': 'ServiceBusQueueMessage'}, + 'service_bus_topic_message': {'key': 'serviceBusTopicMessage', 'type': 'ServiceBusTopicMessage'}, + 'retry_policy': {'key': 'retryPolicy', 'type': 'RetryPolicy'}, + } + + def __init__(self, **kwargs): + super(JobErrorAction, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.request = kwargs.get('request', None) + self.queue_message = kwargs.get('queue_message', None) + self.service_bus_queue_message = kwargs.get('service_bus_queue_message', None) + self.service_bus_topic_message = kwargs.get('service_bus_topic_message', None) + self.retry_policy = kwargs.get('retry_policy', None) + + +class JobHistoryDefinition(Model): + """JobHistoryDefinition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Gets the job history identifier. + :vartype id: str + :ivar type: Gets the job history resource type. + :vartype type: str + :ivar name: Gets the job history name. + :vartype name: str + :ivar properties: Gets or sets the job history properties. + :vartype properties: + ~azure.mgmt.scheduler.models.JobHistoryDefinitionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'JobHistoryDefinitionProperties'}, + } + + def __init__(self, **kwargs): + super(JobHistoryDefinition, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.properties = None + + +class JobHistoryDefinitionProperties(Model): + """JobHistoryDefinitionProperties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar start_time: Gets the start time for this job. + :vartype start_time: datetime + :ivar end_time: Gets the end time for this job. + :vartype end_time: datetime + :ivar expected_execution_time: Gets the expected execution time for this + job. + :vartype expected_execution_time: datetime + :ivar action_name: Gets the job history action name. Possible values + include: 'MainAction', 'ErrorAction' + :vartype action_name: str or + ~azure.mgmt.scheduler.models.JobHistoryActionName + :ivar status: Gets the job history status. Possible values include: + 'Completed', 'Failed', 'Postponed' + :vartype status: str or ~azure.mgmt.scheduler.models.JobExecutionStatus + :ivar message: Gets the message for the job history. + :vartype message: str + :ivar retry_count: Gets the retry count for job. + :vartype retry_count: int + :ivar repeat_count: Gets the repeat count for the job. + :vartype repeat_count: int + """ + + _validation = { + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'expected_execution_time': {'readonly': True}, + 'action_name': {'readonly': True}, + 'status': {'readonly': True}, + 'message': {'readonly': True}, + 'retry_count': {'readonly': True}, + 'repeat_count': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'expected_execution_time': {'key': 'expectedExecutionTime', 'type': 'iso-8601'}, + 'action_name': {'key': 'actionName', 'type': 'JobHistoryActionName'}, + 'status': {'key': 'status', 'type': 'JobExecutionStatus'}, + 'message': {'key': 'message', 'type': 'str'}, + 'retry_count': {'key': 'retryCount', 'type': 'int'}, + 'repeat_count': {'key': 'repeatCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(JobHistoryDefinitionProperties, self).__init__(**kwargs) + self.start_time = None + self.end_time = None + self.expected_execution_time = None + self.action_name = None + self.status = None + self.message = None + self.retry_count = None + self.repeat_count = None + + +class JobHistoryFilter(Model): + """JobHistoryFilter. + + :param status: Gets or sets the job execution status. Possible values + include: 'Completed', 'Failed', 'Postponed' + :type status: str or ~azure.mgmt.scheduler.models.JobExecutionStatus + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'JobExecutionStatus'}, + } + + def __init__(self, **kwargs): + super(JobHistoryFilter, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + + +class JobMaxRecurrence(Model): + """JobMaxRecurrence. + + :param frequency: Gets or sets the frequency of recurrence (second, + minute, hour, day, week, month). Possible values include: 'Minute', + 'Hour', 'Day', 'Week', 'Month' + :type frequency: str or ~azure.mgmt.scheduler.models.RecurrenceFrequency + :param interval: Gets or sets the interval between retries. + :type interval: int + """ + + _attribute_map = { + 'frequency': {'key': 'frequency', 'type': 'RecurrenceFrequency'}, + 'interval': {'key': 'interval', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(JobMaxRecurrence, self).__init__(**kwargs) + self.frequency = kwargs.get('frequency', None) + self.interval = kwargs.get('interval', None) + + +class JobProperties(Model): + """JobProperties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param start_time: Gets or sets the job start time. + :type start_time: datetime + :param action: Gets or sets the job action. + :type action: ~azure.mgmt.scheduler.models.JobAction + :param recurrence: Gets or sets the job recurrence. + :type recurrence: ~azure.mgmt.scheduler.models.JobRecurrence + :param state: Gets or set the job state. Possible values include: + 'Enabled', 'Disabled', 'Faulted', 'Completed' + :type state: str or ~azure.mgmt.scheduler.models.JobState + :ivar status: Gets the job status. + :vartype status: ~azure.mgmt.scheduler.models.JobStatus + """ + + _validation = { + 'status': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'JobAction'}, + 'recurrence': {'key': 'recurrence', 'type': 'JobRecurrence'}, + 'state': {'key': 'state', 'type': 'JobState'}, + 'status': {'key': 'status', 'type': 'JobStatus'}, + } + + def __init__(self, **kwargs): + super(JobProperties, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.action = kwargs.get('action', None) + self.recurrence = kwargs.get('recurrence', None) + self.state = kwargs.get('state', None) + self.status = None + + +class JobRecurrence(Model): + """JobRecurrence. + + :param frequency: Gets or sets the frequency of recurrence (second, + minute, hour, day, week, month). Possible values include: 'Minute', + 'Hour', 'Day', 'Week', 'Month' + :type frequency: str or ~azure.mgmt.scheduler.models.RecurrenceFrequency + :param interval: Gets or sets the interval between retries. + :type interval: int + :param count: Gets or sets the maximum number of times that the job should + run. + :type count: int + :param end_time: Gets or sets the time at which the job will complete. + :type end_time: datetime + :param schedule: + :type schedule: ~azure.mgmt.scheduler.models.JobRecurrenceSchedule + """ + + _attribute_map = { + 'frequency': {'key': 'frequency', 'type': 'RecurrenceFrequency'}, + 'interval': {'key': 'interval', 'type': 'int'}, + 'count': {'key': 'count', 'type': 'int'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'schedule': {'key': 'schedule', 'type': 'JobRecurrenceSchedule'}, + } + + def __init__(self, **kwargs): + super(JobRecurrence, self).__init__(**kwargs) + self.frequency = kwargs.get('frequency', None) + self.interval = kwargs.get('interval', None) + self.count = kwargs.get('count', None) + self.end_time = kwargs.get('end_time', None) + self.schedule = kwargs.get('schedule', None) + + +class JobRecurrenceSchedule(Model): + """JobRecurrenceSchedule. + + :param week_days: Gets or sets the days of the week that the job should + execute on. + :type week_days: list[str or ~azure.mgmt.scheduler.models.DayOfWeek] + :param hours: Gets or sets the hours of the day that the job should + execute at. + :type hours: list[int] + :param minutes: Gets or sets the minutes of the hour that the job should + execute at. + :type minutes: list[int] + :param month_days: Gets or sets the days of the month that the job should + execute on. Must be between 1 and 31. + :type month_days: list[int] + :param monthly_occurrences: Gets or sets the occurrences of days within a + month. + :type monthly_occurrences: + list[~azure.mgmt.scheduler.models.JobRecurrenceScheduleMonthlyOccurrence] + """ + + _attribute_map = { + 'week_days': {'key': 'weekDays', 'type': '[DayOfWeek]'}, + 'hours': {'key': 'hours', 'type': '[int]'}, + 'minutes': {'key': 'minutes', 'type': '[int]'}, + 'month_days': {'key': 'monthDays', 'type': '[int]'}, + 'monthly_occurrences': {'key': 'monthlyOccurrences', 'type': '[JobRecurrenceScheduleMonthlyOccurrence]'}, + } + + def __init__(self, **kwargs): + super(JobRecurrenceSchedule, self).__init__(**kwargs) + self.week_days = kwargs.get('week_days', None) + self.hours = kwargs.get('hours', None) + self.minutes = kwargs.get('minutes', None) + self.month_days = kwargs.get('month_days', None) + self.monthly_occurrences = kwargs.get('monthly_occurrences', None) + + +class JobRecurrenceScheduleMonthlyOccurrence(Model): + """JobRecurrenceScheduleMonthlyOccurrence. + + :param day: Gets or sets the day. Must be one of monday, tuesday, + wednesday, thursday, friday, saturday, sunday. Possible values include: + 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', + 'Sunday' + :type day: str or ~azure.mgmt.scheduler.models.JobScheduleDay + :param occurrence: Gets or sets the occurrence. Must be between -5 and 5. + :type occurrence: int + """ + + _attribute_map = { + 'day': {'key': 'day', 'type': 'JobScheduleDay'}, + 'occurrence': {'key': 'Occurrence', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(JobRecurrenceScheduleMonthlyOccurrence, self).__init__(**kwargs) + self.day = kwargs.get('day', None) + self.occurrence = kwargs.get('occurrence', None) + + +class JobStateFilter(Model): + """JobStateFilter. + + :param state: Gets or sets the job state. Possible values include: + 'Enabled', 'Disabled', 'Faulted', 'Completed' + :type state: str or ~azure.mgmt.scheduler.models.JobState + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'JobState'}, + } + + def __init__(self, **kwargs): + super(JobStateFilter, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + + +class JobStatus(Model): + """JobStatus. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar execution_count: Gets the number of times this job has executed. + :vartype execution_count: int + :ivar failure_count: Gets the number of times this job has failed. + :vartype failure_count: int + :ivar faulted_count: Gets the number of faulted occurrences (occurrences + that were retried and failed as many times as the retry policy states). + :vartype faulted_count: int + :ivar last_execution_time: Gets the time the last occurrence executed in + ISO-8601 format. Could be empty if job has not run yet. + :vartype last_execution_time: datetime + :ivar next_execution_time: Gets the time of the next occurrence in + ISO-8601 format. Could be empty if the job is completed. + :vartype next_execution_time: datetime + """ + + _validation = { + 'execution_count': {'readonly': True}, + 'failure_count': {'readonly': True}, + 'faulted_count': {'readonly': True}, + 'last_execution_time': {'readonly': True}, + 'next_execution_time': {'readonly': True}, + } + + _attribute_map = { + 'execution_count': {'key': 'executionCount', 'type': 'int'}, + 'failure_count': {'key': 'failureCount', 'type': 'int'}, + 'faulted_count': {'key': 'faultedCount', 'type': 'int'}, + 'last_execution_time': {'key': 'lastExecutionTime', 'type': 'iso-8601'}, + 'next_execution_time': {'key': 'nextExecutionTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(JobStatus, self).__init__(**kwargs) + self.execution_count = None + self.failure_count = None + self.faulted_count = None + self.last_execution_time = None + self.next_execution_time = None + + +class OAuthAuthentication(HttpAuthentication): + """OAuthAuthentication. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param secret: Gets or sets the secret, return value will always be empty. + :type secret: str + :param tenant: Gets or sets the tenant. + :type tenant: str + :param audience: Gets or sets the audience. + :type audience: str + :param client_id: Gets or sets the client identifier. + :type client_id: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'secret': {'key': 'secret', 'type': 'str'}, + 'tenant': {'key': 'tenant', 'type': 'str'}, + 'audience': {'key': 'audience', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OAuthAuthentication, self).__init__(**kwargs) + self.secret = kwargs.get('secret', None) + self.tenant = kwargs.get('tenant', None) + self.audience = kwargs.get('audience', None) + self.client_id = kwargs.get('client_id', None) + self.type = 'ActiveDirectoryOAuth' + + +class RetryPolicy(Model): + """RetryPolicy. + + :param retry_type: Gets or sets the retry strategy to be used. Possible + values include: 'None', 'Fixed' + :type retry_type: str or ~azure.mgmt.scheduler.models.RetryType + :param retry_interval: Gets or sets the retry interval between retries, + specify duration in ISO 8601 format. + :type retry_interval: timedelta + :param retry_count: Gets or sets the number of times a retry should be + attempted. + :type retry_count: int + """ + + _attribute_map = { + 'retry_type': {'key': 'retryType', 'type': 'RetryType'}, + 'retry_interval': {'key': 'retryInterval', 'type': 'duration'}, + 'retry_count': {'key': 'retryCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RetryPolicy, self).__init__(**kwargs) + self.retry_type = kwargs.get('retry_type', None) + self.retry_interval = kwargs.get('retry_interval', None) + self.retry_count = kwargs.get('retry_count', None) + + +class ServiceBusAuthentication(Model): + """ServiceBusAuthentication. + + :param sas_key: Gets or sets the SAS key. + :type sas_key: str + :param sas_key_name: Gets or sets the SAS key name. + :type sas_key_name: str + :param type: Gets or sets the authentication type. Possible values + include: 'NotSpecified', 'SharedAccessKey' + :type type: str or + ~azure.mgmt.scheduler.models.ServiceBusAuthenticationType + """ + + _attribute_map = { + 'sas_key': {'key': 'sasKey', 'type': 'str'}, + 'sas_key_name': {'key': 'sasKeyName', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ServiceBusAuthenticationType'}, + } + + def __init__(self, **kwargs): + super(ServiceBusAuthentication, self).__init__(**kwargs) + self.sas_key = kwargs.get('sas_key', None) + self.sas_key_name = kwargs.get('sas_key_name', None) + self.type = kwargs.get('type', None) + + +class ServiceBusBrokeredMessageProperties(Model): + """ServiceBusBrokeredMessageProperties. + + :param content_type: Gets or sets the content type. + :type content_type: str + :param correlation_id: Gets or sets the correlation ID. + :type correlation_id: str + :param force_persistence: Gets or sets the force persistence. + :type force_persistence: bool + :param label: Gets or sets the label. + :type label: str + :param message_id: Gets or sets the message ID. + :type message_id: str + :param partition_key: Gets or sets the partition key. + :type partition_key: str + :param reply_to: Gets or sets the reply to. + :type reply_to: str + :param reply_to_session_id: Gets or sets the reply to session ID. + :type reply_to_session_id: str + :param scheduled_enqueue_time_utc: Gets or sets the scheduled enqueue time + UTC. + :type scheduled_enqueue_time_utc: datetime + :param session_id: Gets or sets the session ID. + :type session_id: str + :param time_to_live: Gets or sets the time to live. + :type time_to_live: timedelta + :param to: Gets or sets the to. + :type to: str + :param via_partition_key: Gets or sets the via partition key. + :type via_partition_key: str + """ + + _attribute_map = { + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'force_persistence': {'key': 'forcePersistence', 'type': 'bool'}, + 'label': {'key': 'label', 'type': 'str'}, + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'partition_key': {'key': 'partitionKey', 'type': 'str'}, + 'reply_to': {'key': 'replyTo', 'type': 'str'}, + 'reply_to_session_id': {'key': 'replyToSessionId', 'type': 'str'}, + 'scheduled_enqueue_time_utc': {'key': 'scheduledEnqueueTimeUtc', 'type': 'iso-8601'}, + 'session_id': {'key': 'sessionId', 'type': 'str'}, + 'time_to_live': {'key': 'timeToLive', 'type': 'duration'}, + 'to': {'key': 'to', 'type': 'str'}, + 'via_partition_key': {'key': 'viaPartitionKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceBusBrokeredMessageProperties, self).__init__(**kwargs) + self.content_type = kwargs.get('content_type', None) + self.correlation_id = kwargs.get('correlation_id', None) + self.force_persistence = kwargs.get('force_persistence', None) + self.label = kwargs.get('label', None) + self.message_id = kwargs.get('message_id', None) + self.partition_key = kwargs.get('partition_key', None) + self.reply_to = kwargs.get('reply_to', None) + self.reply_to_session_id = kwargs.get('reply_to_session_id', None) + self.scheduled_enqueue_time_utc = kwargs.get('scheduled_enqueue_time_utc', None) + self.session_id = kwargs.get('session_id', None) + self.time_to_live = kwargs.get('time_to_live', None) + self.to = kwargs.get('to', None) + self.via_partition_key = kwargs.get('via_partition_key', None) + + +class ServiceBusMessage(Model): + """ServiceBusMessage. + + :param authentication: Gets or sets the Service Bus authentication. + :type authentication: + ~azure.mgmt.scheduler.models.ServiceBusAuthentication + :param brokered_message_properties: Gets or sets the brokered message + properties. + :type brokered_message_properties: + ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties + :param custom_message_properties: Gets or sets the custom message + properties. + :type custom_message_properties: dict[str, str] + :param message: Gets or sets the message. + :type message: str + :param namespace: Gets or sets the namespace. + :type namespace: str + :param transport_type: Gets or sets the transport type. Possible values + include: 'NotSpecified', 'NetMessaging', 'AMQP' + :type transport_type: str or + ~azure.mgmt.scheduler.models.ServiceBusTransportType + """ + + _attribute_map = { + 'authentication': {'key': 'authentication', 'type': 'ServiceBusAuthentication'}, + 'brokered_message_properties': {'key': 'brokeredMessageProperties', 'type': 'ServiceBusBrokeredMessageProperties'}, + 'custom_message_properties': {'key': 'customMessageProperties', 'type': '{str}'}, + 'message': {'key': 'message', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'transport_type': {'key': 'transportType', 'type': 'ServiceBusTransportType'}, + } + + def __init__(self, **kwargs): + super(ServiceBusMessage, self).__init__(**kwargs) + self.authentication = kwargs.get('authentication', None) + self.brokered_message_properties = kwargs.get('brokered_message_properties', None) + self.custom_message_properties = kwargs.get('custom_message_properties', None) + self.message = kwargs.get('message', None) + self.namespace = kwargs.get('namespace', None) + self.transport_type = kwargs.get('transport_type', None) + + +class ServiceBusQueueMessage(ServiceBusMessage): + """ServiceBusQueueMessage. + + :param authentication: Gets or sets the Service Bus authentication. + :type authentication: + ~azure.mgmt.scheduler.models.ServiceBusAuthentication + :param brokered_message_properties: Gets or sets the brokered message + properties. + :type brokered_message_properties: + ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties + :param custom_message_properties: Gets or sets the custom message + properties. + :type custom_message_properties: dict[str, str] + :param message: Gets or sets the message. + :type message: str + :param namespace: Gets or sets the namespace. + :type namespace: str + :param transport_type: Gets or sets the transport type. Possible values + include: 'NotSpecified', 'NetMessaging', 'AMQP' + :type transport_type: str or + ~azure.mgmt.scheduler.models.ServiceBusTransportType + :param queue_name: Gets or sets the queue name. + :type queue_name: str + """ + + _attribute_map = { + 'authentication': {'key': 'authentication', 'type': 'ServiceBusAuthentication'}, + 'brokered_message_properties': {'key': 'brokeredMessageProperties', 'type': 'ServiceBusBrokeredMessageProperties'}, + 'custom_message_properties': {'key': 'customMessageProperties', 'type': '{str}'}, + 'message': {'key': 'message', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'transport_type': {'key': 'transportType', 'type': 'ServiceBusTransportType'}, + 'queue_name': {'key': 'queueName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceBusQueueMessage, self).__init__(**kwargs) + self.queue_name = kwargs.get('queue_name', None) + + +class ServiceBusTopicMessage(ServiceBusMessage): + """ServiceBusTopicMessage. + + :param authentication: Gets or sets the Service Bus authentication. + :type authentication: + ~azure.mgmt.scheduler.models.ServiceBusAuthentication + :param brokered_message_properties: Gets or sets the brokered message + properties. + :type brokered_message_properties: + ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties + :param custom_message_properties: Gets or sets the custom message + properties. + :type custom_message_properties: dict[str, str] + :param message: Gets or sets the message. + :type message: str + :param namespace: Gets or sets the namespace. + :type namespace: str + :param transport_type: Gets or sets the transport type. Possible values + include: 'NotSpecified', 'NetMessaging', 'AMQP' + :type transport_type: str or + ~azure.mgmt.scheduler.models.ServiceBusTransportType + :param topic_path: Gets or sets the topic path. + :type topic_path: str + """ + + _attribute_map = { + 'authentication': {'key': 'authentication', 'type': 'ServiceBusAuthentication'}, + 'brokered_message_properties': {'key': 'brokeredMessageProperties', 'type': 'ServiceBusBrokeredMessageProperties'}, + 'custom_message_properties': {'key': 'customMessageProperties', 'type': '{str}'}, + 'message': {'key': 'message', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'transport_type': {'key': 'transportType', 'type': 'ServiceBusTransportType'}, + 'topic_path': {'key': 'topicPath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceBusTopicMessage, self).__init__(**kwargs) + self.topic_path = kwargs.get('topic_path', None) + + +class Sku(Model): + """Sku. + + :param name: Gets or set the SKU. Possible values include: 'Standard', + 'Free', 'P10Premium', 'P20Premium' + :type name: str or ~azure.mgmt.scheduler.models.SkuDefinition + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'SkuDefinition'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class StorageQueueMessage(Model): + """StorageQueueMessage. + + :param storage_account: Gets or sets the storage account name. + :type storage_account: str + :param queue_name: Gets or sets the queue name. + :type queue_name: str + :param sas_token: Gets or sets the SAS key. + :type sas_token: str + :param message: Gets or sets the message. + :type message: str + """ + + _attribute_map = { + 'storage_account': {'key': 'storageAccount', 'type': 'str'}, + 'queue_name': {'key': 'queueName', 'type': 'str'}, + 'sas_token': {'key': 'sasToken', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageQueueMessage, self).__init__(**kwargs) + self.storage_account = kwargs.get('storage_account', None) + self.queue_name = kwargs.get('queue_name', None) + self.sas_token = kwargs.get('sas_token', None) + self.message = kwargs.get('message', None) diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/_models_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/_models_py3.py new file mode 100644 index 000000000000..643ce6428f40 --- /dev/null +++ b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/_models_py3.py @@ -0,0 +1,1039 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HttpAuthentication(Model): + """HttpAuthentication. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ClientCertAuthentication, BasicAuthentication, + OAuthAuthentication + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'ClientCertificate': 'ClientCertAuthentication', 'Basic': 'BasicAuthentication', 'ActiveDirectoryOAuth': 'OAuthAuthentication'} + } + + def __init__(self, **kwargs) -> None: + super(HttpAuthentication, self).__init__(**kwargs) + self.type = None + + +class BasicAuthentication(HttpAuthentication): + """BasicAuthentication. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param username: Gets or sets the username. + :type username: str + :param password: Gets or sets the password, return value will always be + empty. + :type password: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, *, username: str=None, password: str=None, **kwargs) -> None: + super(BasicAuthentication, self).__init__(**kwargs) + self.username = username + self.password = password + self.type = 'Basic' + + +class ClientCertAuthentication(HttpAuthentication): + """ClientCertAuthentication. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param password: Gets or sets the certificate password, return value will + always be empty. + :type password: str + :param pfx: Gets or sets the pfx certificate. Accepts certification in + base64 encoding, return value will always be empty. + :type pfx: str + :param certificate_thumbprint: Gets or sets the certificate thumbprint. + :type certificate_thumbprint: str + :param certificate_expiration_date: Gets or sets the certificate + expiration date. + :type certificate_expiration_date: datetime + :param certificate_subject_name: Gets or sets the certificate subject + name. + :type certificate_subject_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'pfx': {'key': 'pfx', 'type': 'str'}, + 'certificate_thumbprint': {'key': 'certificateThumbprint', 'type': 'str'}, + 'certificate_expiration_date': {'key': 'certificateExpirationDate', 'type': 'iso-8601'}, + 'certificate_subject_name': {'key': 'certificateSubjectName', 'type': 'str'}, + } + + def __init__(self, *, password: str=None, pfx: str=None, certificate_thumbprint: str=None, certificate_expiration_date=None, certificate_subject_name: str=None, **kwargs) -> None: + super(ClientCertAuthentication, self).__init__(**kwargs) + self.password = password + self.pfx = pfx + self.certificate_thumbprint = certificate_thumbprint + self.certificate_expiration_date = certificate_expiration_date + self.certificate_subject_name = certificate_subject_name + self.type = 'ClientCertificate' + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class HttpRequest(Model): + """HttpRequest. + + :param authentication: Gets or sets the authentication method of the + request. + :type authentication: ~azure.mgmt.scheduler.models.HttpAuthentication + :param uri: Gets or sets the URI of the request. + :type uri: str + :param method: Gets or sets the method of the request. + :type method: str + :param body: Gets or sets the request body. + :type body: str + :param headers: Gets or sets the headers. + :type headers: dict[str, str] + """ + + _attribute_map = { + 'authentication': {'key': 'authentication', 'type': 'HttpAuthentication'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'method': {'key': 'method', 'type': 'str'}, + 'body': {'key': 'body', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '{str}'}, + } + + def __init__(self, *, authentication=None, uri: str=None, method: str=None, body: str=None, headers=None, **kwargs) -> None: + super(HttpRequest, self).__init__(**kwargs) + self.authentication = authentication + self.uri = uri + self.method = method + self.body = body + self.headers = headers + + +class JobAction(Model): + """JobAction. + + :param type: Gets or sets the job action type. Possible values include: + 'Http', 'Https', 'StorageQueue', 'ServiceBusQueue', 'ServiceBusTopic' + :type type: str or ~azure.mgmt.scheduler.models.JobActionType + :param request: Gets or sets the http requests. + :type request: ~azure.mgmt.scheduler.models.HttpRequest + :param queue_message: Gets or sets the storage queue message. + :type queue_message: ~azure.mgmt.scheduler.models.StorageQueueMessage + :param service_bus_queue_message: Gets or sets the service bus queue + message. + :type service_bus_queue_message: + ~azure.mgmt.scheduler.models.ServiceBusQueueMessage + :param service_bus_topic_message: Gets or sets the service bus topic + message. + :type service_bus_topic_message: + ~azure.mgmt.scheduler.models.ServiceBusTopicMessage + :param retry_policy: Gets or sets the retry policy. + :type retry_policy: ~azure.mgmt.scheduler.models.RetryPolicy + :param error_action: Gets or sets the error action. + :type error_action: ~azure.mgmt.scheduler.models.JobErrorAction + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'JobActionType'}, + 'request': {'key': 'request', 'type': 'HttpRequest'}, + 'queue_message': {'key': 'queueMessage', 'type': 'StorageQueueMessage'}, + 'service_bus_queue_message': {'key': 'serviceBusQueueMessage', 'type': 'ServiceBusQueueMessage'}, + 'service_bus_topic_message': {'key': 'serviceBusTopicMessage', 'type': 'ServiceBusTopicMessage'}, + 'retry_policy': {'key': 'retryPolicy', 'type': 'RetryPolicy'}, + 'error_action': {'key': 'errorAction', 'type': 'JobErrorAction'}, + } + + def __init__(self, *, type=None, request=None, queue_message=None, service_bus_queue_message=None, service_bus_topic_message=None, retry_policy=None, error_action=None, **kwargs) -> None: + super(JobAction, self).__init__(**kwargs) + self.type = type + self.request = request + self.queue_message = queue_message + self.service_bus_queue_message = service_bus_queue_message + self.service_bus_topic_message = service_bus_topic_message + self.retry_policy = retry_policy + self.error_action = error_action + + +class JobCollectionDefinition(Model): + """JobCollectionDefinition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Gets the job collection resource identifier. + :vartype id: str + :ivar type: Gets the job collection resource type. + :vartype type: str + :param name: Gets or sets the job collection resource name. + :type name: str + :param location: Gets or sets the storage account location. + :type location: str + :param tags: Gets or sets the tags. + :type tags: dict[str, str] + :param properties: Gets or sets the job collection properties. + :type properties: ~azure.mgmt.scheduler.models.JobCollectionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'JobCollectionProperties'}, + } + + def __init__(self, *, name: str=None, location: str=None, tags=None, properties=None, **kwargs) -> None: + super(JobCollectionDefinition, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = name + self.location = location + self.tags = tags + self.properties = properties + + +class JobCollectionProperties(Model): + """JobCollectionProperties. + + :param sku: Gets or sets the SKU. + :type sku: ~azure.mgmt.scheduler.models.Sku + :param state: Gets or sets the state. Possible values include: 'Enabled', + 'Disabled', 'Suspended', 'Deleted' + :type state: str or ~azure.mgmt.scheduler.models.JobCollectionState + :param quota: Gets or sets the job collection quota. + :type quota: ~azure.mgmt.scheduler.models.JobCollectionQuota + """ + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'state': {'key': 'state', 'type': 'JobCollectionState'}, + 'quota': {'key': 'quota', 'type': 'JobCollectionQuota'}, + } + + def __init__(self, *, sku=None, state=None, quota=None, **kwargs) -> None: + super(JobCollectionProperties, self).__init__(**kwargs) + self.sku = sku + self.state = state + self.quota = quota + + +class JobCollectionQuota(Model): + """JobCollectionQuota. + + :param max_job_count: Gets or set the maximum job count. + :type max_job_count: int + :param max_job_occurrence: Gets or sets the maximum job occurrence. + :type max_job_occurrence: int + :param max_recurrence: Gets or set the maximum recurrence. + :type max_recurrence: ~azure.mgmt.scheduler.models.JobMaxRecurrence + """ + + _attribute_map = { + 'max_job_count': {'key': 'maxJobCount', 'type': 'int'}, + 'max_job_occurrence': {'key': 'maxJobOccurrence', 'type': 'int'}, + 'max_recurrence': {'key': 'maxRecurrence', 'type': 'JobMaxRecurrence'}, + } + + def __init__(self, *, max_job_count: int=None, max_job_occurrence: int=None, max_recurrence=None, **kwargs) -> None: + super(JobCollectionQuota, self).__init__(**kwargs) + self.max_job_count = max_job_count + self.max_job_occurrence = max_job_occurrence + self.max_recurrence = max_recurrence + + +class JobDefinition(Model): + """JobDefinition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Gets the job resource identifier. + :vartype id: str + :ivar type: Gets the job resource type. + :vartype type: str + :ivar name: Gets the job resource name. + :vartype name: str + :param properties: Gets or sets the job properties. + :type properties: ~azure.mgmt.scheduler.models.JobProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'JobProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(JobDefinition, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.properties = properties + + +class JobErrorAction(Model): + """JobErrorAction. + + :param type: Gets or sets the job error action type. Possible values + include: 'Http', 'Https', 'StorageQueue', 'ServiceBusQueue', + 'ServiceBusTopic' + :type type: str or ~azure.mgmt.scheduler.models.JobActionType + :param request: Gets or sets the http requests. + :type request: ~azure.mgmt.scheduler.models.HttpRequest + :param queue_message: Gets or sets the storage queue message. + :type queue_message: ~azure.mgmt.scheduler.models.StorageQueueMessage + :param service_bus_queue_message: Gets or sets the service bus queue + message. + :type service_bus_queue_message: + ~azure.mgmt.scheduler.models.ServiceBusQueueMessage + :param service_bus_topic_message: Gets or sets the service bus topic + message. + :type service_bus_topic_message: + ~azure.mgmt.scheduler.models.ServiceBusTopicMessage + :param retry_policy: Gets or sets the retry policy. + :type retry_policy: ~azure.mgmt.scheduler.models.RetryPolicy + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'JobActionType'}, + 'request': {'key': 'request', 'type': 'HttpRequest'}, + 'queue_message': {'key': 'queueMessage', 'type': 'StorageQueueMessage'}, + 'service_bus_queue_message': {'key': 'serviceBusQueueMessage', 'type': 'ServiceBusQueueMessage'}, + 'service_bus_topic_message': {'key': 'serviceBusTopicMessage', 'type': 'ServiceBusTopicMessage'}, + 'retry_policy': {'key': 'retryPolicy', 'type': 'RetryPolicy'}, + } + + def __init__(self, *, type=None, request=None, queue_message=None, service_bus_queue_message=None, service_bus_topic_message=None, retry_policy=None, **kwargs) -> None: + super(JobErrorAction, self).__init__(**kwargs) + self.type = type + self.request = request + self.queue_message = queue_message + self.service_bus_queue_message = service_bus_queue_message + self.service_bus_topic_message = service_bus_topic_message + self.retry_policy = retry_policy + + +class JobHistoryDefinition(Model): + """JobHistoryDefinition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Gets the job history identifier. + :vartype id: str + :ivar type: Gets the job history resource type. + :vartype type: str + :ivar name: Gets the job history name. + :vartype name: str + :ivar properties: Gets or sets the job history properties. + :vartype properties: + ~azure.mgmt.scheduler.models.JobHistoryDefinitionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'JobHistoryDefinitionProperties'}, + } + + def __init__(self, **kwargs) -> None: + super(JobHistoryDefinition, self).__init__(**kwargs) + self.id = None + self.type = None + self.name = None + self.properties = None + + +class JobHistoryDefinitionProperties(Model): + """JobHistoryDefinitionProperties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar start_time: Gets the start time for this job. + :vartype start_time: datetime + :ivar end_time: Gets the end time for this job. + :vartype end_time: datetime + :ivar expected_execution_time: Gets the expected execution time for this + job. + :vartype expected_execution_time: datetime + :ivar action_name: Gets the job history action name. Possible values + include: 'MainAction', 'ErrorAction' + :vartype action_name: str or + ~azure.mgmt.scheduler.models.JobHistoryActionName + :ivar status: Gets the job history status. Possible values include: + 'Completed', 'Failed', 'Postponed' + :vartype status: str or ~azure.mgmt.scheduler.models.JobExecutionStatus + :ivar message: Gets the message for the job history. + :vartype message: str + :ivar retry_count: Gets the retry count for job. + :vartype retry_count: int + :ivar repeat_count: Gets the repeat count for the job. + :vartype repeat_count: int + """ + + _validation = { + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'expected_execution_time': {'readonly': True}, + 'action_name': {'readonly': True}, + 'status': {'readonly': True}, + 'message': {'readonly': True}, + 'retry_count': {'readonly': True}, + 'repeat_count': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'expected_execution_time': {'key': 'expectedExecutionTime', 'type': 'iso-8601'}, + 'action_name': {'key': 'actionName', 'type': 'JobHistoryActionName'}, + 'status': {'key': 'status', 'type': 'JobExecutionStatus'}, + 'message': {'key': 'message', 'type': 'str'}, + 'retry_count': {'key': 'retryCount', 'type': 'int'}, + 'repeat_count': {'key': 'repeatCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(JobHistoryDefinitionProperties, self).__init__(**kwargs) + self.start_time = None + self.end_time = None + self.expected_execution_time = None + self.action_name = None + self.status = None + self.message = None + self.retry_count = None + self.repeat_count = None + + +class JobHistoryFilter(Model): + """JobHistoryFilter. + + :param status: Gets or sets the job execution status. Possible values + include: 'Completed', 'Failed', 'Postponed' + :type status: str or ~azure.mgmt.scheduler.models.JobExecutionStatus + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'JobExecutionStatus'}, + } + + def __init__(self, *, status=None, **kwargs) -> None: + super(JobHistoryFilter, self).__init__(**kwargs) + self.status = status + + +class JobMaxRecurrence(Model): + """JobMaxRecurrence. + + :param frequency: Gets or sets the frequency of recurrence (second, + minute, hour, day, week, month). Possible values include: 'Minute', + 'Hour', 'Day', 'Week', 'Month' + :type frequency: str or ~azure.mgmt.scheduler.models.RecurrenceFrequency + :param interval: Gets or sets the interval between retries. + :type interval: int + """ + + _attribute_map = { + 'frequency': {'key': 'frequency', 'type': 'RecurrenceFrequency'}, + 'interval': {'key': 'interval', 'type': 'int'}, + } + + def __init__(self, *, frequency=None, interval: int=None, **kwargs) -> None: + super(JobMaxRecurrence, self).__init__(**kwargs) + self.frequency = frequency + self.interval = interval + + +class JobProperties(Model): + """JobProperties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param start_time: Gets or sets the job start time. + :type start_time: datetime + :param action: Gets or sets the job action. + :type action: ~azure.mgmt.scheduler.models.JobAction + :param recurrence: Gets or sets the job recurrence. + :type recurrence: ~azure.mgmt.scheduler.models.JobRecurrence + :param state: Gets or set the job state. Possible values include: + 'Enabled', 'Disabled', 'Faulted', 'Completed' + :type state: str or ~azure.mgmt.scheduler.models.JobState + :ivar status: Gets the job status. + :vartype status: ~azure.mgmt.scheduler.models.JobStatus + """ + + _validation = { + 'status': {'readonly': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'JobAction'}, + 'recurrence': {'key': 'recurrence', 'type': 'JobRecurrence'}, + 'state': {'key': 'state', 'type': 'JobState'}, + 'status': {'key': 'status', 'type': 'JobStatus'}, + } + + def __init__(self, *, start_time=None, action=None, recurrence=None, state=None, **kwargs) -> None: + super(JobProperties, self).__init__(**kwargs) + self.start_time = start_time + self.action = action + self.recurrence = recurrence + self.state = state + self.status = None + + +class JobRecurrence(Model): + """JobRecurrence. + + :param frequency: Gets or sets the frequency of recurrence (second, + minute, hour, day, week, month). Possible values include: 'Minute', + 'Hour', 'Day', 'Week', 'Month' + :type frequency: str or ~azure.mgmt.scheduler.models.RecurrenceFrequency + :param interval: Gets or sets the interval between retries. + :type interval: int + :param count: Gets or sets the maximum number of times that the job should + run. + :type count: int + :param end_time: Gets or sets the time at which the job will complete. + :type end_time: datetime + :param schedule: + :type schedule: ~azure.mgmt.scheduler.models.JobRecurrenceSchedule + """ + + _attribute_map = { + 'frequency': {'key': 'frequency', 'type': 'RecurrenceFrequency'}, + 'interval': {'key': 'interval', 'type': 'int'}, + 'count': {'key': 'count', 'type': 'int'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'schedule': {'key': 'schedule', 'type': 'JobRecurrenceSchedule'}, + } + + def __init__(self, *, frequency=None, interval: int=None, count: int=None, end_time=None, schedule=None, **kwargs) -> None: + super(JobRecurrence, self).__init__(**kwargs) + self.frequency = frequency + self.interval = interval + self.count = count + self.end_time = end_time + self.schedule = schedule + + +class JobRecurrenceSchedule(Model): + """JobRecurrenceSchedule. + + :param week_days: Gets or sets the days of the week that the job should + execute on. + :type week_days: list[str or ~azure.mgmt.scheduler.models.DayOfWeek] + :param hours: Gets or sets the hours of the day that the job should + execute at. + :type hours: list[int] + :param minutes: Gets or sets the minutes of the hour that the job should + execute at. + :type minutes: list[int] + :param month_days: Gets or sets the days of the month that the job should + execute on. Must be between 1 and 31. + :type month_days: list[int] + :param monthly_occurrences: Gets or sets the occurrences of days within a + month. + :type monthly_occurrences: + list[~azure.mgmt.scheduler.models.JobRecurrenceScheduleMonthlyOccurrence] + """ + + _attribute_map = { + 'week_days': {'key': 'weekDays', 'type': '[DayOfWeek]'}, + 'hours': {'key': 'hours', 'type': '[int]'}, + 'minutes': {'key': 'minutes', 'type': '[int]'}, + 'month_days': {'key': 'monthDays', 'type': '[int]'}, + 'monthly_occurrences': {'key': 'monthlyOccurrences', 'type': '[JobRecurrenceScheduleMonthlyOccurrence]'}, + } + + def __init__(self, *, week_days=None, hours=None, minutes=None, month_days=None, monthly_occurrences=None, **kwargs) -> None: + super(JobRecurrenceSchedule, self).__init__(**kwargs) + self.week_days = week_days + self.hours = hours + self.minutes = minutes + self.month_days = month_days + self.monthly_occurrences = monthly_occurrences + + +class JobRecurrenceScheduleMonthlyOccurrence(Model): + """JobRecurrenceScheduleMonthlyOccurrence. + + :param day: Gets or sets the day. Must be one of monday, tuesday, + wednesday, thursday, friday, saturday, sunday. Possible values include: + 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', + 'Sunday' + :type day: str or ~azure.mgmt.scheduler.models.JobScheduleDay + :param occurrence: Gets or sets the occurrence. Must be between -5 and 5. + :type occurrence: int + """ + + _attribute_map = { + 'day': {'key': 'day', 'type': 'JobScheduleDay'}, + 'occurrence': {'key': 'Occurrence', 'type': 'int'}, + } + + def __init__(self, *, day=None, occurrence: int=None, **kwargs) -> None: + super(JobRecurrenceScheduleMonthlyOccurrence, self).__init__(**kwargs) + self.day = day + self.occurrence = occurrence + + +class JobStateFilter(Model): + """JobStateFilter. + + :param state: Gets or sets the job state. Possible values include: + 'Enabled', 'Disabled', 'Faulted', 'Completed' + :type state: str or ~azure.mgmt.scheduler.models.JobState + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'JobState'}, + } + + def __init__(self, *, state=None, **kwargs) -> None: + super(JobStateFilter, self).__init__(**kwargs) + self.state = state + + +class JobStatus(Model): + """JobStatus. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar execution_count: Gets the number of times this job has executed. + :vartype execution_count: int + :ivar failure_count: Gets the number of times this job has failed. + :vartype failure_count: int + :ivar faulted_count: Gets the number of faulted occurrences (occurrences + that were retried and failed as many times as the retry policy states). + :vartype faulted_count: int + :ivar last_execution_time: Gets the time the last occurrence executed in + ISO-8601 format. Could be empty if job has not run yet. + :vartype last_execution_time: datetime + :ivar next_execution_time: Gets the time of the next occurrence in + ISO-8601 format. Could be empty if the job is completed. + :vartype next_execution_time: datetime + """ + + _validation = { + 'execution_count': {'readonly': True}, + 'failure_count': {'readonly': True}, + 'faulted_count': {'readonly': True}, + 'last_execution_time': {'readonly': True}, + 'next_execution_time': {'readonly': True}, + } + + _attribute_map = { + 'execution_count': {'key': 'executionCount', 'type': 'int'}, + 'failure_count': {'key': 'failureCount', 'type': 'int'}, + 'faulted_count': {'key': 'faultedCount', 'type': 'int'}, + 'last_execution_time': {'key': 'lastExecutionTime', 'type': 'iso-8601'}, + 'next_execution_time': {'key': 'nextExecutionTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(JobStatus, self).__init__(**kwargs) + self.execution_count = None + self.failure_count = None + self.faulted_count = None + self.last_execution_time = None + self.next_execution_time = None + + +class OAuthAuthentication(HttpAuthentication): + """OAuthAuthentication. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param secret: Gets or sets the secret, return value will always be empty. + :type secret: str + :param tenant: Gets or sets the tenant. + :type tenant: str + :param audience: Gets or sets the audience. + :type audience: str + :param client_id: Gets or sets the client identifier. + :type client_id: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'secret': {'key': 'secret', 'type': 'str'}, + 'tenant': {'key': 'tenant', 'type': 'str'}, + 'audience': {'key': 'audience', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, *, secret: str=None, tenant: str=None, audience: str=None, client_id: str=None, **kwargs) -> None: + super(OAuthAuthentication, self).__init__(**kwargs) + self.secret = secret + self.tenant = tenant + self.audience = audience + self.client_id = client_id + self.type = 'ActiveDirectoryOAuth' + + +class RetryPolicy(Model): + """RetryPolicy. + + :param retry_type: Gets or sets the retry strategy to be used. Possible + values include: 'None', 'Fixed' + :type retry_type: str or ~azure.mgmt.scheduler.models.RetryType + :param retry_interval: Gets or sets the retry interval between retries, + specify duration in ISO 8601 format. + :type retry_interval: timedelta + :param retry_count: Gets or sets the number of times a retry should be + attempted. + :type retry_count: int + """ + + _attribute_map = { + 'retry_type': {'key': 'retryType', 'type': 'RetryType'}, + 'retry_interval': {'key': 'retryInterval', 'type': 'duration'}, + 'retry_count': {'key': 'retryCount', 'type': 'int'}, + } + + def __init__(self, *, retry_type=None, retry_interval=None, retry_count: int=None, **kwargs) -> None: + super(RetryPolicy, self).__init__(**kwargs) + self.retry_type = retry_type + self.retry_interval = retry_interval + self.retry_count = retry_count + + +class ServiceBusAuthentication(Model): + """ServiceBusAuthentication. + + :param sas_key: Gets or sets the SAS key. + :type sas_key: str + :param sas_key_name: Gets or sets the SAS key name. + :type sas_key_name: str + :param type: Gets or sets the authentication type. Possible values + include: 'NotSpecified', 'SharedAccessKey' + :type type: str or + ~azure.mgmt.scheduler.models.ServiceBusAuthenticationType + """ + + _attribute_map = { + 'sas_key': {'key': 'sasKey', 'type': 'str'}, + 'sas_key_name': {'key': 'sasKeyName', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ServiceBusAuthenticationType'}, + } + + def __init__(self, *, sas_key: str=None, sas_key_name: str=None, type=None, **kwargs) -> None: + super(ServiceBusAuthentication, self).__init__(**kwargs) + self.sas_key = sas_key + self.sas_key_name = sas_key_name + self.type = type + + +class ServiceBusBrokeredMessageProperties(Model): + """ServiceBusBrokeredMessageProperties. + + :param content_type: Gets or sets the content type. + :type content_type: str + :param correlation_id: Gets or sets the correlation ID. + :type correlation_id: str + :param force_persistence: Gets or sets the force persistence. + :type force_persistence: bool + :param label: Gets or sets the label. + :type label: str + :param message_id: Gets or sets the message ID. + :type message_id: str + :param partition_key: Gets or sets the partition key. + :type partition_key: str + :param reply_to: Gets or sets the reply to. + :type reply_to: str + :param reply_to_session_id: Gets or sets the reply to session ID. + :type reply_to_session_id: str + :param scheduled_enqueue_time_utc: Gets or sets the scheduled enqueue time + UTC. + :type scheduled_enqueue_time_utc: datetime + :param session_id: Gets or sets the session ID. + :type session_id: str + :param time_to_live: Gets or sets the time to live. + :type time_to_live: timedelta + :param to: Gets or sets the to. + :type to: str + :param via_partition_key: Gets or sets the via partition key. + :type via_partition_key: str + """ + + _attribute_map = { + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'force_persistence': {'key': 'forcePersistence', 'type': 'bool'}, + 'label': {'key': 'label', 'type': 'str'}, + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'partition_key': {'key': 'partitionKey', 'type': 'str'}, + 'reply_to': {'key': 'replyTo', 'type': 'str'}, + 'reply_to_session_id': {'key': 'replyToSessionId', 'type': 'str'}, + 'scheduled_enqueue_time_utc': {'key': 'scheduledEnqueueTimeUtc', 'type': 'iso-8601'}, + 'session_id': {'key': 'sessionId', 'type': 'str'}, + 'time_to_live': {'key': 'timeToLive', 'type': 'duration'}, + 'to': {'key': 'to', 'type': 'str'}, + 'via_partition_key': {'key': 'viaPartitionKey', 'type': 'str'}, + } + + def __init__(self, *, content_type: str=None, correlation_id: str=None, force_persistence: bool=None, label: str=None, message_id: str=None, partition_key: str=None, reply_to: str=None, reply_to_session_id: str=None, scheduled_enqueue_time_utc=None, session_id: str=None, time_to_live=None, to: str=None, via_partition_key: str=None, **kwargs) -> None: + super(ServiceBusBrokeredMessageProperties, self).__init__(**kwargs) + self.content_type = content_type + self.correlation_id = correlation_id + self.force_persistence = force_persistence + self.label = label + self.message_id = message_id + self.partition_key = partition_key + self.reply_to = reply_to + self.reply_to_session_id = reply_to_session_id + self.scheduled_enqueue_time_utc = scheduled_enqueue_time_utc + self.session_id = session_id + self.time_to_live = time_to_live + self.to = to + self.via_partition_key = via_partition_key + + +class ServiceBusMessage(Model): + """ServiceBusMessage. + + :param authentication: Gets or sets the Service Bus authentication. + :type authentication: + ~azure.mgmt.scheduler.models.ServiceBusAuthentication + :param brokered_message_properties: Gets or sets the brokered message + properties. + :type brokered_message_properties: + ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties + :param custom_message_properties: Gets or sets the custom message + properties. + :type custom_message_properties: dict[str, str] + :param message: Gets or sets the message. + :type message: str + :param namespace: Gets or sets the namespace. + :type namespace: str + :param transport_type: Gets or sets the transport type. Possible values + include: 'NotSpecified', 'NetMessaging', 'AMQP' + :type transport_type: str or + ~azure.mgmt.scheduler.models.ServiceBusTransportType + """ + + _attribute_map = { + 'authentication': {'key': 'authentication', 'type': 'ServiceBusAuthentication'}, + 'brokered_message_properties': {'key': 'brokeredMessageProperties', 'type': 'ServiceBusBrokeredMessageProperties'}, + 'custom_message_properties': {'key': 'customMessageProperties', 'type': '{str}'}, + 'message': {'key': 'message', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'transport_type': {'key': 'transportType', 'type': 'ServiceBusTransportType'}, + } + + def __init__(self, *, authentication=None, brokered_message_properties=None, custom_message_properties=None, message: str=None, namespace: str=None, transport_type=None, **kwargs) -> None: + super(ServiceBusMessage, self).__init__(**kwargs) + self.authentication = authentication + self.brokered_message_properties = brokered_message_properties + self.custom_message_properties = custom_message_properties + self.message = message + self.namespace = namespace + self.transport_type = transport_type + + +class ServiceBusQueueMessage(ServiceBusMessage): + """ServiceBusQueueMessage. + + :param authentication: Gets or sets the Service Bus authentication. + :type authentication: + ~azure.mgmt.scheduler.models.ServiceBusAuthentication + :param brokered_message_properties: Gets or sets the brokered message + properties. + :type brokered_message_properties: + ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties + :param custom_message_properties: Gets or sets the custom message + properties. + :type custom_message_properties: dict[str, str] + :param message: Gets or sets the message. + :type message: str + :param namespace: Gets or sets the namespace. + :type namespace: str + :param transport_type: Gets or sets the transport type. Possible values + include: 'NotSpecified', 'NetMessaging', 'AMQP' + :type transport_type: str or + ~azure.mgmt.scheduler.models.ServiceBusTransportType + :param queue_name: Gets or sets the queue name. + :type queue_name: str + """ + + _attribute_map = { + 'authentication': {'key': 'authentication', 'type': 'ServiceBusAuthentication'}, + 'brokered_message_properties': {'key': 'brokeredMessageProperties', 'type': 'ServiceBusBrokeredMessageProperties'}, + 'custom_message_properties': {'key': 'customMessageProperties', 'type': '{str}'}, + 'message': {'key': 'message', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'transport_type': {'key': 'transportType', 'type': 'ServiceBusTransportType'}, + 'queue_name': {'key': 'queueName', 'type': 'str'}, + } + + def __init__(self, *, authentication=None, brokered_message_properties=None, custom_message_properties=None, message: str=None, namespace: str=None, transport_type=None, queue_name: str=None, **kwargs) -> None: + super(ServiceBusQueueMessage, self).__init__(authentication=authentication, brokered_message_properties=brokered_message_properties, custom_message_properties=custom_message_properties, message=message, namespace=namespace, transport_type=transport_type, **kwargs) + self.queue_name = queue_name + + +class ServiceBusTopicMessage(ServiceBusMessage): + """ServiceBusTopicMessage. + + :param authentication: Gets or sets the Service Bus authentication. + :type authentication: + ~azure.mgmt.scheduler.models.ServiceBusAuthentication + :param brokered_message_properties: Gets or sets the brokered message + properties. + :type brokered_message_properties: + ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties + :param custom_message_properties: Gets or sets the custom message + properties. + :type custom_message_properties: dict[str, str] + :param message: Gets or sets the message. + :type message: str + :param namespace: Gets or sets the namespace. + :type namespace: str + :param transport_type: Gets or sets the transport type. Possible values + include: 'NotSpecified', 'NetMessaging', 'AMQP' + :type transport_type: str or + ~azure.mgmt.scheduler.models.ServiceBusTransportType + :param topic_path: Gets or sets the topic path. + :type topic_path: str + """ + + _attribute_map = { + 'authentication': {'key': 'authentication', 'type': 'ServiceBusAuthentication'}, + 'brokered_message_properties': {'key': 'brokeredMessageProperties', 'type': 'ServiceBusBrokeredMessageProperties'}, + 'custom_message_properties': {'key': 'customMessageProperties', 'type': '{str}'}, + 'message': {'key': 'message', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'transport_type': {'key': 'transportType', 'type': 'ServiceBusTransportType'}, + 'topic_path': {'key': 'topicPath', 'type': 'str'}, + } + + def __init__(self, *, authentication=None, brokered_message_properties=None, custom_message_properties=None, message: str=None, namespace: str=None, transport_type=None, topic_path: str=None, **kwargs) -> None: + super(ServiceBusTopicMessage, self).__init__(authentication=authentication, brokered_message_properties=brokered_message_properties, custom_message_properties=custom_message_properties, message=message, namespace=namespace, transport_type=transport_type, **kwargs) + self.topic_path = topic_path + + +class Sku(Model): + """Sku. + + :param name: Gets or set the SKU. Possible values include: 'Standard', + 'Free', 'P10Premium', 'P20Premium' + :type name: str or ~azure.mgmt.scheduler.models.SkuDefinition + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'SkuDefinition'}, + } + + def __init__(self, *, name=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + + +class StorageQueueMessage(Model): + """StorageQueueMessage. + + :param storage_account: Gets or sets the storage account name. + :type storage_account: str + :param queue_name: Gets or sets the queue name. + :type queue_name: str + :param sas_token: Gets or sets the SAS key. + :type sas_token: str + :param message: Gets or sets the message. + :type message: str + """ + + _attribute_map = { + 'storage_account': {'key': 'storageAccount', 'type': 'str'}, + 'queue_name': {'key': 'queueName', 'type': 'str'}, + 'sas_token': {'key': 'sasToken', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, storage_account: str=None, queue_name: str=None, sas_token: str=None, message: str=None, **kwargs) -> None: + super(StorageQueueMessage, self).__init__(**kwargs) + self.storage_account = storage_account + self.queue_name = queue_name + self.sas_token = sas_token + self.message = message diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition_paged.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/_paged_models.py similarity index 52% rename from sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition_paged.py rename to sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/_paged_models.py index 4830c059bb71..c5789cc96bfd 100644 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition_paged.py +++ b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/_paged_models.py @@ -25,3 +25,29 @@ class JobCollectionDefinitionPaged(Paged): def __init__(self, *args, **kwargs): super(JobCollectionDefinitionPaged, self).__init__(*args, **kwargs) +class JobDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(JobDefinitionPaged, self).__init__(*args, **kwargs) +class JobHistoryDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`JobHistoryDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobHistoryDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(JobHistoryDefinitionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/scheduler_management_client_enums.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/_scheduler_management_client_enums.py similarity index 100% rename from sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/scheduler_management_client_enums.py rename to sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/_scheduler_management_client_enums.py diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/basic_authentication.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/basic_authentication.py deleted file mode 100644 index 942882fa03e0..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/basic_authentication.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .http_authentication import HttpAuthentication - - -class BasicAuthentication(HttpAuthentication): - """BasicAuthentication. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param username: Gets or sets the username. - :type username: str - :param password: Gets or sets the password, return value will always be - empty. - :type password: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(BasicAuthentication, self).__init__(**kwargs) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) - self.type = 'Basic' diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/basic_authentication_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/basic_authentication_py3.py deleted file mode 100644 index 92e8b5feee62..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/basic_authentication_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .http_authentication_py3 import HttpAuthentication - - -class BasicAuthentication(HttpAuthentication): - """BasicAuthentication. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param username: Gets or sets the username. - :type username: str - :param password: Gets or sets the password, return value will always be - empty. - :type password: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - } - - def __init__(self, *, username: str=None, password: str=None, **kwargs) -> None: - super(BasicAuthentication, self).__init__(**kwargs) - self.username = username - self.password = password - self.type = 'Basic' diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/client_cert_authentication.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/client_cert_authentication.py deleted file mode 100644 index e4324d0a5293..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/client_cert_authentication.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .http_authentication import HttpAuthentication - - -class ClientCertAuthentication(HttpAuthentication): - """ClientCertAuthentication. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param password: Gets or sets the certificate password, return value will - always be empty. - :type password: str - :param pfx: Gets or sets the pfx certificate. Accepts certification in - base64 encoding, return value will always be empty. - :type pfx: str - :param certificate_thumbprint: Gets or sets the certificate thumbprint. - :type certificate_thumbprint: str - :param certificate_expiration_date: Gets or sets the certificate - expiration date. - :type certificate_expiration_date: datetime - :param certificate_subject_name: Gets or sets the certificate subject - name. - :type certificate_subject_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - 'pfx': {'key': 'pfx', 'type': 'str'}, - 'certificate_thumbprint': {'key': 'certificateThumbprint', 'type': 'str'}, - 'certificate_expiration_date': {'key': 'certificateExpirationDate', 'type': 'iso-8601'}, - 'certificate_subject_name': {'key': 'certificateSubjectName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ClientCertAuthentication, self).__init__(**kwargs) - self.password = kwargs.get('password', None) - self.pfx = kwargs.get('pfx', None) - self.certificate_thumbprint = kwargs.get('certificate_thumbprint', None) - self.certificate_expiration_date = kwargs.get('certificate_expiration_date', None) - self.certificate_subject_name = kwargs.get('certificate_subject_name', None) - self.type = 'ClientCertificate' diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/client_cert_authentication_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/client_cert_authentication_py3.py deleted file mode 100644 index 17d2aad55eaf..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/client_cert_authentication_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .http_authentication_py3 import HttpAuthentication - - -class ClientCertAuthentication(HttpAuthentication): - """ClientCertAuthentication. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param password: Gets or sets the certificate password, return value will - always be empty. - :type password: str - :param pfx: Gets or sets the pfx certificate. Accepts certification in - base64 encoding, return value will always be empty. - :type pfx: str - :param certificate_thumbprint: Gets or sets the certificate thumbprint. - :type certificate_thumbprint: str - :param certificate_expiration_date: Gets or sets the certificate - expiration date. - :type certificate_expiration_date: datetime - :param certificate_subject_name: Gets or sets the certificate subject - name. - :type certificate_subject_name: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - 'pfx': {'key': 'pfx', 'type': 'str'}, - 'certificate_thumbprint': {'key': 'certificateThumbprint', 'type': 'str'}, - 'certificate_expiration_date': {'key': 'certificateExpirationDate', 'type': 'iso-8601'}, - 'certificate_subject_name': {'key': 'certificateSubjectName', 'type': 'str'}, - } - - def __init__(self, *, password: str=None, pfx: str=None, certificate_thumbprint: str=None, certificate_expiration_date=None, certificate_subject_name: str=None, **kwargs) -> None: - super(ClientCertAuthentication, self).__init__(**kwargs) - self.password = password - self.pfx = pfx - self.certificate_thumbprint = certificate_thumbprint - self.certificate_expiration_date = certificate_expiration_date - self.certificate_subject_name = certificate_subject_name - self.type = 'ClientCertificate' diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_authentication.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_authentication.py deleted file mode 100644 index 052f1f9bcf68..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_authentication.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HttpAuthentication(Model): - """HttpAuthentication. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ClientCertAuthentication, BasicAuthentication, - OAuthAuthentication - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'ClientCertificate': 'ClientCertAuthentication', 'Basic': 'BasicAuthentication', 'ActiveDirectoryOAuth': 'OAuthAuthentication'} - } - - def __init__(self, **kwargs): - super(HttpAuthentication, self).__init__(**kwargs) - self.type = None diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_authentication_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_authentication_py3.py deleted file mode 100644 index f3972592501f..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_authentication_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HttpAuthentication(Model): - """HttpAuthentication. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ClientCertAuthentication, BasicAuthentication, - OAuthAuthentication - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'ClientCertificate': 'ClientCertAuthentication', 'Basic': 'BasicAuthentication', 'ActiveDirectoryOAuth': 'OAuthAuthentication'} - } - - def __init__(self, **kwargs) -> None: - super(HttpAuthentication, self).__init__(**kwargs) - self.type = None diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_request.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_request.py deleted file mode 100644 index 700d582f2c1f..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_request.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HttpRequest(Model): - """HttpRequest. - - :param authentication: Gets or sets the authentication method of the - request. - :type authentication: ~azure.mgmt.scheduler.models.HttpAuthentication - :param uri: Gets or sets the URI of the request. - :type uri: str - :param method: Gets or sets the method of the request. - :type method: str - :param body: Gets or sets the request body. - :type body: str - :param headers: Gets or sets the headers. - :type headers: dict[str, str] - """ - - _attribute_map = { - 'authentication': {'key': 'authentication', 'type': 'HttpAuthentication'}, - 'uri': {'key': 'uri', 'type': 'str'}, - 'method': {'key': 'method', 'type': 'str'}, - 'body': {'key': 'body', 'type': 'str'}, - 'headers': {'key': 'headers', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(HttpRequest, self).__init__(**kwargs) - self.authentication = kwargs.get('authentication', None) - self.uri = kwargs.get('uri', None) - self.method = kwargs.get('method', None) - self.body = kwargs.get('body', None) - self.headers = kwargs.get('headers', None) diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_request_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_request_py3.py deleted file mode 100644 index 482ca14b30e9..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_request_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class HttpRequest(Model): - """HttpRequest. - - :param authentication: Gets or sets the authentication method of the - request. - :type authentication: ~azure.mgmt.scheduler.models.HttpAuthentication - :param uri: Gets or sets the URI of the request. - :type uri: str - :param method: Gets or sets the method of the request. - :type method: str - :param body: Gets or sets the request body. - :type body: str - :param headers: Gets or sets the headers. - :type headers: dict[str, str] - """ - - _attribute_map = { - 'authentication': {'key': 'authentication', 'type': 'HttpAuthentication'}, - 'uri': {'key': 'uri', 'type': 'str'}, - 'method': {'key': 'method', 'type': 'str'}, - 'body': {'key': 'body', 'type': 'str'}, - 'headers': {'key': 'headers', 'type': '{str}'}, - } - - def __init__(self, *, authentication=None, uri: str=None, method: str=None, body: str=None, headers=None, **kwargs) -> None: - super(HttpRequest, self).__init__(**kwargs) - self.authentication = authentication - self.uri = uri - self.method = method - self.body = body - self.headers = headers diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_action.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_action.py deleted file mode 100644 index 0a50a73ab6b5..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_action.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobAction(Model): - """JobAction. - - :param type: Gets or sets the job action type. Possible values include: - 'Http', 'Https', 'StorageQueue', 'ServiceBusQueue', 'ServiceBusTopic' - :type type: str or ~azure.mgmt.scheduler.models.JobActionType - :param request: Gets or sets the http requests. - :type request: ~azure.mgmt.scheduler.models.HttpRequest - :param queue_message: Gets or sets the storage queue message. - :type queue_message: ~azure.mgmt.scheduler.models.StorageQueueMessage - :param service_bus_queue_message: Gets or sets the service bus queue - message. - :type service_bus_queue_message: - ~azure.mgmt.scheduler.models.ServiceBusQueueMessage - :param service_bus_topic_message: Gets or sets the service bus topic - message. - :type service_bus_topic_message: - ~azure.mgmt.scheduler.models.ServiceBusTopicMessage - :param retry_policy: Gets or sets the retry policy. - :type retry_policy: ~azure.mgmt.scheduler.models.RetryPolicy - :param error_action: Gets or sets the error action. - :type error_action: ~azure.mgmt.scheduler.models.JobErrorAction - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'JobActionType'}, - 'request': {'key': 'request', 'type': 'HttpRequest'}, - 'queue_message': {'key': 'queueMessage', 'type': 'StorageQueueMessage'}, - 'service_bus_queue_message': {'key': 'serviceBusQueueMessage', 'type': 'ServiceBusQueueMessage'}, - 'service_bus_topic_message': {'key': 'serviceBusTopicMessage', 'type': 'ServiceBusTopicMessage'}, - 'retry_policy': {'key': 'retryPolicy', 'type': 'RetryPolicy'}, - 'error_action': {'key': 'errorAction', 'type': 'JobErrorAction'}, - } - - def __init__(self, **kwargs): - super(JobAction, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.request = kwargs.get('request', None) - self.queue_message = kwargs.get('queue_message', None) - self.service_bus_queue_message = kwargs.get('service_bus_queue_message', None) - self.service_bus_topic_message = kwargs.get('service_bus_topic_message', None) - self.retry_policy = kwargs.get('retry_policy', None) - self.error_action = kwargs.get('error_action', None) diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_action_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_action_py3.py deleted file mode 100644 index 6f8f5c7ffb2c..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_action_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobAction(Model): - """JobAction. - - :param type: Gets or sets the job action type. Possible values include: - 'Http', 'Https', 'StorageQueue', 'ServiceBusQueue', 'ServiceBusTopic' - :type type: str or ~azure.mgmt.scheduler.models.JobActionType - :param request: Gets or sets the http requests. - :type request: ~azure.mgmt.scheduler.models.HttpRequest - :param queue_message: Gets or sets the storage queue message. - :type queue_message: ~azure.mgmt.scheduler.models.StorageQueueMessage - :param service_bus_queue_message: Gets or sets the service bus queue - message. - :type service_bus_queue_message: - ~azure.mgmt.scheduler.models.ServiceBusQueueMessage - :param service_bus_topic_message: Gets or sets the service bus topic - message. - :type service_bus_topic_message: - ~azure.mgmt.scheduler.models.ServiceBusTopicMessage - :param retry_policy: Gets or sets the retry policy. - :type retry_policy: ~azure.mgmt.scheduler.models.RetryPolicy - :param error_action: Gets or sets the error action. - :type error_action: ~azure.mgmt.scheduler.models.JobErrorAction - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'JobActionType'}, - 'request': {'key': 'request', 'type': 'HttpRequest'}, - 'queue_message': {'key': 'queueMessage', 'type': 'StorageQueueMessage'}, - 'service_bus_queue_message': {'key': 'serviceBusQueueMessage', 'type': 'ServiceBusQueueMessage'}, - 'service_bus_topic_message': {'key': 'serviceBusTopicMessage', 'type': 'ServiceBusTopicMessage'}, - 'retry_policy': {'key': 'retryPolicy', 'type': 'RetryPolicy'}, - 'error_action': {'key': 'errorAction', 'type': 'JobErrorAction'}, - } - - def __init__(self, *, type=None, request=None, queue_message=None, service_bus_queue_message=None, service_bus_topic_message=None, retry_policy=None, error_action=None, **kwargs) -> None: - super(JobAction, self).__init__(**kwargs) - self.type = type - self.request = request - self.queue_message = queue_message - self.service_bus_queue_message = service_bus_queue_message - self.service_bus_topic_message = service_bus_topic_message - self.retry_policy = retry_policy - self.error_action = error_action diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition.py deleted file mode 100644 index be05e83bbab8..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobCollectionDefinition(Model): - """JobCollectionDefinition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Gets the job collection resource identifier. - :vartype id: str - :ivar type: Gets the job collection resource type. - :vartype type: str - :param name: Gets or sets the job collection resource name. - :type name: str - :param location: Gets or sets the storage account location. - :type location: str - :param tags: Gets or sets the tags. - :type tags: dict[str, str] - :param properties: Gets or sets the job collection properties. - :type properties: ~azure.mgmt.scheduler.models.JobCollectionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'JobCollectionProperties'}, - } - - def __init__(self, **kwargs): - super(JobCollectionDefinition, self).__init__(**kwargs) - self.id = None - self.type = None - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - self.properties = kwargs.get('properties', None) diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition_py3.py deleted file mode 100644 index 583f7ed6679b..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobCollectionDefinition(Model): - """JobCollectionDefinition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Gets the job collection resource identifier. - :vartype id: str - :ivar type: Gets the job collection resource type. - :vartype type: str - :param name: Gets or sets the job collection resource name. - :type name: str - :param location: Gets or sets the storage account location. - :type location: str - :param tags: Gets or sets the tags. - :type tags: dict[str, str] - :param properties: Gets or sets the job collection properties. - :type properties: ~azure.mgmt.scheduler.models.JobCollectionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'JobCollectionProperties'}, - } - - def __init__(self, *, name: str=None, location: str=None, tags=None, properties=None, **kwargs) -> None: - super(JobCollectionDefinition, self).__init__(**kwargs) - self.id = None - self.type = None - self.name = name - self.location = location - self.tags = tags - self.properties = properties diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_properties.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_properties.py deleted file mode 100644 index 51be15d9547d..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_properties.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobCollectionProperties(Model): - """JobCollectionProperties. - - :param sku: Gets or sets the SKU. - :type sku: ~azure.mgmt.scheduler.models.Sku - :param state: Gets or sets the state. Possible values include: 'Enabled', - 'Disabled', 'Suspended', 'Deleted' - :type state: str or ~azure.mgmt.scheduler.models.JobCollectionState - :param quota: Gets or sets the job collection quota. - :type quota: ~azure.mgmt.scheduler.models.JobCollectionQuota - """ - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'state': {'key': 'state', 'type': 'JobCollectionState'}, - 'quota': {'key': 'quota', 'type': 'JobCollectionQuota'}, - } - - def __init__(self, **kwargs): - super(JobCollectionProperties, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.state = kwargs.get('state', None) - self.quota = kwargs.get('quota', None) diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_properties_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_properties_py3.py deleted file mode 100644 index c38d012ac714..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_properties_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobCollectionProperties(Model): - """JobCollectionProperties. - - :param sku: Gets or sets the SKU. - :type sku: ~azure.mgmt.scheduler.models.Sku - :param state: Gets or sets the state. Possible values include: 'Enabled', - 'Disabled', 'Suspended', 'Deleted' - :type state: str or ~azure.mgmt.scheduler.models.JobCollectionState - :param quota: Gets or sets the job collection quota. - :type quota: ~azure.mgmt.scheduler.models.JobCollectionQuota - """ - - _attribute_map = { - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'state': {'key': 'state', 'type': 'JobCollectionState'}, - 'quota': {'key': 'quota', 'type': 'JobCollectionQuota'}, - } - - def __init__(self, *, sku=None, state=None, quota=None, **kwargs) -> None: - super(JobCollectionProperties, self).__init__(**kwargs) - self.sku = sku - self.state = state - self.quota = quota diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_quota.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_quota.py deleted file mode 100644 index 468793f2066f..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_quota.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobCollectionQuota(Model): - """JobCollectionQuota. - - :param max_job_count: Gets or set the maximum job count. - :type max_job_count: int - :param max_job_occurrence: Gets or sets the maximum job occurrence. - :type max_job_occurrence: int - :param max_recurrence: Gets or set the maximum recurrence. - :type max_recurrence: ~azure.mgmt.scheduler.models.JobMaxRecurrence - """ - - _attribute_map = { - 'max_job_count': {'key': 'maxJobCount', 'type': 'int'}, - 'max_job_occurrence': {'key': 'maxJobOccurrence', 'type': 'int'}, - 'max_recurrence': {'key': 'maxRecurrence', 'type': 'JobMaxRecurrence'}, - } - - def __init__(self, **kwargs): - super(JobCollectionQuota, self).__init__(**kwargs) - self.max_job_count = kwargs.get('max_job_count', None) - self.max_job_occurrence = kwargs.get('max_job_occurrence', None) - self.max_recurrence = kwargs.get('max_recurrence', None) diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_quota_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_quota_py3.py deleted file mode 100644 index 996d3c9cd72d..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_quota_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobCollectionQuota(Model): - """JobCollectionQuota. - - :param max_job_count: Gets or set the maximum job count. - :type max_job_count: int - :param max_job_occurrence: Gets or sets the maximum job occurrence. - :type max_job_occurrence: int - :param max_recurrence: Gets or set the maximum recurrence. - :type max_recurrence: ~azure.mgmt.scheduler.models.JobMaxRecurrence - """ - - _attribute_map = { - 'max_job_count': {'key': 'maxJobCount', 'type': 'int'}, - 'max_job_occurrence': {'key': 'maxJobOccurrence', 'type': 'int'}, - 'max_recurrence': {'key': 'maxRecurrence', 'type': 'JobMaxRecurrence'}, - } - - def __init__(self, *, max_job_count: int=None, max_job_occurrence: int=None, max_recurrence=None, **kwargs) -> None: - super(JobCollectionQuota, self).__init__(**kwargs) - self.max_job_count = max_job_count - self.max_job_occurrence = max_job_occurrence - self.max_recurrence = max_recurrence diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition.py deleted file mode 100644 index 43aa06dd41a0..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobDefinition(Model): - """JobDefinition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Gets the job resource identifier. - :vartype id: str - :ivar type: Gets the job resource type. - :vartype type: str - :ivar name: Gets the job resource name. - :vartype name: str - :param properties: Gets or sets the job properties. - :type properties: ~azure.mgmt.scheduler.models.JobProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'JobProperties'}, - } - - def __init__(self, **kwargs): - super(JobDefinition, self).__init__(**kwargs) - self.id = None - self.type = None - self.name = None - self.properties = kwargs.get('properties', None) diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition_paged.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition_paged.py deleted file mode 100644 index e783c67a39dc..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(JobDefinitionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition_py3.py deleted file mode 100644 index 615e8d334fd9..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobDefinition(Model): - """JobDefinition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Gets the job resource identifier. - :vartype id: str - :ivar type: Gets the job resource type. - :vartype type: str - :ivar name: Gets the job resource name. - :vartype name: str - :param properties: Gets or sets the job properties. - :type properties: ~azure.mgmt.scheduler.models.JobProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'JobProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(JobDefinition, self).__init__(**kwargs) - self.id = None - self.type = None - self.name = None - self.properties = properties diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_error_action.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_error_action.py deleted file mode 100644 index 694d7f7dd1c6..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_error_action.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobErrorAction(Model): - """JobErrorAction. - - :param type: Gets or sets the job error action type. Possible values - include: 'Http', 'Https', 'StorageQueue', 'ServiceBusQueue', - 'ServiceBusTopic' - :type type: str or ~azure.mgmt.scheduler.models.JobActionType - :param request: Gets or sets the http requests. - :type request: ~azure.mgmt.scheduler.models.HttpRequest - :param queue_message: Gets or sets the storage queue message. - :type queue_message: ~azure.mgmt.scheduler.models.StorageQueueMessage - :param service_bus_queue_message: Gets or sets the service bus queue - message. - :type service_bus_queue_message: - ~azure.mgmt.scheduler.models.ServiceBusQueueMessage - :param service_bus_topic_message: Gets or sets the service bus topic - message. - :type service_bus_topic_message: - ~azure.mgmt.scheduler.models.ServiceBusTopicMessage - :param retry_policy: Gets or sets the retry policy. - :type retry_policy: ~azure.mgmt.scheduler.models.RetryPolicy - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'JobActionType'}, - 'request': {'key': 'request', 'type': 'HttpRequest'}, - 'queue_message': {'key': 'queueMessage', 'type': 'StorageQueueMessage'}, - 'service_bus_queue_message': {'key': 'serviceBusQueueMessage', 'type': 'ServiceBusQueueMessage'}, - 'service_bus_topic_message': {'key': 'serviceBusTopicMessage', 'type': 'ServiceBusTopicMessage'}, - 'retry_policy': {'key': 'retryPolicy', 'type': 'RetryPolicy'}, - } - - def __init__(self, **kwargs): - super(JobErrorAction, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.request = kwargs.get('request', None) - self.queue_message = kwargs.get('queue_message', None) - self.service_bus_queue_message = kwargs.get('service_bus_queue_message', None) - self.service_bus_topic_message = kwargs.get('service_bus_topic_message', None) - self.retry_policy = kwargs.get('retry_policy', None) diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_error_action_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_error_action_py3.py deleted file mode 100644 index 1366ceeda294..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_error_action_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobErrorAction(Model): - """JobErrorAction. - - :param type: Gets or sets the job error action type. Possible values - include: 'Http', 'Https', 'StorageQueue', 'ServiceBusQueue', - 'ServiceBusTopic' - :type type: str or ~azure.mgmt.scheduler.models.JobActionType - :param request: Gets or sets the http requests. - :type request: ~azure.mgmt.scheduler.models.HttpRequest - :param queue_message: Gets or sets the storage queue message. - :type queue_message: ~azure.mgmt.scheduler.models.StorageQueueMessage - :param service_bus_queue_message: Gets or sets the service bus queue - message. - :type service_bus_queue_message: - ~azure.mgmt.scheduler.models.ServiceBusQueueMessage - :param service_bus_topic_message: Gets or sets the service bus topic - message. - :type service_bus_topic_message: - ~azure.mgmt.scheduler.models.ServiceBusTopicMessage - :param retry_policy: Gets or sets the retry policy. - :type retry_policy: ~azure.mgmt.scheduler.models.RetryPolicy - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'JobActionType'}, - 'request': {'key': 'request', 'type': 'HttpRequest'}, - 'queue_message': {'key': 'queueMessage', 'type': 'StorageQueueMessage'}, - 'service_bus_queue_message': {'key': 'serviceBusQueueMessage', 'type': 'ServiceBusQueueMessage'}, - 'service_bus_topic_message': {'key': 'serviceBusTopicMessage', 'type': 'ServiceBusTopicMessage'}, - 'retry_policy': {'key': 'retryPolicy', 'type': 'RetryPolicy'}, - } - - def __init__(self, *, type=None, request=None, queue_message=None, service_bus_queue_message=None, service_bus_topic_message=None, retry_policy=None, **kwargs) -> None: - super(JobErrorAction, self).__init__(**kwargs) - self.type = type - self.request = request - self.queue_message = queue_message - self.service_bus_queue_message = service_bus_queue_message - self.service_bus_topic_message = service_bus_topic_message - self.retry_policy = retry_policy diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition.py deleted file mode 100644 index ddfbf24033fd..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobHistoryDefinition(Model): - """JobHistoryDefinition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Gets the job history identifier. - :vartype id: str - :ivar type: Gets the job history resource type. - :vartype type: str - :ivar name: Gets the job history name. - :vartype name: str - :ivar properties: Gets or sets the job history properties. - :vartype properties: - ~azure.mgmt.scheduler.models.JobHistoryDefinitionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'JobHistoryDefinitionProperties'}, - } - - def __init__(self, **kwargs): - super(JobHistoryDefinition, self).__init__(**kwargs) - self.id = None - self.type = None - self.name = None - self.properties = None diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_paged.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_paged.py deleted file mode 100644 index 8b9ba23980bb..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobHistoryDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`JobHistoryDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobHistoryDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(JobHistoryDefinitionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_properties.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_properties.py deleted file mode 100644 index 2407b6ba4959..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_properties.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobHistoryDefinitionProperties(Model): - """JobHistoryDefinitionProperties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar start_time: Gets the start time for this job. - :vartype start_time: datetime - :ivar end_time: Gets the end time for this job. - :vartype end_time: datetime - :ivar expected_execution_time: Gets the expected execution time for this - job. - :vartype expected_execution_time: datetime - :ivar action_name: Gets the job history action name. Possible values - include: 'MainAction', 'ErrorAction' - :vartype action_name: str or - ~azure.mgmt.scheduler.models.JobHistoryActionName - :ivar status: Gets the job history status. Possible values include: - 'Completed', 'Failed', 'Postponed' - :vartype status: str or ~azure.mgmt.scheduler.models.JobExecutionStatus - :ivar message: Gets the message for the job history. - :vartype message: str - :ivar retry_count: Gets the retry count for job. - :vartype retry_count: int - :ivar repeat_count: Gets the repeat count for the job. - :vartype repeat_count: int - """ - - _validation = { - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'expected_execution_time': {'readonly': True}, - 'action_name': {'readonly': True}, - 'status': {'readonly': True}, - 'message': {'readonly': True}, - 'retry_count': {'readonly': True}, - 'repeat_count': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'expected_execution_time': {'key': 'expectedExecutionTime', 'type': 'iso-8601'}, - 'action_name': {'key': 'actionName', 'type': 'JobHistoryActionName'}, - 'status': {'key': 'status', 'type': 'JobExecutionStatus'}, - 'message': {'key': 'message', 'type': 'str'}, - 'retry_count': {'key': 'retryCount', 'type': 'int'}, - 'repeat_count': {'key': 'repeatCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(JobHistoryDefinitionProperties, self).__init__(**kwargs) - self.start_time = None - self.end_time = None - self.expected_execution_time = None - self.action_name = None - self.status = None - self.message = None - self.retry_count = None - self.repeat_count = None diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_properties_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_properties_py3.py deleted file mode 100644 index 16bf8c9ab82f..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_properties_py3.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobHistoryDefinitionProperties(Model): - """JobHistoryDefinitionProperties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar start_time: Gets the start time for this job. - :vartype start_time: datetime - :ivar end_time: Gets the end time for this job. - :vartype end_time: datetime - :ivar expected_execution_time: Gets the expected execution time for this - job. - :vartype expected_execution_time: datetime - :ivar action_name: Gets the job history action name. Possible values - include: 'MainAction', 'ErrorAction' - :vartype action_name: str or - ~azure.mgmt.scheduler.models.JobHistoryActionName - :ivar status: Gets the job history status. Possible values include: - 'Completed', 'Failed', 'Postponed' - :vartype status: str or ~azure.mgmt.scheduler.models.JobExecutionStatus - :ivar message: Gets the message for the job history. - :vartype message: str - :ivar retry_count: Gets the retry count for job. - :vartype retry_count: int - :ivar repeat_count: Gets the repeat count for the job. - :vartype repeat_count: int - """ - - _validation = { - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'expected_execution_time': {'readonly': True}, - 'action_name': {'readonly': True}, - 'status': {'readonly': True}, - 'message': {'readonly': True}, - 'retry_count': {'readonly': True}, - 'repeat_count': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'expected_execution_time': {'key': 'expectedExecutionTime', 'type': 'iso-8601'}, - 'action_name': {'key': 'actionName', 'type': 'JobHistoryActionName'}, - 'status': {'key': 'status', 'type': 'JobExecutionStatus'}, - 'message': {'key': 'message', 'type': 'str'}, - 'retry_count': {'key': 'retryCount', 'type': 'int'}, - 'repeat_count': {'key': 'repeatCount', 'type': 'int'}, - } - - def __init__(self, **kwargs) -> None: - super(JobHistoryDefinitionProperties, self).__init__(**kwargs) - self.start_time = None - self.end_time = None - self.expected_execution_time = None - self.action_name = None - self.status = None - self.message = None - self.retry_count = None - self.repeat_count = None diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_py3.py deleted file mode 100644 index a817c1564d9f..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobHistoryDefinition(Model): - """JobHistoryDefinition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Gets the job history identifier. - :vartype id: str - :ivar type: Gets the job history resource type. - :vartype type: str - :ivar name: Gets the job history name. - :vartype name: str - :ivar properties: Gets or sets the job history properties. - :vartype properties: - ~azure.mgmt.scheduler.models.JobHistoryDefinitionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - 'properties': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'JobHistoryDefinitionProperties'}, - } - - def __init__(self, **kwargs) -> None: - super(JobHistoryDefinition, self).__init__(**kwargs) - self.id = None - self.type = None - self.name = None - self.properties = None diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_filter.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_filter.py deleted file mode 100644 index 639744652f8b..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_filter.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobHistoryFilter(Model): - """JobHistoryFilter. - - :param status: Gets or sets the job execution status. Possible values - include: 'Completed', 'Failed', 'Postponed' - :type status: str or ~azure.mgmt.scheduler.models.JobExecutionStatus - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'JobExecutionStatus'}, - } - - def __init__(self, **kwargs): - super(JobHistoryFilter, self).__init__(**kwargs) - self.status = kwargs.get('status', None) diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_filter_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_filter_py3.py deleted file mode 100644 index 11405033790b..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_filter_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobHistoryFilter(Model): - """JobHistoryFilter. - - :param status: Gets or sets the job execution status. Possible values - include: 'Completed', 'Failed', 'Postponed' - :type status: str or ~azure.mgmt.scheduler.models.JobExecutionStatus - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'JobExecutionStatus'}, - } - - def __init__(self, *, status=None, **kwargs) -> None: - super(JobHistoryFilter, self).__init__(**kwargs) - self.status = status diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_max_recurrence.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_max_recurrence.py deleted file mode 100644 index 6ef23f562526..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_max_recurrence.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobMaxRecurrence(Model): - """JobMaxRecurrence. - - :param frequency: Gets or sets the frequency of recurrence (second, - minute, hour, day, week, month). Possible values include: 'Minute', - 'Hour', 'Day', 'Week', 'Month' - :type frequency: str or ~azure.mgmt.scheduler.models.RecurrenceFrequency - :param interval: Gets or sets the interval between retries. - :type interval: int - """ - - _attribute_map = { - 'frequency': {'key': 'frequency', 'type': 'RecurrenceFrequency'}, - 'interval': {'key': 'interval', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(JobMaxRecurrence, self).__init__(**kwargs) - self.frequency = kwargs.get('frequency', None) - self.interval = kwargs.get('interval', None) diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_max_recurrence_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_max_recurrence_py3.py deleted file mode 100644 index 99610d36f731..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_max_recurrence_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobMaxRecurrence(Model): - """JobMaxRecurrence. - - :param frequency: Gets or sets the frequency of recurrence (second, - minute, hour, day, week, month). Possible values include: 'Minute', - 'Hour', 'Day', 'Week', 'Month' - :type frequency: str or ~azure.mgmt.scheduler.models.RecurrenceFrequency - :param interval: Gets or sets the interval between retries. - :type interval: int - """ - - _attribute_map = { - 'frequency': {'key': 'frequency', 'type': 'RecurrenceFrequency'}, - 'interval': {'key': 'interval', 'type': 'int'}, - } - - def __init__(self, *, frequency=None, interval: int=None, **kwargs) -> None: - super(JobMaxRecurrence, self).__init__(**kwargs) - self.frequency = frequency - self.interval = interval diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_properties.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_properties.py deleted file mode 100644 index e391027f2b83..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_properties.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobProperties(Model): - """JobProperties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param start_time: Gets or sets the job start time. - :type start_time: datetime - :param action: Gets or sets the job action. - :type action: ~azure.mgmt.scheduler.models.JobAction - :param recurrence: Gets or sets the job recurrence. - :type recurrence: ~azure.mgmt.scheduler.models.JobRecurrence - :param state: Gets or set the job state. Possible values include: - 'Enabled', 'Disabled', 'Faulted', 'Completed' - :type state: str or ~azure.mgmt.scheduler.models.JobState - :ivar status: Gets the job status. - :vartype status: ~azure.mgmt.scheduler.models.JobStatus - """ - - _validation = { - 'status': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'action': {'key': 'action', 'type': 'JobAction'}, - 'recurrence': {'key': 'recurrence', 'type': 'JobRecurrence'}, - 'state': {'key': 'state', 'type': 'JobState'}, - 'status': {'key': 'status', 'type': 'JobStatus'}, - } - - def __init__(self, **kwargs): - super(JobProperties, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', None) - self.action = kwargs.get('action', None) - self.recurrence = kwargs.get('recurrence', None) - self.state = kwargs.get('state', None) - self.status = None diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_properties_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_properties_py3.py deleted file mode 100644 index 2ba86cf5e7e7..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_properties_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobProperties(Model): - """JobProperties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param start_time: Gets or sets the job start time. - :type start_time: datetime - :param action: Gets or sets the job action. - :type action: ~azure.mgmt.scheduler.models.JobAction - :param recurrence: Gets or sets the job recurrence. - :type recurrence: ~azure.mgmt.scheduler.models.JobRecurrence - :param state: Gets or set the job state. Possible values include: - 'Enabled', 'Disabled', 'Faulted', 'Completed' - :type state: str or ~azure.mgmt.scheduler.models.JobState - :ivar status: Gets the job status. - :vartype status: ~azure.mgmt.scheduler.models.JobStatus - """ - - _validation = { - 'status': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'action': {'key': 'action', 'type': 'JobAction'}, - 'recurrence': {'key': 'recurrence', 'type': 'JobRecurrence'}, - 'state': {'key': 'state', 'type': 'JobState'}, - 'status': {'key': 'status', 'type': 'JobStatus'}, - } - - def __init__(self, *, start_time=None, action=None, recurrence=None, state=None, **kwargs) -> None: - super(JobProperties, self).__init__(**kwargs) - self.start_time = start_time - self.action = action - self.recurrence = recurrence - self.state = state - self.status = None diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence.py deleted file mode 100644 index 18ee514fd9db..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobRecurrence(Model): - """JobRecurrence. - - :param frequency: Gets or sets the frequency of recurrence (second, - minute, hour, day, week, month). Possible values include: 'Minute', - 'Hour', 'Day', 'Week', 'Month' - :type frequency: str or ~azure.mgmt.scheduler.models.RecurrenceFrequency - :param interval: Gets or sets the interval between retries. - :type interval: int - :param count: Gets or sets the maximum number of times that the job should - run. - :type count: int - :param end_time: Gets or sets the time at which the job will complete. - :type end_time: datetime - :param schedule: - :type schedule: ~azure.mgmt.scheduler.models.JobRecurrenceSchedule - """ - - _attribute_map = { - 'frequency': {'key': 'frequency', 'type': 'RecurrenceFrequency'}, - 'interval': {'key': 'interval', 'type': 'int'}, - 'count': {'key': 'count', 'type': 'int'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'schedule': {'key': 'schedule', 'type': 'JobRecurrenceSchedule'}, - } - - def __init__(self, **kwargs): - super(JobRecurrence, self).__init__(**kwargs) - self.frequency = kwargs.get('frequency', None) - self.interval = kwargs.get('interval', None) - self.count = kwargs.get('count', None) - self.end_time = kwargs.get('end_time', None) - self.schedule = kwargs.get('schedule', None) diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_py3.py deleted file mode 100644 index 3c31d7532d31..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobRecurrence(Model): - """JobRecurrence. - - :param frequency: Gets or sets the frequency of recurrence (second, - minute, hour, day, week, month). Possible values include: 'Minute', - 'Hour', 'Day', 'Week', 'Month' - :type frequency: str or ~azure.mgmt.scheduler.models.RecurrenceFrequency - :param interval: Gets or sets the interval between retries. - :type interval: int - :param count: Gets or sets the maximum number of times that the job should - run. - :type count: int - :param end_time: Gets or sets the time at which the job will complete. - :type end_time: datetime - :param schedule: - :type schedule: ~azure.mgmt.scheduler.models.JobRecurrenceSchedule - """ - - _attribute_map = { - 'frequency': {'key': 'frequency', 'type': 'RecurrenceFrequency'}, - 'interval': {'key': 'interval', 'type': 'int'}, - 'count': {'key': 'count', 'type': 'int'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'schedule': {'key': 'schedule', 'type': 'JobRecurrenceSchedule'}, - } - - def __init__(self, *, frequency=None, interval: int=None, count: int=None, end_time=None, schedule=None, **kwargs) -> None: - super(JobRecurrence, self).__init__(**kwargs) - self.frequency = frequency - self.interval = interval - self.count = count - self.end_time = end_time - self.schedule = schedule diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule.py deleted file mode 100644 index 65f649ba0ab7..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobRecurrenceSchedule(Model): - """JobRecurrenceSchedule. - - :param week_days: Gets or sets the days of the week that the job should - execute on. - :type week_days: list[str or ~azure.mgmt.scheduler.models.DayOfWeek] - :param hours: Gets or sets the hours of the day that the job should - execute at. - :type hours: list[int] - :param minutes: Gets or sets the minutes of the hour that the job should - execute at. - :type minutes: list[int] - :param month_days: Gets or sets the days of the month that the job should - execute on. Must be between 1 and 31. - :type month_days: list[int] - :param monthly_occurrences: Gets or sets the occurrences of days within a - month. - :type monthly_occurrences: - list[~azure.mgmt.scheduler.models.JobRecurrenceScheduleMonthlyOccurrence] - """ - - _attribute_map = { - 'week_days': {'key': 'weekDays', 'type': '[DayOfWeek]'}, - 'hours': {'key': 'hours', 'type': '[int]'}, - 'minutes': {'key': 'minutes', 'type': '[int]'}, - 'month_days': {'key': 'monthDays', 'type': '[int]'}, - 'monthly_occurrences': {'key': 'monthlyOccurrences', 'type': '[JobRecurrenceScheduleMonthlyOccurrence]'}, - } - - def __init__(self, **kwargs): - super(JobRecurrenceSchedule, self).__init__(**kwargs) - self.week_days = kwargs.get('week_days', None) - self.hours = kwargs.get('hours', None) - self.minutes = kwargs.get('minutes', None) - self.month_days = kwargs.get('month_days', None) - self.monthly_occurrences = kwargs.get('monthly_occurrences', None) diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_monthly_occurrence.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_monthly_occurrence.py deleted file mode 100644 index 83aff7b198fa..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_monthly_occurrence.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobRecurrenceScheduleMonthlyOccurrence(Model): - """JobRecurrenceScheduleMonthlyOccurrence. - - :param day: Gets or sets the day. Must be one of monday, tuesday, - wednesday, thursday, friday, saturday, sunday. Possible values include: - 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', - 'Sunday' - :type day: str or ~azure.mgmt.scheduler.models.JobScheduleDay - :param occurrence: Gets or sets the occurrence. Must be between -5 and 5. - :type occurrence: int - """ - - _attribute_map = { - 'day': {'key': 'day', 'type': 'JobScheduleDay'}, - 'occurrence': {'key': 'Occurrence', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(JobRecurrenceScheduleMonthlyOccurrence, self).__init__(**kwargs) - self.day = kwargs.get('day', None) - self.occurrence = kwargs.get('occurrence', None) diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_monthly_occurrence_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_monthly_occurrence_py3.py deleted file mode 100644 index 10d21464a9f5..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_monthly_occurrence_py3.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobRecurrenceScheduleMonthlyOccurrence(Model): - """JobRecurrenceScheduleMonthlyOccurrence. - - :param day: Gets or sets the day. Must be one of monday, tuesday, - wednesday, thursday, friday, saturday, sunday. Possible values include: - 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', - 'Sunday' - :type day: str or ~azure.mgmt.scheduler.models.JobScheduleDay - :param occurrence: Gets or sets the occurrence. Must be between -5 and 5. - :type occurrence: int - """ - - _attribute_map = { - 'day': {'key': 'day', 'type': 'JobScheduleDay'}, - 'occurrence': {'key': 'Occurrence', 'type': 'int'}, - } - - def __init__(self, *, day=None, occurrence: int=None, **kwargs) -> None: - super(JobRecurrenceScheduleMonthlyOccurrence, self).__init__(**kwargs) - self.day = day - self.occurrence = occurrence diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_py3.py deleted file mode 100644 index c8c5db61c26f..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobRecurrenceSchedule(Model): - """JobRecurrenceSchedule. - - :param week_days: Gets or sets the days of the week that the job should - execute on. - :type week_days: list[str or ~azure.mgmt.scheduler.models.DayOfWeek] - :param hours: Gets or sets the hours of the day that the job should - execute at. - :type hours: list[int] - :param minutes: Gets or sets the minutes of the hour that the job should - execute at. - :type minutes: list[int] - :param month_days: Gets or sets the days of the month that the job should - execute on. Must be between 1 and 31. - :type month_days: list[int] - :param monthly_occurrences: Gets or sets the occurrences of days within a - month. - :type monthly_occurrences: - list[~azure.mgmt.scheduler.models.JobRecurrenceScheduleMonthlyOccurrence] - """ - - _attribute_map = { - 'week_days': {'key': 'weekDays', 'type': '[DayOfWeek]'}, - 'hours': {'key': 'hours', 'type': '[int]'}, - 'minutes': {'key': 'minutes', 'type': '[int]'}, - 'month_days': {'key': 'monthDays', 'type': '[int]'}, - 'monthly_occurrences': {'key': 'monthlyOccurrences', 'type': '[JobRecurrenceScheduleMonthlyOccurrence]'}, - } - - def __init__(self, *, week_days=None, hours=None, minutes=None, month_days=None, monthly_occurrences=None, **kwargs) -> None: - super(JobRecurrenceSchedule, self).__init__(**kwargs) - self.week_days = week_days - self.hours = hours - self.minutes = minutes - self.month_days = month_days - self.monthly_occurrences = monthly_occurrences diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_state_filter.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_state_filter.py deleted file mode 100644 index bd8ef19f362a..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_state_filter.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStateFilter(Model): - """JobStateFilter. - - :param state: Gets or sets the job state. Possible values include: - 'Enabled', 'Disabled', 'Faulted', 'Completed' - :type state: str or ~azure.mgmt.scheduler.models.JobState - """ - - _attribute_map = { - 'state': {'key': 'state', 'type': 'JobState'}, - } - - def __init__(self, **kwargs): - super(JobStateFilter, self).__init__(**kwargs) - self.state = kwargs.get('state', None) diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_state_filter_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_state_filter_py3.py deleted file mode 100644 index fb20c11bf6db..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_state_filter_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStateFilter(Model): - """JobStateFilter. - - :param state: Gets or sets the job state. Possible values include: - 'Enabled', 'Disabled', 'Faulted', 'Completed' - :type state: str or ~azure.mgmt.scheduler.models.JobState - """ - - _attribute_map = { - 'state': {'key': 'state', 'type': 'JobState'}, - } - - def __init__(self, *, state=None, **kwargs) -> None: - super(JobStateFilter, self).__init__(**kwargs) - self.state = state diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_status.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_status.py deleted file mode 100644 index a7fc4b64e49d..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_status.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStatus(Model): - """JobStatus. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar execution_count: Gets the number of times this job has executed. - :vartype execution_count: int - :ivar failure_count: Gets the number of times this job has failed. - :vartype failure_count: int - :ivar faulted_count: Gets the number of faulted occurrences (occurrences - that were retried and failed as many times as the retry policy states). - :vartype faulted_count: int - :ivar last_execution_time: Gets the time the last occurrence executed in - ISO-8601 format. Could be empty if job has not run yet. - :vartype last_execution_time: datetime - :ivar next_execution_time: Gets the time of the next occurrence in - ISO-8601 format. Could be empty if the job is completed. - :vartype next_execution_time: datetime - """ - - _validation = { - 'execution_count': {'readonly': True}, - 'failure_count': {'readonly': True}, - 'faulted_count': {'readonly': True}, - 'last_execution_time': {'readonly': True}, - 'next_execution_time': {'readonly': True}, - } - - _attribute_map = { - 'execution_count': {'key': 'executionCount', 'type': 'int'}, - 'failure_count': {'key': 'failureCount', 'type': 'int'}, - 'faulted_count': {'key': 'faultedCount', 'type': 'int'}, - 'last_execution_time': {'key': 'lastExecutionTime', 'type': 'iso-8601'}, - 'next_execution_time': {'key': 'nextExecutionTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(JobStatus, self).__init__(**kwargs) - self.execution_count = None - self.failure_count = None - self.faulted_count = None - self.last_execution_time = None - self.next_execution_time = None diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_status_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_status_py3.py deleted file mode 100644 index 8b1711b8a203..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_status_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobStatus(Model): - """JobStatus. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar execution_count: Gets the number of times this job has executed. - :vartype execution_count: int - :ivar failure_count: Gets the number of times this job has failed. - :vartype failure_count: int - :ivar faulted_count: Gets the number of faulted occurrences (occurrences - that were retried and failed as many times as the retry policy states). - :vartype faulted_count: int - :ivar last_execution_time: Gets the time the last occurrence executed in - ISO-8601 format. Could be empty if job has not run yet. - :vartype last_execution_time: datetime - :ivar next_execution_time: Gets the time of the next occurrence in - ISO-8601 format. Could be empty if the job is completed. - :vartype next_execution_time: datetime - """ - - _validation = { - 'execution_count': {'readonly': True}, - 'failure_count': {'readonly': True}, - 'faulted_count': {'readonly': True}, - 'last_execution_time': {'readonly': True}, - 'next_execution_time': {'readonly': True}, - } - - _attribute_map = { - 'execution_count': {'key': 'executionCount', 'type': 'int'}, - 'failure_count': {'key': 'failureCount', 'type': 'int'}, - 'faulted_count': {'key': 'faultedCount', 'type': 'int'}, - 'last_execution_time': {'key': 'lastExecutionTime', 'type': 'iso-8601'}, - 'next_execution_time': {'key': 'nextExecutionTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(JobStatus, self).__init__(**kwargs) - self.execution_count = None - self.failure_count = None - self.faulted_count = None - self.last_execution_time = None - self.next_execution_time = None diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/oauth_authentication.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/oauth_authentication.py deleted file mode 100644 index 3e7bda06cbb1..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/oauth_authentication.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .http_authentication import HttpAuthentication - - -class OAuthAuthentication(HttpAuthentication): - """OAuthAuthentication. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param secret: Gets or sets the secret, return value will always be empty. - :type secret: str - :param tenant: Gets or sets the tenant. - :type tenant: str - :param audience: Gets or sets the audience. - :type audience: str - :param client_id: Gets or sets the client identifier. - :type client_id: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - 'tenant': {'key': 'tenant', 'type': 'str'}, - 'audience': {'key': 'audience', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OAuthAuthentication, self).__init__(**kwargs) - self.secret = kwargs.get('secret', None) - self.tenant = kwargs.get('tenant', None) - self.audience = kwargs.get('audience', None) - self.client_id = kwargs.get('client_id', None) - self.type = 'ActiveDirectoryOAuth' diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/oauth_authentication_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/oauth_authentication_py3.py deleted file mode 100644 index 98780009a542..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/oauth_authentication_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .http_authentication_py3 import HttpAuthentication - - -class OAuthAuthentication(HttpAuthentication): - """OAuthAuthentication. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param secret: Gets or sets the secret, return value will always be empty. - :type secret: str - :param tenant: Gets or sets the tenant. - :type tenant: str - :param audience: Gets or sets the audience. - :type audience: str - :param client_id: Gets or sets the client identifier. - :type client_id: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, - 'tenant': {'key': 'tenant', 'type': 'str'}, - 'audience': {'key': 'audience', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__(self, *, secret: str=None, tenant: str=None, audience: str=None, client_id: str=None, **kwargs) -> None: - super(OAuthAuthentication, self).__init__(**kwargs) - self.secret = secret - self.tenant = tenant - self.audience = audience - self.client_id = client_id - self.type = 'ActiveDirectoryOAuth' diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/retry_policy.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/retry_policy.py deleted file mode 100644 index d3f82083878a..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/retry_policy.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RetryPolicy(Model): - """RetryPolicy. - - :param retry_type: Gets or sets the retry strategy to be used. Possible - values include: 'None', 'Fixed' - :type retry_type: str or ~azure.mgmt.scheduler.models.RetryType - :param retry_interval: Gets or sets the retry interval between retries, - specify duration in ISO 8601 format. - :type retry_interval: timedelta - :param retry_count: Gets or sets the number of times a retry should be - attempted. - :type retry_count: int - """ - - _attribute_map = { - 'retry_type': {'key': 'retryType', 'type': 'RetryType'}, - 'retry_interval': {'key': 'retryInterval', 'type': 'duration'}, - 'retry_count': {'key': 'retryCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(RetryPolicy, self).__init__(**kwargs) - self.retry_type = kwargs.get('retry_type', None) - self.retry_interval = kwargs.get('retry_interval', None) - self.retry_count = kwargs.get('retry_count', None) diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/retry_policy_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/retry_policy_py3.py deleted file mode 100644 index a68534d382a6..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/retry_policy_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RetryPolicy(Model): - """RetryPolicy. - - :param retry_type: Gets or sets the retry strategy to be used. Possible - values include: 'None', 'Fixed' - :type retry_type: str or ~azure.mgmt.scheduler.models.RetryType - :param retry_interval: Gets or sets the retry interval between retries, - specify duration in ISO 8601 format. - :type retry_interval: timedelta - :param retry_count: Gets or sets the number of times a retry should be - attempted. - :type retry_count: int - """ - - _attribute_map = { - 'retry_type': {'key': 'retryType', 'type': 'RetryType'}, - 'retry_interval': {'key': 'retryInterval', 'type': 'duration'}, - 'retry_count': {'key': 'retryCount', 'type': 'int'}, - } - - def __init__(self, *, retry_type=None, retry_interval=None, retry_count: int=None, **kwargs) -> None: - super(RetryPolicy, self).__init__(**kwargs) - self.retry_type = retry_type - self.retry_interval = retry_interval - self.retry_count = retry_count diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_authentication.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_authentication.py deleted file mode 100644 index bb524a8c1114..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_authentication.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceBusAuthentication(Model): - """ServiceBusAuthentication. - - :param sas_key: Gets or sets the SAS key. - :type sas_key: str - :param sas_key_name: Gets or sets the SAS key name. - :type sas_key_name: str - :param type: Gets or sets the authentication type. Possible values - include: 'NotSpecified', 'SharedAccessKey' - :type type: str or - ~azure.mgmt.scheduler.models.ServiceBusAuthenticationType - """ - - _attribute_map = { - 'sas_key': {'key': 'sasKey', 'type': 'str'}, - 'sas_key_name': {'key': 'sasKeyName', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ServiceBusAuthenticationType'}, - } - - def __init__(self, **kwargs): - super(ServiceBusAuthentication, self).__init__(**kwargs) - self.sas_key = kwargs.get('sas_key', None) - self.sas_key_name = kwargs.get('sas_key_name', None) - self.type = kwargs.get('type', None) diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_authentication_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_authentication_py3.py deleted file mode 100644 index 3cd3c85d3ed9..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_authentication_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceBusAuthentication(Model): - """ServiceBusAuthentication. - - :param sas_key: Gets or sets the SAS key. - :type sas_key: str - :param sas_key_name: Gets or sets the SAS key name. - :type sas_key_name: str - :param type: Gets or sets the authentication type. Possible values - include: 'NotSpecified', 'SharedAccessKey' - :type type: str or - ~azure.mgmt.scheduler.models.ServiceBusAuthenticationType - """ - - _attribute_map = { - 'sas_key': {'key': 'sasKey', 'type': 'str'}, - 'sas_key_name': {'key': 'sasKeyName', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ServiceBusAuthenticationType'}, - } - - def __init__(self, *, sas_key: str=None, sas_key_name: str=None, type=None, **kwargs) -> None: - super(ServiceBusAuthentication, self).__init__(**kwargs) - self.sas_key = sas_key - self.sas_key_name = sas_key_name - self.type = type diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_brokered_message_properties.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_brokered_message_properties.py deleted file mode 100644 index dc6b3f5eb539..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_brokered_message_properties.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceBusBrokeredMessageProperties(Model): - """ServiceBusBrokeredMessageProperties. - - :param content_type: Gets or sets the content type. - :type content_type: str - :param correlation_id: Gets or sets the correlation ID. - :type correlation_id: str - :param force_persistence: Gets or sets the force persistence. - :type force_persistence: bool - :param label: Gets or sets the label. - :type label: str - :param message_id: Gets or sets the message ID. - :type message_id: str - :param partition_key: Gets or sets the partition key. - :type partition_key: str - :param reply_to: Gets or sets the reply to. - :type reply_to: str - :param reply_to_session_id: Gets or sets the reply to session ID. - :type reply_to_session_id: str - :param scheduled_enqueue_time_utc: Gets or sets the scheduled enqueue time - UTC. - :type scheduled_enqueue_time_utc: datetime - :param session_id: Gets or sets the session ID. - :type session_id: str - :param time_to_live: Gets or sets the time to live. - :type time_to_live: timedelta - :param to: Gets or sets the to. - :type to: str - :param via_partition_key: Gets or sets the via partition key. - :type via_partition_key: str - """ - - _attribute_map = { - 'content_type': {'key': 'contentType', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'force_persistence': {'key': 'forcePersistence', 'type': 'bool'}, - 'label': {'key': 'label', 'type': 'str'}, - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'partition_key': {'key': 'partitionKey', 'type': 'str'}, - 'reply_to': {'key': 'replyTo', 'type': 'str'}, - 'reply_to_session_id': {'key': 'replyToSessionId', 'type': 'str'}, - 'scheduled_enqueue_time_utc': {'key': 'scheduledEnqueueTimeUtc', 'type': 'iso-8601'}, - 'session_id': {'key': 'sessionId', 'type': 'str'}, - 'time_to_live': {'key': 'timeToLive', 'type': 'duration'}, - 'to': {'key': 'to', 'type': 'str'}, - 'via_partition_key': {'key': 'viaPartitionKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceBusBrokeredMessageProperties, self).__init__(**kwargs) - self.content_type = kwargs.get('content_type', None) - self.correlation_id = kwargs.get('correlation_id', None) - self.force_persistence = kwargs.get('force_persistence', None) - self.label = kwargs.get('label', None) - self.message_id = kwargs.get('message_id', None) - self.partition_key = kwargs.get('partition_key', None) - self.reply_to = kwargs.get('reply_to', None) - self.reply_to_session_id = kwargs.get('reply_to_session_id', None) - self.scheduled_enqueue_time_utc = kwargs.get('scheduled_enqueue_time_utc', None) - self.session_id = kwargs.get('session_id', None) - self.time_to_live = kwargs.get('time_to_live', None) - self.to = kwargs.get('to', None) - self.via_partition_key = kwargs.get('via_partition_key', None) diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_brokered_message_properties_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_brokered_message_properties_py3.py deleted file mode 100644 index 70311750ff46..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_brokered_message_properties_py3.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceBusBrokeredMessageProperties(Model): - """ServiceBusBrokeredMessageProperties. - - :param content_type: Gets or sets the content type. - :type content_type: str - :param correlation_id: Gets or sets the correlation ID. - :type correlation_id: str - :param force_persistence: Gets or sets the force persistence. - :type force_persistence: bool - :param label: Gets or sets the label. - :type label: str - :param message_id: Gets or sets the message ID. - :type message_id: str - :param partition_key: Gets or sets the partition key. - :type partition_key: str - :param reply_to: Gets or sets the reply to. - :type reply_to: str - :param reply_to_session_id: Gets or sets the reply to session ID. - :type reply_to_session_id: str - :param scheduled_enqueue_time_utc: Gets or sets the scheduled enqueue time - UTC. - :type scheduled_enqueue_time_utc: datetime - :param session_id: Gets or sets the session ID. - :type session_id: str - :param time_to_live: Gets or sets the time to live. - :type time_to_live: timedelta - :param to: Gets or sets the to. - :type to: str - :param via_partition_key: Gets or sets the via partition key. - :type via_partition_key: str - """ - - _attribute_map = { - 'content_type': {'key': 'contentType', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'force_persistence': {'key': 'forcePersistence', 'type': 'bool'}, - 'label': {'key': 'label', 'type': 'str'}, - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'partition_key': {'key': 'partitionKey', 'type': 'str'}, - 'reply_to': {'key': 'replyTo', 'type': 'str'}, - 'reply_to_session_id': {'key': 'replyToSessionId', 'type': 'str'}, - 'scheduled_enqueue_time_utc': {'key': 'scheduledEnqueueTimeUtc', 'type': 'iso-8601'}, - 'session_id': {'key': 'sessionId', 'type': 'str'}, - 'time_to_live': {'key': 'timeToLive', 'type': 'duration'}, - 'to': {'key': 'to', 'type': 'str'}, - 'via_partition_key': {'key': 'viaPartitionKey', 'type': 'str'}, - } - - def __init__(self, *, content_type: str=None, correlation_id: str=None, force_persistence: bool=None, label: str=None, message_id: str=None, partition_key: str=None, reply_to: str=None, reply_to_session_id: str=None, scheduled_enqueue_time_utc=None, session_id: str=None, time_to_live=None, to: str=None, via_partition_key: str=None, **kwargs) -> None: - super(ServiceBusBrokeredMessageProperties, self).__init__(**kwargs) - self.content_type = content_type - self.correlation_id = correlation_id - self.force_persistence = force_persistence - self.label = label - self.message_id = message_id - self.partition_key = partition_key - self.reply_to = reply_to - self.reply_to_session_id = reply_to_session_id - self.scheduled_enqueue_time_utc = scheduled_enqueue_time_utc - self.session_id = session_id - self.time_to_live = time_to_live - self.to = to - self.via_partition_key = via_partition_key diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_message.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_message.py deleted file mode 100644 index bb257dea5565..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_message.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceBusMessage(Model): - """ServiceBusMessage. - - :param authentication: Gets or sets the Service Bus authentication. - :type authentication: - ~azure.mgmt.scheduler.models.ServiceBusAuthentication - :param brokered_message_properties: Gets or sets the brokered message - properties. - :type brokered_message_properties: - ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties - :param custom_message_properties: Gets or sets the custom message - properties. - :type custom_message_properties: dict[str, str] - :param message: Gets or sets the message. - :type message: str - :param namespace: Gets or sets the namespace. - :type namespace: str - :param transport_type: Gets or sets the transport type. Possible values - include: 'NotSpecified', 'NetMessaging', 'AMQP' - :type transport_type: str or - ~azure.mgmt.scheduler.models.ServiceBusTransportType - """ - - _attribute_map = { - 'authentication': {'key': 'authentication', 'type': 'ServiceBusAuthentication'}, - 'brokered_message_properties': {'key': 'brokeredMessageProperties', 'type': 'ServiceBusBrokeredMessageProperties'}, - 'custom_message_properties': {'key': 'customMessageProperties', 'type': '{str}'}, - 'message': {'key': 'message', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'transport_type': {'key': 'transportType', 'type': 'ServiceBusTransportType'}, - } - - def __init__(self, **kwargs): - super(ServiceBusMessage, self).__init__(**kwargs) - self.authentication = kwargs.get('authentication', None) - self.brokered_message_properties = kwargs.get('brokered_message_properties', None) - self.custom_message_properties = kwargs.get('custom_message_properties', None) - self.message = kwargs.get('message', None) - self.namespace = kwargs.get('namespace', None) - self.transport_type = kwargs.get('transport_type', None) diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_message_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_message_py3.py deleted file mode 100644 index 09e8d477dd17..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_message_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ServiceBusMessage(Model): - """ServiceBusMessage. - - :param authentication: Gets or sets the Service Bus authentication. - :type authentication: - ~azure.mgmt.scheduler.models.ServiceBusAuthentication - :param brokered_message_properties: Gets or sets the brokered message - properties. - :type brokered_message_properties: - ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties - :param custom_message_properties: Gets or sets the custom message - properties. - :type custom_message_properties: dict[str, str] - :param message: Gets or sets the message. - :type message: str - :param namespace: Gets or sets the namespace. - :type namespace: str - :param transport_type: Gets or sets the transport type. Possible values - include: 'NotSpecified', 'NetMessaging', 'AMQP' - :type transport_type: str or - ~azure.mgmt.scheduler.models.ServiceBusTransportType - """ - - _attribute_map = { - 'authentication': {'key': 'authentication', 'type': 'ServiceBusAuthentication'}, - 'brokered_message_properties': {'key': 'brokeredMessageProperties', 'type': 'ServiceBusBrokeredMessageProperties'}, - 'custom_message_properties': {'key': 'customMessageProperties', 'type': '{str}'}, - 'message': {'key': 'message', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'transport_type': {'key': 'transportType', 'type': 'ServiceBusTransportType'}, - } - - def __init__(self, *, authentication=None, brokered_message_properties=None, custom_message_properties=None, message: str=None, namespace: str=None, transport_type=None, **kwargs) -> None: - super(ServiceBusMessage, self).__init__(**kwargs) - self.authentication = authentication - self.brokered_message_properties = brokered_message_properties - self.custom_message_properties = custom_message_properties - self.message = message - self.namespace = namespace - self.transport_type = transport_type diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_queue_message.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_queue_message.py deleted file mode 100644 index 7650cffd2caa..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_queue_message.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_bus_message import ServiceBusMessage - - -class ServiceBusQueueMessage(ServiceBusMessage): - """ServiceBusQueueMessage. - - :param authentication: Gets or sets the Service Bus authentication. - :type authentication: - ~azure.mgmt.scheduler.models.ServiceBusAuthentication - :param brokered_message_properties: Gets or sets the brokered message - properties. - :type brokered_message_properties: - ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties - :param custom_message_properties: Gets or sets the custom message - properties. - :type custom_message_properties: dict[str, str] - :param message: Gets or sets the message. - :type message: str - :param namespace: Gets or sets the namespace. - :type namespace: str - :param transport_type: Gets or sets the transport type. Possible values - include: 'NotSpecified', 'NetMessaging', 'AMQP' - :type transport_type: str or - ~azure.mgmt.scheduler.models.ServiceBusTransportType - :param queue_name: Gets or sets the queue name. - :type queue_name: str - """ - - _attribute_map = { - 'authentication': {'key': 'authentication', 'type': 'ServiceBusAuthentication'}, - 'brokered_message_properties': {'key': 'brokeredMessageProperties', 'type': 'ServiceBusBrokeredMessageProperties'}, - 'custom_message_properties': {'key': 'customMessageProperties', 'type': '{str}'}, - 'message': {'key': 'message', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'transport_type': {'key': 'transportType', 'type': 'ServiceBusTransportType'}, - 'queue_name': {'key': 'queueName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceBusQueueMessage, self).__init__(**kwargs) - self.queue_name = kwargs.get('queue_name', None) diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_queue_message_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_queue_message_py3.py deleted file mode 100644 index 1ecd14fb7d6a..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_queue_message_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_bus_message_py3 import ServiceBusMessage - - -class ServiceBusQueueMessage(ServiceBusMessage): - """ServiceBusQueueMessage. - - :param authentication: Gets or sets the Service Bus authentication. - :type authentication: - ~azure.mgmt.scheduler.models.ServiceBusAuthentication - :param brokered_message_properties: Gets or sets the brokered message - properties. - :type brokered_message_properties: - ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties - :param custom_message_properties: Gets or sets the custom message - properties. - :type custom_message_properties: dict[str, str] - :param message: Gets or sets the message. - :type message: str - :param namespace: Gets or sets the namespace. - :type namespace: str - :param transport_type: Gets or sets the transport type. Possible values - include: 'NotSpecified', 'NetMessaging', 'AMQP' - :type transport_type: str or - ~azure.mgmt.scheduler.models.ServiceBusTransportType - :param queue_name: Gets or sets the queue name. - :type queue_name: str - """ - - _attribute_map = { - 'authentication': {'key': 'authentication', 'type': 'ServiceBusAuthentication'}, - 'brokered_message_properties': {'key': 'brokeredMessageProperties', 'type': 'ServiceBusBrokeredMessageProperties'}, - 'custom_message_properties': {'key': 'customMessageProperties', 'type': '{str}'}, - 'message': {'key': 'message', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'transport_type': {'key': 'transportType', 'type': 'ServiceBusTransportType'}, - 'queue_name': {'key': 'queueName', 'type': 'str'}, - } - - def __init__(self, *, authentication=None, brokered_message_properties=None, custom_message_properties=None, message: str=None, namespace: str=None, transport_type=None, queue_name: str=None, **kwargs) -> None: - super(ServiceBusQueueMessage, self).__init__(authentication=authentication, brokered_message_properties=brokered_message_properties, custom_message_properties=custom_message_properties, message=message, namespace=namespace, transport_type=transport_type, **kwargs) - self.queue_name = queue_name diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_topic_message.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_topic_message.py deleted file mode 100644 index 429f98cc0bea..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_topic_message.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_bus_message import ServiceBusMessage - - -class ServiceBusTopicMessage(ServiceBusMessage): - """ServiceBusTopicMessage. - - :param authentication: Gets or sets the Service Bus authentication. - :type authentication: - ~azure.mgmt.scheduler.models.ServiceBusAuthentication - :param brokered_message_properties: Gets or sets the brokered message - properties. - :type brokered_message_properties: - ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties - :param custom_message_properties: Gets or sets the custom message - properties. - :type custom_message_properties: dict[str, str] - :param message: Gets or sets the message. - :type message: str - :param namespace: Gets or sets the namespace. - :type namespace: str - :param transport_type: Gets or sets the transport type. Possible values - include: 'NotSpecified', 'NetMessaging', 'AMQP' - :type transport_type: str or - ~azure.mgmt.scheduler.models.ServiceBusTransportType - :param topic_path: Gets or sets the topic path. - :type topic_path: str - """ - - _attribute_map = { - 'authentication': {'key': 'authentication', 'type': 'ServiceBusAuthentication'}, - 'brokered_message_properties': {'key': 'brokeredMessageProperties', 'type': 'ServiceBusBrokeredMessageProperties'}, - 'custom_message_properties': {'key': 'customMessageProperties', 'type': '{str}'}, - 'message': {'key': 'message', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'transport_type': {'key': 'transportType', 'type': 'ServiceBusTransportType'}, - 'topic_path': {'key': 'topicPath', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ServiceBusTopicMessage, self).__init__(**kwargs) - self.topic_path = kwargs.get('topic_path', None) diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_topic_message_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_topic_message_py3.py deleted file mode 100644 index 16a3862cb8f5..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_topic_message_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .service_bus_message_py3 import ServiceBusMessage - - -class ServiceBusTopicMessage(ServiceBusMessage): - """ServiceBusTopicMessage. - - :param authentication: Gets or sets the Service Bus authentication. - :type authentication: - ~azure.mgmt.scheduler.models.ServiceBusAuthentication - :param brokered_message_properties: Gets or sets the brokered message - properties. - :type brokered_message_properties: - ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties - :param custom_message_properties: Gets or sets the custom message - properties. - :type custom_message_properties: dict[str, str] - :param message: Gets or sets the message. - :type message: str - :param namespace: Gets or sets the namespace. - :type namespace: str - :param transport_type: Gets or sets the transport type. Possible values - include: 'NotSpecified', 'NetMessaging', 'AMQP' - :type transport_type: str or - ~azure.mgmt.scheduler.models.ServiceBusTransportType - :param topic_path: Gets or sets the topic path. - :type topic_path: str - """ - - _attribute_map = { - 'authentication': {'key': 'authentication', 'type': 'ServiceBusAuthentication'}, - 'brokered_message_properties': {'key': 'brokeredMessageProperties', 'type': 'ServiceBusBrokeredMessageProperties'}, - 'custom_message_properties': {'key': 'customMessageProperties', 'type': '{str}'}, - 'message': {'key': 'message', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'transport_type': {'key': 'transportType', 'type': 'ServiceBusTransportType'}, - 'topic_path': {'key': 'topicPath', 'type': 'str'}, - } - - def __init__(self, *, authentication=None, brokered_message_properties=None, custom_message_properties=None, message: str=None, namespace: str=None, transport_type=None, topic_path: str=None, **kwargs) -> None: - super(ServiceBusTopicMessage, self).__init__(authentication=authentication, brokered_message_properties=brokered_message_properties, custom_message_properties=custom_message_properties, message=message, namespace=namespace, transport_type=transport_type, **kwargs) - self.topic_path = topic_path diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/sku.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/sku.py deleted file mode 100644 index a0f85333a6a3..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/sku.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """Sku. - - :param name: Gets or set the SKU. Possible values include: 'Standard', - 'Free', 'P10Premium', 'P20Premium' - :type name: str or ~azure.mgmt.scheduler.models.SkuDefinition - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'SkuDefinition'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/sku_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/sku_py3.py deleted file mode 100644 index ad04e60dbaf5..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/sku_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Sku(Model): - """Sku. - - :param name: Gets or set the SKU. Possible values include: 'Standard', - 'Free', 'P10Premium', 'P20Premium' - :type name: str or ~azure.mgmt.scheduler.models.SkuDefinition - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'SkuDefinition'}, - } - - def __init__(self, *, name=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/storage_queue_message.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/storage_queue_message.py deleted file mode 100644 index 46e6906f48d1..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/storage_queue_message.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageQueueMessage(Model): - """StorageQueueMessage. - - :param storage_account: Gets or sets the storage account name. - :type storage_account: str - :param queue_name: Gets or sets the queue name. - :type queue_name: str - :param sas_token: Gets or sets the SAS key. - :type sas_token: str - :param message: Gets or sets the message. - :type message: str - """ - - _attribute_map = { - 'storage_account': {'key': 'storageAccount', 'type': 'str'}, - 'queue_name': {'key': 'queueName', 'type': 'str'}, - 'sas_token': {'key': 'sasToken', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StorageQueueMessage, self).__init__(**kwargs) - self.storage_account = kwargs.get('storage_account', None) - self.queue_name = kwargs.get('queue_name', None) - self.sas_token = kwargs.get('sas_token', None) - self.message = kwargs.get('message', None) diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/storage_queue_message_py3.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/storage_queue_message_py3.py deleted file mode 100644 index f88c7a0add57..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/storage_queue_message_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageQueueMessage(Model): - """StorageQueueMessage. - - :param storage_account: Gets or sets the storage account name. - :type storage_account: str - :param queue_name: Gets or sets the queue name. - :type queue_name: str - :param sas_token: Gets or sets the SAS key. - :type sas_token: str - :param message: Gets or sets the message. - :type message: str - """ - - _attribute_map = { - 'storage_account': {'key': 'storageAccount', 'type': 'str'}, - 'queue_name': {'key': 'queueName', 'type': 'str'}, - 'sas_token': {'key': 'sasToken', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, storage_account: str=None, queue_name: str=None, sas_token: str=None, message: str=None, **kwargs) -> None: - super(StorageQueueMessage, self).__init__(**kwargs) - self.storage_account = storage_account - self.queue_name = queue_name - self.sas_token = sas_token - self.message = message diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/__init__.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/__init__.py index 48aa56c7e729..e652df531228 100644 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/__init__.py +++ b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/__init__.py @@ -9,8 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from .job_collections_operations import JobCollectionsOperations -from .jobs_operations import JobsOperations +from ._job_collections_operations import JobCollectionsOperations +from ._jobs_operations import JobsOperations __all__ = [ 'JobCollectionsOperations', diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/job_collections_operations.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/_job_collections_operations.py similarity index 91% rename from sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/job_collections_operations.py rename to sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/_job_collections_operations.py index ae105960fdea..05ccc754e13a 100644 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/job_collections_operations.py +++ b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/_job_collections_operations.py @@ -21,6 +21,8 @@ class JobCollectionsOperations(object): """JobCollectionsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -53,8 +55,7 @@ def list_by_subscription( ~azure.mgmt.scheduler.models.JobCollectionDefinitionPaged[~azure.mgmt.scheduler.models.JobCollectionDefinition] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_subscription.metadata['url'] @@ -73,7 +74,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -82,9 +83,13 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -94,12 +99,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobCollectionDefinitionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobCollectionDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobCollectionDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Scheduler/jobCollections'} @@ -120,8 +123,7 @@ def list_by_resource_group( ~azure.mgmt.scheduler.models.JobCollectionDefinitionPaged[~azure.mgmt.scheduler.models.JobCollectionDefinition] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -141,7 +143,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -150,9 +152,13 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -162,12 +168,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobCollectionDefinitionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobCollectionDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobCollectionDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections'} @@ -205,7 +209,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -214,8 +218,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -223,7 +227,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobCollectionDefinition', response) @@ -270,6 +273,7 @@ def create_or_update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -282,9 +286,8 @@ def create_or_update( body_content = self._serialize.body(job_collection, 'JobCollectionDefinition') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -292,7 +295,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobCollectionDefinition', response) if response.status_code == 201: @@ -341,6 +343,7 @@ def patch( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -353,9 +356,8 @@ def patch( body_content = self._serialize.body(job_collection, 'JobCollectionDefinition') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -363,7 +365,6 @@ def patch( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobCollectionDefinition', response) @@ -392,7 +393,6 @@ def _delete_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -401,8 +401,8 @@ def _delete_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) @@ -472,7 +472,6 @@ def _enable_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -481,8 +480,8 @@ def _enable_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) @@ -552,7 +551,6 @@ def _disable_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -561,8 +559,8 @@ def _disable_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: exp = CloudError(response) diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/jobs_operations.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/_jobs_operations.py similarity index 89% rename from sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/jobs_operations.py rename to sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/_jobs_operations.py index 9a25fdbae7a2..75f69335afea 100644 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/jobs_operations.py +++ b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/_jobs_operations.py @@ -19,6 +19,8 @@ class JobsOperations(object): """JobsOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -73,7 +75,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -82,8 +84,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -91,7 +93,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobDefinition', response) @@ -103,7 +104,7 @@ def get( get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}'} def create_or_update( - self, resource_group_name, job_collection_name, job_name, properties=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, job_collection_name, job_name, job, custom_headers=None, raw=False, **operation_config): """Provisions a new job or updates an existing job. :param resource_group_name: The resource group name. @@ -112,8 +113,8 @@ def create_or_update( :type job_collection_name: str :param job_name: The job name. :type job_name: str - :param properties: Gets or sets the job properties. - :type properties: ~azure.mgmt.scheduler.models.JobProperties + :param job: The job definition. + :type job: ~azure.mgmt.scheduler.models.JobDefinition :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -124,8 +125,6 @@ def create_or_update( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - job = models.JobDefinition(properties=properties) - # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { @@ -142,6 +141,7 @@ def create_or_update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -154,9 +154,8 @@ def create_or_update( body_content = self._serialize.body(job, 'JobDefinition') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -164,7 +163,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobDefinition', response) if response.status_code == 201: @@ -178,7 +176,7 @@ def create_or_update( create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}'} def patch( - self, resource_group_name, job_collection_name, job_name, properties=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, job_collection_name, job_name, job, custom_headers=None, raw=False, **operation_config): """Patches an existing job. :param resource_group_name: The resource group name. @@ -187,8 +185,8 @@ def patch( :type job_collection_name: str :param job_name: The job name. :type job_name: str - :param properties: Gets or sets the job properties. - :type properties: ~azure.mgmt.scheduler.models.JobProperties + :param job: The job definition. + :type job: ~azure.mgmt.scheduler.models.JobDefinition :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -199,8 +197,6 @@ def patch( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - job = models.JobDefinition(properties=properties) - # Construct URL url = self.patch.metadata['url'] path_format_arguments = { @@ -217,6 +213,7 @@ def patch( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -229,9 +226,8 @@ def patch( body_content = self._serialize.body(job, 'JobDefinition') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -239,7 +235,6 @@ def patch( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobDefinition', response) @@ -285,7 +280,6 @@ def delete( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -294,8 +288,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -342,7 +336,6 @@ def run( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -351,8 +344,8 @@ def run( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -390,8 +383,7 @@ def list( ~azure.mgmt.scheduler.models.JobDefinitionPaged[~azure.mgmt.scheduler.models.JobDefinition] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -418,7 +410,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -427,9 +419,13 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -439,12 +435,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobDefinitionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs'} @@ -477,8 +471,7 @@ def list_job_history( ~azure.mgmt.scheduler.models.JobHistoryDefinitionPaged[~azure.mgmt.scheduler.models.JobHistoryDefinition] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_job_history.metadata['url'] @@ -506,7 +499,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -515,9 +508,13 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -527,12 +524,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobHistoryDefinitionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobHistoryDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobHistoryDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}/history'} diff --git a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/patch.py b/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/patch.py deleted file mode 100644 index 31b17803f148..000000000000 --- a/sdk/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/patch.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- - -# Retry policy -# 20 seconds => "retryType": "fixed", "retryInterval": "00:00:20", -# 20 minutes => "retryType": "fixed", "retryInterval": "00:20:00", -# 1 hours => "retryType": "fixed", "retryInterval": "01:00:00", -# 2 days => "retryType": "fixed", "retryInterval": "60.00:00:00", -# default => "retryType": "fixed" -# none => "retryType": "none" -import datetime -import re -import isodate -import msrest.serialization - -_TIMESPAN_MATCHER = re.compile(r"([\d]+\.)?(\d\d):(\d\d):(\d\d)") - -def from_timespan_to_iso8601(timespan_str): - match = _TIMESPAN_MATCHER.match(timespan_str) - groups = match.groups() - int_groups = [int(groups[0][:-1]) if groups[0] else 0] - int_groups += [int(v) for v in groups[1:]] - - return "P{}DT{}H{}M{}S".format( - int(int_groups[0] / 30), - int_groups[1], - int_groups[2], - int_groups[3] - ) - -def from_iso8601_to_timespan(iso_str): - # Be sure to handle str + isodate.Duration + timedelta - iso_str = msrest.serialization.Serializer.serialize_duration(iso_str) - iso_obj = isodate.parse_duration(iso_str) - hours_str = "{:02d}:{:02d}:{:02d}".format( - iso_obj.seconds // 3600, # hours - iso_obj.seconds % 3600 // 60, # minutes - iso_obj.seconds % 3600 % 60 # seconds - ) - return "{}.{}".format(iso_obj.days * 30, hours_str) if iso_obj.days else hours_str - -def serialize_scheduler_duration(attr, **kwargs): - return from_iso8601_to_timespan(attr) - -def deserialize_scheduler_duration(attr, **kwargs): - value = from_timespan_to_iso8601(attr) - return msrest.serialization.Deserializer.deserialize_duration(value) - -def patch_client(client): - client._serialize.serialize_type['duration'] = serialize_scheduler_duration - client._deserialize.deserialize_type ['duration'] = deserialize_scheduler_duration