From b5c8eaddbe9b88d03c477a2f24b3b17cc477d1ab Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 8 Dec 2017 18:44:46 +0000 Subject: [PATCH] Generated from e3b273aee8480717614b088d9777c6fe4104a386 --- .../azure/mgmt/scheduler/models/__init__.py | 2 - .../scheduler/models/basic_authentication.py | 18 +- .../models/client_cert_authentication.py | 18 +- .../scheduler/models/http_authentication.py | 25 +- .../mgmt/scheduler/models/http_request.py | 5 +- .../azure/mgmt/scheduler/models/job_action.py | 23 +- .../models/job_collection_definition.py | 5 +- .../models/job_collection_definition_paged.py | 2 +- .../models/job_collection_properties.py | 8 +- .../scheduler/models/job_collection_quota.py | 3 +- .../mgmt/scheduler/models/job_definition.py | 3 +- .../scheduler/models/job_definition_paged.py | 2 +- .../mgmt/scheduler/models/job_error_action.py | 20 +- .../models/job_history_definition.py | 4 +- .../models/job_history_definition_paged.py | 2 +- .../job_history_definition_properties.py | 7 +- .../scheduler/models/job_history_filter.py | 3 +- .../scheduler/models/job_max_recurrence.py | 3 +- .../mgmt/scheduler/models/job_properties.py | 11 +- .../mgmt/scheduler/models/job_recurrence.py | 6 +- .../models/job_recurrence_schedule.py | 14 +- ..._recurrence_schedule_monthly_occurrence.py | 3 +- .../mgmt/scheduler/models/job_state_filter.py | 3 +- .../scheduler/models/oauth_authentication.py | 18 +- .../mgmt/scheduler/models/retry_policy.py | 3 +- .../scheduler_management_client_enums.py | 8 - .../models/service_bus_authentication.py | 4 +- .../scheduler/models/service_bus_message.py | 13 +- .../models/service_bus_queue_message.py | 13 +- .../models/service_bus_topic_message.py | 13 +- .../azure/mgmt/scheduler/models/sku.py | 3 +- .../operations/job_collections_operations.py | 70 ++- .../scheduler/operations/jobs_operations.py | 51 +-- .../azure/mgmt/scheduler/patch.py | 55 --- .../scheduler/scheduler_management_client.py | 11 +- .../azure/mgmt/scheduler/version.py | 2 +- azure-mgmt-scheduler/build.json | 425 +++++++++++++++++- 37 files changed, 603 insertions(+), 276 deletions(-) delete mode 100644 azure-mgmt-scheduler/azure/mgmt/scheduler/patch.py diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/__init__.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/__init__.py index 40ea60b62c55..2bbab2c90e25 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/__init__.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/__init__.py @@ -46,7 +46,6 @@ JobCollectionState, RecurrenceFrequency, JobActionType, - HttpAuthenticationType, RetryType, DayOfWeek, JobScheduleDay, @@ -94,7 +93,6 @@ 'JobCollectionState', 'RecurrenceFrequency', 'JobActionType', - 'HttpAuthenticationType', 'RetryType', 'DayOfWeek', 'JobScheduleDay', diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/basic_authentication.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/basic_authentication.py index bac148cf4e57..759aee5e8f33 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/basic_authentication.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/basic_authentication.py @@ -15,11 +15,8 @@ class BasicAuthentication(HttpAuthentication): """BasicAuthentication. - :param type: Gets or sets the HTTP authentication type. Possible values - include: 'NotSpecified', 'ClientCertificate', 'ActiveDirectoryOAuth', - 'Basic' - :type type: str or :class:`HttpAuthenticationType - ` + :param type: 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 @@ -27,13 +24,18 @@ class BasicAuthentication(HttpAuthentication): :type password: str """ + _validation = { + 'type': {'required': True}, + } + _attribute_map = { - 'type': {'key': 'type', 'type': 'HttpAuthenticationType'}, + 'type': {'key': 'type', 'type': 'str'}, 'username': {'key': 'username', 'type': 'str'}, 'password': {'key': 'password', 'type': 'str'}, } - def __init__(self, type=None, username=None, password=None): - super(BasicAuthentication, self).__init__(type=type) + def __init__(self, username=None, password=None): + super(BasicAuthentication, self).__init__() self.username = username self.password = password + self.type = 'Basic' diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/client_cert_authentication.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/client_cert_authentication.py index a5e01d8d45cd..9822ee1a90c3 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/client_cert_authentication.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/client_cert_authentication.py @@ -15,11 +15,8 @@ class ClientCertAuthentication(HttpAuthentication): """ClientCertAuthentication. - :param type: Gets or sets the HTTP authentication type. Possible values - include: 'NotSpecified', 'ClientCertificate', 'ActiveDirectoryOAuth', - 'Basic' - :type type: str or :class:`HttpAuthenticationType - ` + :param type: Constant filled by server. + :type type: str :param password: Gets or sets the certificate password, return value will always be empty. :type password: str @@ -36,8 +33,12 @@ class ClientCertAuthentication(HttpAuthentication): :type certificate_subject_name: str """ + _validation = { + 'type': {'required': True}, + } + _attribute_map = { - 'type': {'key': 'type', 'type': 'HttpAuthenticationType'}, + 'type': {'key': 'type', 'type': 'str'}, 'password': {'key': 'password', 'type': 'str'}, 'pfx': {'key': 'pfx', 'type': 'str'}, 'certificate_thumbprint': {'key': 'certificateThumbprint', 'type': 'str'}, @@ -45,10 +46,11 @@ class ClientCertAuthentication(HttpAuthentication): 'certificate_subject_name': {'key': 'certificateSubjectName', 'type': 'str'}, } - def __init__(self, type=None, password=None, pfx=None, certificate_thumbprint=None, certificate_expiration_date=None, certificate_subject_name=None): - super(ClientCertAuthentication, self).__init__(type=type) + def __init__(self, password=None, pfx=None, certificate_thumbprint=None, certificate_expiration_date=None, certificate_subject_name=None): + super(ClientCertAuthentication, self).__init__() 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/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_authentication.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_authentication.py index a1a213b8b9cd..2c9eb08f4151 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_authentication.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_authentication.py @@ -15,16 +15,25 @@ class HttpAuthentication(Model): """HttpAuthentication. - :param type: Gets or sets the HTTP authentication type. Possible values - include: 'NotSpecified', 'ClientCertificate', 'ActiveDirectoryOAuth', - 'Basic' - :type type: str or :class:`HttpAuthenticationType - ` + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ClientCertAuthentication, BasicAuthentication, + OAuthAuthentication + + :param type: Constant filled by server. + :type type: str """ + _validation = { + 'type': {'required': True}, + } + _attribute_map = { - 'type': {'key': 'type', 'type': 'HttpAuthenticationType'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'ClientCertificate': 'ClientCertAuthentication', 'Basic': 'BasicAuthentication', 'ActiveDirectoryOAuth': 'OAuthAuthentication'} } - def __init__(self, type=None): - self.type = type + def __init__(self): + self.type = None diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_request.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_request.py index a0e49a791ae5..cffd4e5604ac 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_request.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/http_request.py @@ -17,8 +17,7 @@ class HttpRequest(Model): :param authentication: Gets or sets the authentication method of the request. - :type authentication: :class:`HttpAuthentication - ` + :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. @@ -26,7 +25,7 @@ class HttpRequest(Model): :param body: Gets or sets the request body. :type body: str :param headers: Gets or sets the headers. - :type headers: dict + :type headers: dict[str, str] """ _attribute_map = { diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_action.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_action.py index 6dcf9f3aaef2..751a24e4250c 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_action.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_action.py @@ -17,28 +17,23 @@ class JobAction(Model): :param type: Gets or sets the job action type. Possible values include: 'Http', 'Https', 'StorageQueue', 'ServiceBusQueue', 'ServiceBusTopic' - :type type: str or :class:`JobActionType - ` + :type type: str or ~azure.mgmt.scheduler.models.JobActionType :param request: Gets or sets the http requests. - :type request: :class:`HttpRequest - ` + :type request: ~azure.mgmt.scheduler.models.HttpRequest :param queue_message: Gets or sets the storage queue message. - :type queue_message: :class:`StorageQueueMessage - ` + :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: :class:`ServiceBusQueueMessage - ` + :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: :class:`ServiceBusTopicMessage - ` + :type service_bus_topic_message: + ~azure.mgmt.scheduler.models.ServiceBusTopicMessage :param retry_policy: Gets or sets the retry policy. - :type retry_policy: :class:`RetryPolicy - ` + :type retry_policy: ~azure.mgmt.scheduler.models.RetryPolicy :param error_action: Gets or sets the error action. - :type error_action: :class:`JobErrorAction - ` + :type error_action: ~azure.mgmt.scheduler.models.JobErrorAction """ _attribute_map = { diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition.py index aef3eaffec85..27bcc08dd2e9 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition.py @@ -27,10 +27,9 @@ class JobCollectionDefinition(Model): :param location: Gets or sets the storage account location. :type location: str :param tags: Gets or sets the tags. - :type tags: dict + :type tags: dict[str, str] :param properties: Gets or sets the job collection properties. - :type properties: :class:`JobCollectionProperties - ` + :type properties: ~azure.mgmt.scheduler.models.JobCollectionProperties """ _validation = { diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition_paged.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition_paged.py index c14768483eb3..4830c059bb71 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition_paged.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_definition_paged.py @@ -14,7 +14,7 @@ class JobCollectionDefinitionPaged(Paged): """ - A paging container for iterating over a list of JobCollectionDefinition object + A paging container for iterating over a list of :class:`JobCollectionDefinition ` object """ _attribute_map = { diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_properties.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_properties.py index a8031e81b2aa..96238b722b0c 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_properties.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_properties.py @@ -16,14 +16,12 @@ class JobCollectionProperties(Model): """JobCollectionProperties. :param sku: Gets or sets the SKU. - :type sku: :class:`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 :class:`JobCollectionState - ` + :type state: str or ~azure.mgmt.scheduler.models.JobCollectionState :param quota: Gets or sets the job collection quota. - :type quota: :class:`JobCollectionQuota - ` + :type quota: ~azure.mgmt.scheduler.models.JobCollectionQuota """ _attribute_map = { diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_quota.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_quota.py index 9d1be6c1f489..f665f3716089 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_quota.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_collection_quota.py @@ -20,8 +20,7 @@ class JobCollectionQuota(Model): :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: :class:`JobMaxRecurrence - ` + :type max_recurrence: ~azure.mgmt.scheduler.models.JobMaxRecurrence """ _attribute_map = { diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition.py index 2a17177feabf..db4b9418ce1a 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition.py @@ -25,8 +25,7 @@ class JobDefinition(Model): :ivar name: Gets the job resource name. :vartype name: str :param properties: Gets or sets the job properties. - :type properties: :class:`JobProperties - ` + :type properties: ~azure.mgmt.scheduler.models.JobProperties """ _validation = { diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition_paged.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition_paged.py index 49be62a84990..e783c67a39dc 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition_paged.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_definition_paged.py @@ -14,7 +14,7 @@ class JobDefinitionPaged(Paged): """ - A paging container for iterating over a list of JobDefinition object + A paging container for iterating over a list of :class:`JobDefinition ` object """ _attribute_map = { diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_error_action.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_error_action.py index fb17bac70aba..d905ed0fe81c 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_error_action.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_error_action.py @@ -18,25 +18,21 @@ class JobErrorAction(Model): :param type: Gets or sets the job error action type. Possible values include: 'Http', 'Https', 'StorageQueue', 'ServiceBusQueue', 'ServiceBusTopic' - :type type: str or :class:`JobActionType - ` + :type type: str or ~azure.mgmt.scheduler.models.JobActionType :param request: Gets or sets the http requests. - :type request: :class:`HttpRequest - ` + :type request: ~azure.mgmt.scheduler.models.HttpRequest :param queue_message: Gets or sets the storage queue message. - :type queue_message: :class:`StorageQueueMessage - ` + :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: :class:`ServiceBusQueueMessage - ` + :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: :class:`ServiceBusTopicMessage - ` + :type service_bus_topic_message: + ~azure.mgmt.scheduler.models.ServiceBusTopicMessage :param retry_policy: Gets or sets the retry policy. - :type retry_policy: :class:`RetryPolicy - ` + :type retry_policy: ~azure.mgmt.scheduler.models.RetryPolicy """ _attribute_map = { diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition.py index cfb2438e619e..3c5772f0114f 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition.py @@ -25,8 +25,8 @@ class JobHistoryDefinition(Model): :ivar name: Gets the job history name. :vartype name: str :ivar properties: Gets or sets the job history properties. - :vartype properties: :class:`JobHistoryDefinitionProperties - ` + :vartype properties: + ~azure.mgmt.scheduler.models.JobHistoryDefinitionProperties """ _validation = { diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_paged.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_paged.py index ef40ea946ce0..8b9ba23980bb 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_paged.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_paged.py @@ -14,7 +14,7 @@ class JobHistoryDefinitionPaged(Paged): """ - A paging container for iterating over a list of JobHistoryDefinition object + A paging container for iterating over a list of :class:`JobHistoryDefinition ` object """ _attribute_map = { diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_properties.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_properties.py index 021b542d6ee8..f9a440ad4c37 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_properties.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_definition_properties.py @@ -27,12 +27,11 @@ class JobHistoryDefinitionProperties(Model): :vartype expected_execution_time: datetime :ivar action_name: Gets the job history action name. Possible values include: 'MainAction', 'ErrorAction' - :vartype action_name: str or :class:`JobHistoryActionName - ` + :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 :class:`JobExecutionStatus - ` + :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. diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_filter.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_filter.py index 82e1f8117b46..e10d147d5099 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_filter.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_history_filter.py @@ -17,8 +17,7 @@ class JobHistoryFilter(Model): :param status: Gets or sets the job execution status. Possible values include: 'Completed', 'Failed', 'Postponed' - :type status: str or :class:`JobExecutionStatus - ` + :type status: str or ~azure.mgmt.scheduler.models.JobExecutionStatus """ _attribute_map = { diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_max_recurrence.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_max_recurrence.py index de4df60d8070..c62dad2d30d2 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_max_recurrence.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_max_recurrence.py @@ -18,8 +18,7 @@ class JobMaxRecurrence(Model): :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 :class:`RecurrenceFrequency - ` + :type frequency: str or ~azure.mgmt.scheduler.models.RecurrenceFrequency :param interval: Gets or sets the interval between retries. :type interval: int """ diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_properties.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_properties.py index 857d3bd1cc2d..37e20e5b320d 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_properties.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_properties.py @@ -21,17 +21,14 @@ class JobProperties(Model): :param start_time: Gets or sets the job start time. :type start_time: datetime :param action: Gets or sets the job action. - :type action: :class:`JobAction ` + :type action: ~azure.mgmt.scheduler.models.JobAction :param recurrence: Gets or sets the job recurrence. - :type recurrence: :class:`JobRecurrence - ` + :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 :class:`JobState - ` + :type state: str or ~azure.mgmt.scheduler.models.JobState :ivar status: Gets the job status. - :vartype status: :class:`JobStatus - ` + :vartype status: ~azure.mgmt.scheduler.models.JobStatus """ _validation = { diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence.py index 0e86ef2cb99c..a50a6aeff1b6 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence.py @@ -18,8 +18,7 @@ class JobRecurrence(Model): :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 :class:`RecurrenceFrequency - ` + :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 @@ -28,8 +27,7 @@ class JobRecurrence(Model): :param end_time: Gets or sets the time at which the job will complete. :type end_time: datetime :param schedule: - :type schedule: :class:`JobRecurrenceSchedule - ` + :type schedule: ~azure.mgmt.scheduler.models.JobRecurrenceSchedule """ _attribute_map = { diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule.py index 7eca2cbdf7b8..8ca677235c4e 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule.py @@ -17,22 +17,20 @@ class JobRecurrenceSchedule(Model): :param week_days: Gets or sets the days of the week that the job should execute on. - :type week_days: list of str or :class:`DayOfWeek - ` + :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 of int + :type hours: list[int] :param minutes: Gets or sets the minutes of the hour that the job should execute at. - :type minutes: list of int + :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 of int + :type month_days: list[int] :param monthly_occurrences: Gets or sets the occurrences of days within a month. - :type monthly_occurrences: list of - :class:`JobRecurrenceScheduleMonthlyOccurrence - ` + :type monthly_occurrences: + list[~azure.mgmt.scheduler.models.JobRecurrenceScheduleMonthlyOccurrence] """ _attribute_map = { diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_monthly_occurrence.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_monthly_occurrence.py index 7ae07cd7388f..9a0b40611912 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_monthly_occurrence.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_recurrence_schedule_monthly_occurrence.py @@ -19,8 +19,7 @@ class JobRecurrenceScheduleMonthlyOccurrence(Model): wednesday, thursday, friday, saturday, sunday. Possible values include: 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' - :type day: str or :class:`JobScheduleDay - ` + :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 """ diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_state_filter.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_state_filter.py index 692c1d68bb11..3f4177421f49 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_state_filter.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/job_state_filter.py @@ -17,8 +17,7 @@ class JobStateFilter(Model): :param state: Gets or sets the job state. Possible values include: 'Enabled', 'Disabled', 'Faulted', 'Completed' - :type state: str or :class:`JobState - ` + :type state: str or ~azure.mgmt.scheduler.models.JobState """ _attribute_map = { diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/oauth_authentication.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/oauth_authentication.py index 777ac4bdb310..14e91dc2e0e1 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/oauth_authentication.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/oauth_authentication.py @@ -15,11 +15,8 @@ class OAuthAuthentication(HttpAuthentication): """OAuthAuthentication. - :param type: Gets or sets the HTTP authentication type. Possible values - include: 'NotSpecified', 'ClientCertificate', 'ActiveDirectoryOAuth', - 'Basic' - :type type: str or :class:`HttpAuthenticationType - ` + :param type: 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. @@ -30,17 +27,22 @@ class OAuthAuthentication(HttpAuthentication): :type client_id: str """ + _validation = { + 'type': {'required': True}, + } + _attribute_map = { - 'type': {'key': 'type', 'type': 'HttpAuthenticationType'}, + '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, type=None, secret=None, tenant=None, audience=None, client_id=None): - super(OAuthAuthentication, self).__init__(type=type) + def __init__(self, secret=None, tenant=None, audience=None, client_id=None): + super(OAuthAuthentication, self).__init__() self.secret = secret self.tenant = tenant self.audience = audience self.client_id = client_id + self.type = 'ActiveDirectoryOAuth' diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/retry_policy.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/retry_policy.py index 1a9cd22db149..da79426f67ef 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/retry_policy.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/retry_policy.py @@ -17,8 +17,7 @@ class RetryPolicy(Model): :param retry_type: Gets or sets the retry strategy to be used. Possible values include: 'None', 'Fixed' - :type retry_type: str or :class:`RetryType - ` + :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 diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/scheduler_management_client_enums.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/scheduler_management_client_enums.py index de93816e54cd..13e042e2faa0 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/scheduler_management_client_enums.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/scheduler_management_client_enums.py @@ -46,14 +46,6 @@ class JobActionType(Enum): service_bus_topic = "ServiceBusTopic" -class HttpAuthenticationType(Enum): - - not_specified = "NotSpecified" - client_certificate = "ClientCertificate" - active_directory_oauth = "ActiveDirectoryOAuth" - basic = "Basic" - - class RetryType(Enum): none = "None" diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_authentication.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_authentication.py index 08a424a6565f..8440b1e8ae73 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_authentication.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_authentication.py @@ -21,8 +21,8 @@ class ServiceBusAuthentication(Model): :type sas_key_name: str :param type: Gets or sets the authentication type. Possible values include: 'NotSpecified', 'SharedAccessKey' - :type type: str or :class:`ServiceBusAuthenticationType - ` + :type type: str or + ~azure.mgmt.scheduler.models.ServiceBusAuthenticationType """ _attribute_map = { diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_message.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_message.py index b459c4db2c82..735f3618b25d 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_message.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_message.py @@ -16,24 +16,23 @@ class ServiceBusMessage(Model): """ServiceBusMessage. :param authentication: Gets or sets the Service Bus authentication. - :type authentication: :class:`ServiceBusAuthentication - ` + :type authentication: + ~azure.mgmt.scheduler.models.ServiceBusAuthentication :param brokered_message_properties: Gets or sets the brokered message properties. :type brokered_message_properties: - :class:`ServiceBusBrokeredMessageProperties - ` + ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties :param custom_message_properties: Gets or sets the custom message properties. - :type custom_message_properties: dict + :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 :class:`ServiceBusTransportType - ` + :type transport_type: str or + ~azure.mgmt.scheduler.models.ServiceBusTransportType """ _attribute_map = { diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_queue_message.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_queue_message.py index 3ad865a294e5..e09d02ca9c64 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_queue_message.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_queue_message.py @@ -16,24 +16,23 @@ class ServiceBusQueueMessage(ServiceBusMessage): """ServiceBusQueueMessage. :param authentication: Gets or sets the Service Bus authentication. - :type authentication: :class:`ServiceBusAuthentication - ` + :type authentication: + ~azure.mgmt.scheduler.models.ServiceBusAuthentication :param brokered_message_properties: Gets or sets the brokered message properties. :type brokered_message_properties: - :class:`ServiceBusBrokeredMessageProperties - ` + ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties :param custom_message_properties: Gets or sets the custom message properties. - :type custom_message_properties: dict + :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 :class:`ServiceBusTransportType - ` + :type transport_type: str or + ~azure.mgmt.scheduler.models.ServiceBusTransportType :param queue_name: Gets or sets the queue name. :type queue_name: str """ diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_topic_message.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_topic_message.py index 8c7509524414..0a5675f16f85 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_topic_message.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/service_bus_topic_message.py @@ -16,24 +16,23 @@ class ServiceBusTopicMessage(ServiceBusMessage): """ServiceBusTopicMessage. :param authentication: Gets or sets the Service Bus authentication. - :type authentication: :class:`ServiceBusAuthentication - ` + :type authentication: + ~azure.mgmt.scheduler.models.ServiceBusAuthentication :param brokered_message_properties: Gets or sets the brokered message properties. :type brokered_message_properties: - :class:`ServiceBusBrokeredMessageProperties - ` + ~azure.mgmt.scheduler.models.ServiceBusBrokeredMessageProperties :param custom_message_properties: Gets or sets the custom message properties. - :type custom_message_properties: dict + :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 :class:`ServiceBusTransportType - ` + :type transport_type: str or + ~azure.mgmt.scheduler.models.ServiceBusTransportType :param topic_path: Gets or sets the topic path. :type topic_path: str """ diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/sku.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/sku.py index 3adba9eb4478..49c0823df30f 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/models/sku.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/models/sku.py @@ -17,8 +17,7 @@ class Sku(Model): :param name: Gets or set the SKU. Possible values include: 'Standard', 'Free', 'P10Premium', 'P20Premium' - :type name: str or :class:`SkuDefinition - ` + :type name: str or ~azure.mgmt.scheduler.models.SkuDefinition """ _attribute_map = { diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/job_collections_operations.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/job_collections_operations.py index 3528d5090fc1..1de798ba0d25 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/job_collections_operations.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/job_collections_operations.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from msrestazure.azure_operation import AzureOperationPoller -import uuid from .. import models @@ -27,6 +27,8 @@ class JobCollectionsOperations(object): :ivar api_version: The API version. Constant value: "2016-03-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -45,8 +47,9 @@ def list_by_subscription( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`JobCollectionDefinitionPaged - ` + :return: An iterator like instance of JobCollectionDefinition + :rtype: + ~azure.mgmt.scheduler.models.JobCollectionDefinitionPaged[~azure.mgmt.scheduler.models.JobCollectionDefinition] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -110,8 +113,9 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`JobCollectionDefinitionPaged - ` + :return: An iterator like instance of JobCollectionDefinition + :rtype: + ~azure.mgmt.scheduler.models.JobCollectionDefinitionPaged[~azure.mgmt.scheduler.models.JobCollectionDefinition] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -178,10 +182,9 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`JobCollectionDefinition - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: JobCollectionDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.scheduler.models.JobCollectionDefinition or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -236,17 +239,16 @@ def create_or_update( :param job_collection_name: The job collection name. :type job_collection_name: str :param job_collection: The job collection definition. - :type job_collection: :class:`JobCollectionDefinition - ` + :type job_collection: + ~azure.mgmt.scheduler.models.JobCollectionDefinition :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`JobCollectionDefinition - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: JobCollectionDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.scheduler.models.JobCollectionDefinition or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -307,17 +309,16 @@ def patch( :param job_collection_name: The job collection name. :type job_collection_name: str :param job_collection: The job collection definition. - :type job_collection: :class:`JobCollectionDefinition - ` + :type job_collection: + ~azure.mgmt.scheduler.models.JobCollectionDefinition :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`JobCollectionDefinition - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: JobCollectionDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.scheduler.models.JobCollectionDefinition or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -378,11 +379,10 @@ def delete( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -455,11 +455,10 @@ def enable( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -532,11 +531,10 @@ def disable( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/jobs_operations.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/jobs_operations.py index a8a6aae1ae4a..4c3c4b3b4682 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/jobs_operations.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/operations/jobs_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -26,6 +26,8 @@ class JobsOperations(object): :ivar api_version: The API version. Constant value: "2016-03-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -50,10 +52,9 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`JobDefinition - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: JobDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.scheduler.models.JobDefinition or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -111,17 +112,15 @@ def create_or_update( :param job_name: The job name. :type job_name: str :param properties: Gets or sets the job properties. - :type properties: :class:`JobProperties - ` + :type properties: ~azure.mgmt.scheduler.models.JobProperties :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`JobDefinition - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: JobDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.scheduler.models.JobDefinition or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ job = models.JobDefinition(properties=properties) @@ -187,17 +186,15 @@ def patch( :param job_name: The job name. :type job_name: str :param properties: Gets or sets the job properties. - :type properties: :class:`JobProperties - ` + :type properties: ~azure.mgmt.scheduler.models.JobProperties :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`JobDefinition - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: JobDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.scheduler.models.JobDefinition or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ job = models.JobDefinition(properties=properties) @@ -265,9 +262,8 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -322,9 +318,8 @@ def run( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -385,8 +380,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`JobDefinitionPaged - ` + :return: An iterator like instance of JobDefinition + :rtype: + ~azure.mgmt.scheduler.models.JobDefinitionPaged[~azure.mgmt.scheduler.models.JobDefinition] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -470,8 +466,9 @@ def list_job_history( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`JobHistoryDefinitionPaged - ` + :return: An iterator like instance of JobHistoryDefinition + :rtype: + ~azure.mgmt.scheduler.models.JobHistoryDefinitionPaged[~azure.mgmt.scheduler.models.JobHistoryDefinition] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/patch.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/patch.py deleted file mode 100644 index 31b17803f148..000000000000 --- a/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 diff --git a/azure-mgmt-scheduler/azure/mgmt/scheduler/scheduler_management_client.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/scheduler_management_client.py index e78a1c6cabea..6635155107b0 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/scheduler_management_client.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/scheduler_management_client.py @@ -16,7 +16,6 @@ from .operations.job_collections_operations import JobCollectionsOperations from .operations.jobs_operations import JobsOperations from . import models -from .patch import patch_client class SchedulerManagementClientConfiguration(AzureConfiguration): @@ -39,14 +38,12 @@ def __init__( raise ValueError("Parameter 'credentials' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") if not base_url: base_url = 'https://management.azure.com' super(SchedulerManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('schedulermanagementclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-scheduler/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials @@ -60,9 +57,9 @@ class SchedulerManagementClient(object): :vartype config: SchedulerManagementClientConfiguration :ivar job_collections: JobCollections operations - :vartype job_collections: .operations.JobCollectionsOperations + :vartype job_collections: azure.mgmt.scheduler.operations.JobCollectionsOperations :ivar jobs: Jobs operations - :vartype jobs: .operations.JobsOperations + :vartype jobs: azure.mgmt.scheduler.operations.JobsOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -87,5 +84,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/azure-mgmt-scheduler/azure/mgmt/scheduler/version.py b/azure-mgmt-scheduler/azure/mgmt/scheduler/version.py index ba555a9074f2..8c52a31098fd 100644 --- a/azure-mgmt-scheduler/azure/mgmt/scheduler/version.py +++ b/azure-mgmt-scheduler/azure/mgmt/scheduler/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "1.1.3" +VERSION = "2016-03-01" diff --git a/azure-mgmt-scheduler/build.json b/azure-mgmt-scheduler/build.json index ed05e5d9e905..861b7b2a44b3 100644 --- a/azure-mgmt-scheduler/build.json +++ b/azure-mgmt-scheduler/build.json @@ -1,5 +1,424 @@ { - "autorest": "1.0.1-20170417-2300-nightly", - "date": "2017-04-18T20:13:42Z", - "version": "1.1.2" + "autorest": [ + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest-core", + "version": "2.0.4216", + "engines": { + "node": ">=7.10.0" + }, + "dependencies": {}, + "optionalDependencies": {}, + "devDependencies": { + "@types/commonmark": "^0.27.0", + "@types/js-yaml": "^3.10.0", + "@types/jsonpath": "^0.1.29", + "@types/node": "^8.0.53", + "@types/source-map": "^0.5.0", + "@types/yargs": "^8.0.2", + "dts-generator": "^2.1.0", + "mocha": "^4.0.1", + "mocha-typescript": "^1.1.7", + "shx": "0.2.2", + "static-link": "^0.2.3", + "vscode-jsonrpc": "^3.3.1" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", + "_shasum": "f6b97454df552dfa54bd0df23f8309665be5fd4c", + "_shrinkwrap": null, + "bin": { + "autorest-core": "./dist/app.js", + "autorest-language-service": "dist/language-service/language-service.js" + }, + "_id": "@microsoft.azure/autorest-core@2.0.4216", + "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", + "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.4710.0886748126295.personal-lock", + "options": { + "port": 38393, + "host": "2130759545", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.4710.0886748126295.personal-lock:38393" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest-core", + "version": "2.0.4220", + "engines": { + "node": ">=7.10.0" + }, + "dependencies": {}, + "optionalDependencies": {}, + "devDependencies": { + "@types/commonmark": "^0.27.0", + "@types/js-yaml": "^3.10.0", + "@types/jsonpath": "^0.1.29", + "@types/node": "^8.0.53", + "@types/source-map": "^0.5.0", + "@types/yargs": "^8.0.2", + "@types/z-schema": "^3.16.31", + "dts-generator": "^2.1.0", + "mocha": "^4.0.1", + "mocha-typescript": "^1.1.7", + "shx": "0.2.2", + "static-link": "^0.2.3", + "vscode-jsonrpc": "^3.3.1" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4220/node_modules/@microsoft.azure/autorest-core", + "_shasum": "92ba9c76c4d44df25907f440318be23835e8bffc", + "_shrinkwrap": null, + "bin": { + "autorest-core": "./dist/app.js", + "autorest-language-service": "dist/language-service/language-service.js" + }, + "_id": "@microsoft.azure/autorest-core@2.0.4220", + "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4220/node_modules/@microsoft.azure/autorest-core", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4220/node_modules/@microsoft.azure/autorest-core", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4220/node_modules/@microsoft.azure/autorest-core", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4220/node_modules/@microsoft.azure/autorest-core", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4220/node_modules/@microsoft.azure/autorest-core" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4220/node_modules/@microsoft.azure/autorest-core", + "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4220/node_modules/@microsoft.azure/autorest-core" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.4710.0886748126295.personal-lock", + "options": { + "port": 38393, + "host": "2130759545", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.4710.0886748126295.personal-lock:38393" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest.modeler", + "version": "2.0.21", + "dependencies": { + "dotnet-2.0.0": "^1.3.2" + }, + "optionalDependencies": {}, + "devDependencies": { + "coffee-script": "^1.11.1", + "dotnet-sdk-2.0.0": "^1.1.1", + "gulp": "^3.9.1", + "gulp-filter": "^5.0.0", + "gulp-line-ending-corrector": "^1.0.1", + "iced-coffee-script": "^108.0.11", + "marked": "^0.3.6", + "marked-terminal": "^2.0.0", + "moment": "^2.17.1", + "run-sequence": "*", + "shx": "^0.2.2", + "through2-parallel": "^0.1.3", + "yargs": "^8.0.2", + "yarn": "^1.0.2" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_shasum": "3ce7d3939124b31830be15e5de99b9b7768afb90", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest.modeler@2.0.21", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.4710.0886748126295.personal-lock", + "options": { + "port": 38393, + "host": "2130759545", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.4710.0886748126295.personal-lock:38393" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest.modeler", + "version": "2.3.38", + "dependencies": { + "dotnet-2.0.0": "^1.4.4" + }, + "optionalDependencies": {}, + "devDependencies": { + "@microsoft.azure/autorest.testserver": "2.3.1", + "autorest": "^2.0.4201", + "coffee-script": "^1.11.1", + "dotnet-sdk-2.0.0": "^1.4.4", + "gulp": "^3.9.1", + "gulp-filter": "^5.0.0", + "gulp-line-ending-corrector": "^1.0.1", + "iced-coffee-script": "^108.0.11", + "marked": "^0.3.6", + "marked-terminal": "^2.0.0", + "moment": "^2.17.1", + "run-sequence": "*", + "shx": "^0.2.2", + "through2-parallel": "^0.1.3", + "yargs": "^8.0.2", + "yarn": "^1.0.2" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "_shasum": "903bb77932e4ed1b8bc3b25cc39b167143494f6c", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest.modeler@2.3.38", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.4710.0886748126295.personal-lock", + "options": { + "port": 38393, + "host": "2130759545", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.4710.0886748126295.personal-lock:38393" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest.python", + "version": "2.1.26", + "dependencies": { + "dotnet-2.0.0": "^1.4.4" + }, + "optionalDependencies": {}, + "devDependencies": { + "@microsoft.azure/autorest.testserver": "2.3.12", + "autorest": "^2.0.4203", + "coffee-script": "^1.11.1", + "dotnet-sdk-2.0.0": "^1.4.4", + "gulp": "^3.9.1", + "gulp-filter": "^5.0.0", + "gulp-line-ending-corrector": "^1.0.1", + "iced-coffee-script": "^108.0.11", + "marked": "^0.3.6", + "marked-terminal": "^2.0.0", + "moment": "^2.17.1", + "run-sequence": "*", + "shx": "^0.2.2", + "through2-parallel": "^0.1.3", + "yargs": "^8.0.2", + "yarn": "^1.0.2" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest.python@2.1.26/node_modules/@microsoft.azure/autorest.python", + "_shasum": "fce552a203c4b359b3f21a194a6deacc8f40ae80", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest.python@2.1.26", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.python@2.1.26/node_modules/@microsoft.azure/autorest.python", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.python@2.1.26/node_modules/@microsoft.azure/autorest.python", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.26/node_modules/@microsoft.azure/autorest.python", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.python@2.1.26/node_modules/@microsoft.azure/autorest.python", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.26/node_modules/@microsoft.azure/autorest.python" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.26/node_modules/@microsoft.azure/autorest.python", + "_where": "/root/.autorest/@microsoft.azure_autorest.python@2.1.26/node_modules/@microsoft.azure/autorest.python" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.4710.0886748126295.personal-lock", + "options": { + "port": 38393, + "host": "2130759545", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.4710.0886748126295.personal-lock:38393" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + } + ], + "autorest_bootstrap": {} } \ No newline at end of file