From da3444bef59422e4c94c3210d16444a8c38fbcef Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 8 Jan 2019 23:09:24 +0000 Subject: [PATCH 1/3] Generated from 30ce8a5d068ff6b375d77746ce44810802593ade remove timeout as required --- .../azure/mgmt/datafactory/models/__init__.py | 8 ++ .../datafactory/models/control_activity.py | 4 +- .../models/control_activity_py3.py | 4 +- .../data_factory_management_client_enums.py | 5 + .../datafactory/models/web_hook_activity.py | 94 +++++++++++++++++++ .../web_hook_activity_authentication.py | 53 +++++++++++ .../web_hook_activity_authentication_py3.py | 53 +++++++++++ .../models/web_hook_activity_py3.py | 94 +++++++++++++++++++ 8 files changed, 311 insertions(+), 4 deletions(-) create mode 100644 azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity.py create mode 100644 azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity_authentication.py create mode 100644 azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity_authentication_py3.py create mode 100644 azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity_py3.py diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py index c9728054c80a..4b86eaec64f2 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py @@ -342,6 +342,8 @@ from .wait_activity_py3 import WaitActivity from .for_each_activity_py3 import ForEachActivity from .if_condition_activity_py3 import IfConditionActivity + from .web_hook_activity_authentication_py3 import WebHookActivityAuthentication + from .web_hook_activity_py3 import WebHookActivity from .execute_pipeline_activity_py3 import ExecutePipelineActivity from .control_activity_py3 import ControlActivity from .linked_integration_runtime_py3 import LinkedIntegrationRuntime @@ -702,6 +704,8 @@ from .wait_activity import WaitActivity from .for_each_activity import ForEachActivity from .if_condition_activity import IfConditionActivity + from .web_hook_activity_authentication import WebHookActivityAuthentication + from .web_hook_activity import WebHookActivity from .execute_pipeline_activity import ExecutePipelineActivity from .control_activity import ControlActivity from .linked_integration_runtime import LinkedIntegrationRuntime @@ -787,6 +791,7 @@ CopyBehaviorType, PolybaseSettingsRejectType, SapCloudForCustomerSinkWriteBehavior, + WebHookActivityMethod, IntegrationRuntimeType, SelfHostedIntegrationRuntimeNodeStatus, IntegrationRuntimeUpdateResult, @@ -1132,6 +1137,8 @@ 'WaitActivity', 'ForEachActivity', 'IfConditionActivity', + 'WebHookActivityAuthentication', + 'WebHookActivity', 'ExecutePipelineActivity', 'ControlActivity', 'LinkedIntegrationRuntime', @@ -1216,6 +1223,7 @@ 'CopyBehaviorType', 'PolybaseSettingsRejectType', 'SapCloudForCustomerSinkWriteBehavior', + 'WebHookActivityMethod', 'IntegrationRuntimeType', 'SelfHostedIntegrationRuntimeNodeStatus', 'IntegrationRuntimeUpdateResult', diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/control_activity.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/control_activity.py index 16581581786b..e0f9592f9759 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/control_activity.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/control_activity.py @@ -18,7 +18,7 @@ class ControlActivity(Activity): You probably want to use the sub-classes and not this class directly. Known sub-classes are: AppendVariableActivity, SetVariableActivity, FilterActivity, UntilActivity, WaitActivity, ForEachActivity, - IfConditionActivity, ExecutePipelineActivity + IfConditionActivity, WebHookActivity, ExecutePipelineActivity All required parameters must be populated in order to send to Azure. @@ -52,7 +52,7 @@ class ControlActivity(Activity): } _subtype_map = { - 'type': {'AppendVariable': 'AppendVariableActivity', 'SetVariable': 'SetVariableActivity', 'Filter': 'FilterActivity', 'Until': 'UntilActivity', 'Wait': 'WaitActivity', 'ForEach': 'ForEachActivity', 'IfCondition': 'IfConditionActivity', 'ExecutePipeline': 'ExecutePipelineActivity'} + 'type': {'AppendVariable': 'AppendVariableActivity', 'SetVariable': 'SetVariableActivity', 'Filter': 'FilterActivity', 'Until': 'UntilActivity', 'Wait': 'WaitActivity', 'ForEach': 'ForEachActivity', 'IfCondition': 'IfConditionActivity', 'WebHook': 'WebHookActivity', 'ExecutePipeline': 'ExecutePipelineActivity'} } def __init__(self, **kwargs): diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/control_activity_py3.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/control_activity_py3.py index 739d8b9c311b..8021c7a34c14 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/control_activity_py3.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/control_activity_py3.py @@ -18,7 +18,7 @@ class ControlActivity(Activity): You probably want to use the sub-classes and not this class directly. Known sub-classes are: AppendVariableActivity, SetVariableActivity, FilterActivity, UntilActivity, WaitActivity, ForEachActivity, - IfConditionActivity, ExecutePipelineActivity + IfConditionActivity, WebHookActivity, ExecutePipelineActivity All required parameters must be populated in order to send to Azure. @@ -52,7 +52,7 @@ class ControlActivity(Activity): } _subtype_map = { - 'type': {'AppendVariable': 'AppendVariableActivity', 'SetVariable': 'SetVariableActivity', 'Filter': 'FilterActivity', 'Until': 'UntilActivity', 'Wait': 'WaitActivity', 'ForEach': 'ForEachActivity', 'IfCondition': 'IfConditionActivity', 'ExecutePipeline': 'ExecutePipelineActivity'} + 'type': {'AppendVariable': 'AppendVariableActivity', 'SetVariable': 'SetVariableActivity', 'Filter': 'FilterActivity', 'Until': 'UntilActivity', 'Wait': 'WaitActivity', 'ForEach': 'ForEachActivity', 'IfCondition': 'IfConditionActivity', 'WebHook': 'WebHookActivity', 'ExecutePipeline': 'ExecutePipelineActivity'} } def __init__(self, *, name: str, additional_properties=None, description: str=None, depends_on=None, user_properties=None, **kwargs) -> None: diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/data_factory_management_client_enums.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/data_factory_management_client_enums.py index 23334492e4d2..a135c4b2e101 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/data_factory_management_client_enums.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/data_factory_management_client_enums.py @@ -384,6 +384,11 @@ class SapCloudForCustomerSinkWriteBehavior(str, Enum): update = "Update" +class WebHookActivityMethod(str, Enum): + + post = "POST" + + class IntegrationRuntimeType(str, Enum): managed = "Managed" diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity.py new file mode 100644 index 000000000000..6f7df796763c --- /dev/null +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity.py @@ -0,0 +1,94 @@ +# 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 .control_activity import ControlActivity + + +class WebHookActivity(ControlActivity): + """WebHook activity. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :ivar method: Required. Rest API method for target endpoint. Default + value: "POST" . + :vartype method: str + :param url: Required. WebHook activity target endpoint and path. Type: + string (or Expression with resultType string). + :type url: object + :param timeout: Specifies the timeout within which the webhook should be + called back. If there is no value specified, it takes the value of + TimeSpan.FromMinutes(10) which is 10 minutes as default. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type timeout: object + :param headers: Represents the headers that will be sent to the request. + For example, to set the language and type on a request: "headers" : { + "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: + string (or Expression with resultType string). + :type headers: object + :param body: Represents the payload that will be sent to the endpoint. + Required for POST/PUT method, not allowed for GET method Type: string (or + Expression with resultType string). + :type body: object + :param authentication: Authentication method used for calling the + endpoint. + :type authentication: + ~azure.mgmt.datafactory.models.WebHookActivityAuthentication + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'method': {'required': True, 'constant': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'method': {'key': 'typeProperties.method', 'type': 'str'}, + 'url': {'key': 'typeProperties.url', 'type': 'object'}, + 'timeout': {'key': 'typeProperties.timeout', 'type': 'object'}, + 'headers': {'key': 'typeProperties.headers', 'type': 'object'}, + 'body': {'key': 'typeProperties.body', 'type': 'object'}, + 'authentication': {'key': 'typeProperties.authentication', 'type': 'WebHookActivityAuthentication'}, + } + + method = "POST" + + def __init__(self, **kwargs): + super(WebHookActivity, self).__init__(**kwargs) + self.url = kwargs.get('url', None) + self.timeout = kwargs.get('timeout', None) + self.headers = kwargs.get('headers', None) + self.body = kwargs.get('body', None) + self.authentication = kwargs.get('authentication', None) + self.type = 'WebHook' diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity_authentication.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity_authentication.py new file mode 100644 index 000000000000..32e282d90693 --- /dev/null +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity_authentication.py @@ -0,0 +1,53 @@ +# 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 WebHookActivityAuthentication(Model): + """WebHook activity authentication properties. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. WebHook activity authentication + (Basic/ClientCertificate/MSI) + :type type: str + :param pfx: Base64-encoded contents of a PFX file. + :type pfx: ~azure.mgmt.datafactory.models.SecureString + :param username: WebHook activity authentication user name for basic + authentication. + :type username: str + :param password: Password for the PFX file or basic authentication. + :type password: ~azure.mgmt.datafactory.models.SecureString + :param resource: Resource for which Azure Auth token will be requested + when using MSI Authentication. + :type resource: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'pfx': {'key': 'pfx', 'type': 'SecureString'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'SecureString'}, + 'resource': {'key': 'resource', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WebHookActivityAuthentication, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.pfx = kwargs.get('pfx', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.resource = kwargs.get('resource', None) diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity_authentication_py3.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity_authentication_py3.py new file mode 100644 index 000000000000..9c2aa413fa44 --- /dev/null +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity_authentication_py3.py @@ -0,0 +1,53 @@ +# 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 WebHookActivityAuthentication(Model): + """WebHook activity authentication properties. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. WebHook activity authentication + (Basic/ClientCertificate/MSI) + :type type: str + :param pfx: Base64-encoded contents of a PFX file. + :type pfx: ~azure.mgmt.datafactory.models.SecureString + :param username: WebHook activity authentication user name for basic + authentication. + :type username: str + :param password: Password for the PFX file or basic authentication. + :type password: ~azure.mgmt.datafactory.models.SecureString + :param resource: Resource for which Azure Auth token will be requested + when using MSI Authentication. + :type resource: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'pfx': {'key': 'pfx', 'type': 'SecureString'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'SecureString'}, + 'resource': {'key': 'resource', 'type': 'str'}, + } + + def __init__(self, *, type: str, pfx=None, username: str=None, password=None, resource: str=None, **kwargs) -> None: + super(WebHookActivityAuthentication, self).__init__(**kwargs) + self.type = type + self.pfx = pfx + self.username = username + self.password = password + self.resource = resource diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity_py3.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity_py3.py new file mode 100644 index 000000000000..94bca5a8f3a1 --- /dev/null +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity_py3.py @@ -0,0 +1,94 @@ +# 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 .control_activity_py3 import ControlActivity + + +class WebHookActivity(ControlActivity): + """WebHook activity. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Activity name. + :type name: str + :param description: Activity description. + :type description: str + :param depends_on: Activity depends on condition. + :type depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency] + :param user_properties: Activity user properties. + :type user_properties: list[~azure.mgmt.datafactory.models.UserProperty] + :param type: Required. Constant filled by server. + :type type: str + :ivar method: Required. Rest API method for target endpoint. Default + value: "POST" . + :vartype method: str + :param url: Required. WebHook activity target endpoint and path. Type: + string (or Expression with resultType string). + :type url: object + :param timeout: Specifies the timeout within which the webhook should be + called back. If there is no value specified, it takes the value of + TimeSpan.FromMinutes(10) which is 10 minutes as default. Type: string (or + Expression with resultType string), pattern: + ((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + :type timeout: object + :param headers: Represents the headers that will be sent to the request. + For example, to set the language and type on a request: "headers" : { + "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: + string (or Expression with resultType string). + :type headers: object + :param body: Represents the payload that will be sent to the endpoint. + Required for POST/PUT method, not allowed for GET method Type: string (or + Expression with resultType string). + :type body: object + :param authentication: Authentication method used for calling the + endpoint. + :type authentication: + ~azure.mgmt.datafactory.models.WebHookActivityAuthentication + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + 'method': {'required': True, 'constant': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'}, + 'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'method': {'key': 'typeProperties.method', 'type': 'str'}, + 'url': {'key': 'typeProperties.url', 'type': 'object'}, + 'timeout': {'key': 'typeProperties.timeout', 'type': 'object'}, + 'headers': {'key': 'typeProperties.headers', 'type': 'object'}, + 'body': {'key': 'typeProperties.body', 'type': 'object'}, + 'authentication': {'key': 'typeProperties.authentication', 'type': 'WebHookActivityAuthentication'}, + } + + method = "POST" + + def __init__(self, *, name: str, url, additional_properties=None, description: str=None, depends_on=None, user_properties=None, timeout=None, headers=None, body=None, authentication=None, **kwargs) -> None: + super(WebHookActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, **kwargs) + self.url = url + self.timeout = timeout + self.headers = headers + self.body = body + self.authentication = authentication + self.type = 'WebHook' From fbbc01e8489b120f0acb516308d4fbd1200a6a67 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 10 Jan 2019 01:05:05 +0000 Subject: [PATCH 2/3] Generated from 0d3bebe04c8ee34399f725a3581ba55cebff214f combine and update web auth definitions --- .../azure/mgmt/datafactory/models/__init__.py | 5 +- .../data_factory_management_client_enums.py | 7 +++ .../models/web_activity_authentication.py | 6 ++- .../models/web_activity_authentication_py3.py | 8 +-- .../datafactory/models/web_hook_activity.py | 4 +- .../web_hook_activity_authentication.py | 53 ------------------- .../web_hook_activity_authentication_py3.py | 53 ------------------- .../models/web_hook_activity_py3.py | 4 +- 8 files changed, 22 insertions(+), 118 deletions(-) delete mode 100644 azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity_authentication.py delete mode 100644 azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity_authentication_py3.py diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py index 4b86eaec64f2..acbcb5b1a472 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py @@ -342,7 +342,6 @@ from .wait_activity_py3 import WaitActivity from .for_each_activity_py3 import ForEachActivity from .if_condition_activity_py3 import IfConditionActivity - from .web_hook_activity_authentication_py3 import WebHookActivityAuthentication from .web_hook_activity_py3 import WebHookActivity from .execute_pipeline_activity_py3 import ExecutePipelineActivity from .control_activity_py3 import ControlActivity @@ -704,7 +703,6 @@ from .wait_activity import WaitActivity from .for_each_activity import ForEachActivity from .if_condition_activity import IfConditionActivity - from .web_hook_activity_authentication import WebHookActivityAuthentication from .web_hook_activity import WebHookActivity from .execute_pipeline_activity import ExecutePipelineActivity from .control_activity import ControlActivity @@ -781,6 +779,7 @@ SybaseAuthenticationType, DatasetCompressionLevel, JsonFormatFilePattern, + WebActivityAuthenticationType, WebActivityMethod, CassandraSourceReadConsistencyLevels, StoredProcedureParameterType, @@ -1137,7 +1136,6 @@ 'WaitActivity', 'ForEachActivity', 'IfConditionActivity', - 'WebHookActivityAuthentication', 'WebHookActivity', 'ExecutePipelineActivity', 'ControlActivity', @@ -1213,6 +1211,7 @@ 'SybaseAuthenticationType', 'DatasetCompressionLevel', 'JsonFormatFilePattern', + 'WebActivityAuthenticationType', 'WebActivityMethod', 'CassandraSourceReadConsistencyLevels', 'StoredProcedureParameterType', diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/data_factory_management_client_enums.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/data_factory_management_client_enums.py index a135c4b2e101..2d0f38c976c6 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/data_factory_management_client_enums.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/data_factory_management_client_enums.py @@ -308,6 +308,13 @@ class JsonFormatFilePattern(str, Enum): array_of_objects = "arrayOfObjects" +class WebActivityAuthenticationType(str, Enum): + + basic = "Basic" + client_certificate = "ClientCertificate" + msi = "MSI" + + class WebActivityMethod(str, Enum): get = "GET" diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_activity_authentication.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_activity_authentication.py index 6ebb193ae5e9..abce44faa5c2 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_activity_authentication.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_activity_authentication.py @@ -18,8 +18,10 @@ class WebActivityAuthentication(Model): All required parameters must be populated in order to send to Azure. :param type: Required. Web activity authentication - (Basic/ClientCertificate/MSI) - :type type: str + (Basic/ClientCertificate/MSI). Possible values include: 'Basic', + 'ClientCertificate', 'MSI' + :type type: str or + ~azure.mgmt.datafactory.models.WebActivityAuthenticationType :param pfx: Base64-encoded contents of a PFX file. :type pfx: ~azure.mgmt.datafactory.models.SecureString :param username: Web activity authentication user name for basic diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_activity_authentication_py3.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_activity_authentication_py3.py index 4c2b68ba7161..a82b06ed0ce7 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_activity_authentication_py3.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_activity_authentication_py3.py @@ -18,8 +18,10 @@ class WebActivityAuthentication(Model): All required parameters must be populated in order to send to Azure. :param type: Required. Web activity authentication - (Basic/ClientCertificate/MSI) - :type type: str + (Basic/ClientCertificate/MSI). Possible values include: 'Basic', + 'ClientCertificate', 'MSI' + :type type: str or + ~azure.mgmt.datafactory.models.WebActivityAuthenticationType :param pfx: Base64-encoded contents of a PFX file. :type pfx: ~azure.mgmt.datafactory.models.SecureString :param username: Web activity authentication user name for basic @@ -44,7 +46,7 @@ class WebActivityAuthentication(Model): 'resource': {'key': 'resource', 'type': 'str'}, } - def __init__(self, *, type: str, pfx=None, username: str=None, password=None, resource: str=None, **kwargs) -> None: + def __init__(self, *, type, pfx=None, username: str=None, password=None, resource: str=None, **kwargs) -> None: super(WebActivityAuthentication, self).__init__(**kwargs) self.type = type self.pfx = pfx diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity.py index 6f7df796763c..ca8945a9d697 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity.py @@ -57,7 +57,7 @@ class WebHookActivity(ControlActivity): :param authentication: Authentication method used for calling the endpoint. :type authentication: - ~azure.mgmt.datafactory.models.WebHookActivityAuthentication + ~azure.mgmt.datafactory.models.WebActivityAuthentication """ _validation = { @@ -79,7 +79,7 @@ class WebHookActivity(ControlActivity): 'timeout': {'key': 'typeProperties.timeout', 'type': 'object'}, 'headers': {'key': 'typeProperties.headers', 'type': 'object'}, 'body': {'key': 'typeProperties.body', 'type': 'object'}, - 'authentication': {'key': 'typeProperties.authentication', 'type': 'WebHookActivityAuthentication'}, + 'authentication': {'key': 'typeProperties.authentication', 'type': 'WebActivityAuthentication'}, } method = "POST" diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity_authentication.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity_authentication.py deleted file mode 100644 index 32e282d90693..000000000000 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity_authentication.py +++ /dev/null @@ -1,53 +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 WebHookActivityAuthentication(Model): - """WebHook activity authentication properties. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. WebHook activity authentication - (Basic/ClientCertificate/MSI) - :type type: str - :param pfx: Base64-encoded contents of a PFX file. - :type pfx: ~azure.mgmt.datafactory.models.SecureString - :param username: WebHook activity authentication user name for basic - authentication. - :type username: str - :param password: Password for the PFX file or basic authentication. - :type password: ~azure.mgmt.datafactory.models.SecureString - :param resource: Resource for which Azure Auth token will be requested - when using MSI Authentication. - :type resource: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'pfx': {'key': 'pfx', 'type': 'SecureString'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'SecureString'}, - 'resource': {'key': 'resource', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WebHookActivityAuthentication, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.pfx = kwargs.get('pfx', None) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) - self.resource = kwargs.get('resource', None) diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity_authentication_py3.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity_authentication_py3.py deleted file mode 100644 index 9c2aa413fa44..000000000000 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity_authentication_py3.py +++ /dev/null @@ -1,53 +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 WebHookActivityAuthentication(Model): - """WebHook activity authentication properties. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. WebHook activity authentication - (Basic/ClientCertificate/MSI) - :type type: str - :param pfx: Base64-encoded contents of a PFX file. - :type pfx: ~azure.mgmt.datafactory.models.SecureString - :param username: WebHook activity authentication user name for basic - authentication. - :type username: str - :param password: Password for the PFX file or basic authentication. - :type password: ~azure.mgmt.datafactory.models.SecureString - :param resource: Resource for which Azure Auth token will be requested - when using MSI Authentication. - :type resource: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'pfx': {'key': 'pfx', 'type': 'SecureString'}, - 'username': {'key': 'username', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'SecureString'}, - 'resource': {'key': 'resource', 'type': 'str'}, - } - - def __init__(self, *, type: str, pfx=None, username: str=None, password=None, resource: str=None, **kwargs) -> None: - super(WebHookActivityAuthentication, self).__init__(**kwargs) - self.type = type - self.pfx = pfx - self.username = username - self.password = password - self.resource = resource diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity_py3.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity_py3.py index 94bca5a8f3a1..e4779bfbca07 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity_py3.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_hook_activity_py3.py @@ -57,7 +57,7 @@ class WebHookActivity(ControlActivity): :param authentication: Authentication method used for calling the endpoint. :type authentication: - ~azure.mgmt.datafactory.models.WebHookActivityAuthentication + ~azure.mgmt.datafactory.models.WebActivityAuthentication """ _validation = { @@ -79,7 +79,7 @@ class WebHookActivity(ControlActivity): 'timeout': {'key': 'typeProperties.timeout', 'type': 'object'}, 'headers': {'key': 'typeProperties.headers', 'type': 'object'}, 'body': {'key': 'typeProperties.body', 'type': 'object'}, - 'authentication': {'key': 'typeProperties.authentication', 'type': 'WebHookActivityAuthentication'}, + 'authentication': {'key': 'typeProperties.authentication', 'type': 'WebActivityAuthentication'}, } method = "POST" From 6d6cb27d51cf630b77f3951737db3c49f6e23b6a Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 10 Jan 2019 20:08:23 +0000 Subject: [PATCH 3/3] Generated from dafb0014942f618644438753c10df85ea504ccfa revert auth type enum change --- .../azure/mgmt/datafactory/models/__init__.py | 2 -- .../models/data_factory_management_client_enums.py | 7 ------- .../datafactory/models/web_activity_authentication.py | 6 ++---- .../datafactory/models/web_activity_authentication_py3.py | 8 +++----- 4 files changed, 5 insertions(+), 18 deletions(-) diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py index acbcb5b1a472..96700c048a45 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py @@ -779,7 +779,6 @@ SybaseAuthenticationType, DatasetCompressionLevel, JsonFormatFilePattern, - WebActivityAuthenticationType, WebActivityMethod, CassandraSourceReadConsistencyLevels, StoredProcedureParameterType, @@ -1211,7 +1210,6 @@ 'SybaseAuthenticationType', 'DatasetCompressionLevel', 'JsonFormatFilePattern', - 'WebActivityAuthenticationType', 'WebActivityMethod', 'CassandraSourceReadConsistencyLevels', 'StoredProcedureParameterType', diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/data_factory_management_client_enums.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/data_factory_management_client_enums.py index 2d0f38c976c6..a135c4b2e101 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/data_factory_management_client_enums.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/data_factory_management_client_enums.py @@ -308,13 +308,6 @@ class JsonFormatFilePattern(str, Enum): array_of_objects = "arrayOfObjects" -class WebActivityAuthenticationType(str, Enum): - - basic = "Basic" - client_certificate = "ClientCertificate" - msi = "MSI" - - class WebActivityMethod(str, Enum): get = "GET" diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_activity_authentication.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_activity_authentication.py index abce44faa5c2..6ebb193ae5e9 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_activity_authentication.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_activity_authentication.py @@ -18,10 +18,8 @@ class WebActivityAuthentication(Model): All required parameters must be populated in order to send to Azure. :param type: Required. Web activity authentication - (Basic/ClientCertificate/MSI). Possible values include: 'Basic', - 'ClientCertificate', 'MSI' - :type type: str or - ~azure.mgmt.datafactory.models.WebActivityAuthenticationType + (Basic/ClientCertificate/MSI) + :type type: str :param pfx: Base64-encoded contents of a PFX file. :type pfx: ~azure.mgmt.datafactory.models.SecureString :param username: Web activity authentication user name for basic diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_activity_authentication_py3.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_activity_authentication_py3.py index a82b06ed0ce7..4c2b68ba7161 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_activity_authentication_py3.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/web_activity_authentication_py3.py @@ -18,10 +18,8 @@ class WebActivityAuthentication(Model): All required parameters must be populated in order to send to Azure. :param type: Required. Web activity authentication - (Basic/ClientCertificate/MSI). Possible values include: 'Basic', - 'ClientCertificate', 'MSI' - :type type: str or - ~azure.mgmt.datafactory.models.WebActivityAuthenticationType + (Basic/ClientCertificate/MSI) + :type type: str :param pfx: Base64-encoded contents of a PFX file. :type pfx: ~azure.mgmt.datafactory.models.SecureString :param username: Web activity authentication user name for basic @@ -46,7 +44,7 @@ class WebActivityAuthentication(Model): 'resource': {'key': 'resource', 'type': 'str'}, } - def __init__(self, *, type, pfx=None, username: str=None, password=None, resource: str=None, **kwargs) -> None: + def __init__(self, *, type: str, pfx=None, username: str=None, password=None, resource: str=None, **kwargs) -> None: super(WebActivityAuthentication, self).__init__(**kwargs) self.type = type self.pfx = pfx