diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py index e958df5cca8c..e758e9dae31f 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py @@ -39,6 +39,7 @@ from .activity_dependency_py3 import ActivityDependency from .user_property_py3 import UserProperty from .activity_py3 import Activity + from .variable_specification_py3 import VariableSpecification from .pipeline_folder_py3 import PipelineFolder from .pipeline_resource_py3 import PipelineResource from .trigger_py3 import Trigger @@ -325,6 +326,8 @@ from .copy_sink_py3 import CopySink from .copy_activity_py3 import CopyActivity from .execution_activity_py3 import ExecutionActivity + from .append_variable_activity_py3 import AppendVariableActivity + from .set_variable_activity_py3 import SetVariableActivity from .filter_activity_py3 import FilterActivity from .until_activity_py3 import UntilActivity from .wait_activity_py3 import WaitActivity @@ -385,6 +388,7 @@ from .activity_dependency import ActivityDependency from .user_property import UserProperty from .activity import Activity + from .variable_specification import VariableSpecification from .pipeline_folder import PipelineFolder from .pipeline_resource import PipelineResource from .trigger import Trigger @@ -671,6 +675,8 @@ from .copy_sink import CopySink from .copy_activity import CopyActivity from .execution_activity import ExecutionActivity + from .append_variable_activity import AppendVariableActivity + from .set_variable_activity import SetVariableActivity from .filter_activity import FilterActivity from .until_activity import UntilActivity from .wait_activity import WaitActivity @@ -713,6 +719,7 @@ IntegrationRuntimeAutoUpdate, ParameterType, DependencyCondition, + VariableType, TriggerRuntimeState, RunQueryFilterOperand, RunQueryFilterOperator, @@ -799,6 +806,7 @@ 'ActivityDependency', 'UserProperty', 'Activity', + 'VariableSpecification', 'PipelineFolder', 'PipelineResource', 'Trigger', @@ -1085,6 +1093,8 @@ 'CopySink', 'CopyActivity', 'ExecutionActivity', + 'AppendVariableActivity', + 'SetVariableActivity', 'FilterActivity', 'UntilActivity', 'WaitActivity', @@ -1126,6 +1136,7 @@ 'IntegrationRuntimeAutoUpdate', 'ParameterType', 'DependencyCondition', + 'VariableType', 'TriggerRuntimeState', 'RunQueryFilterOperand', 'RunQueryFilterOperator', diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/append_variable_activity.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/append_variable_activity.py new file mode 100644 index 000000000000..36a25e959061 --- /dev/null +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/append_variable_activity.py @@ -0,0 +1,60 @@ +# 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 AppendVariableActivity(ControlActivity): + """Append value for a Variable of type Array. + + 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 + :param variable_name: Name of the variable whose value needs to be + appended to. + :type variable_name: str + :param value: Value to be appended. Could be a static value or Expression + :type value: object + """ + + _validation = { + 'name': {'required': True}, + 'type': {'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'}, + 'variable_name': {'key': 'typeProperties.variableName', 'type': 'str'}, + 'value': {'key': 'typeProperties.value', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(AppendVariableActivity, self).__init__(**kwargs) + self.variable_name = kwargs.get('variable_name', None) + self.value = kwargs.get('value', None) + self.type = 'AppendVariable' diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/append_variable_activity_py3.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/append_variable_activity_py3.py new file mode 100644 index 000000000000..4526a6e4a45e --- /dev/null +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/append_variable_activity_py3.py @@ -0,0 +1,60 @@ +# 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 AppendVariableActivity(ControlActivity): + """Append value for a Variable of type Array. + + 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 + :param variable_name: Name of the variable whose value needs to be + appended to. + :type variable_name: str + :param value: Value to be appended. Could be a static value or Expression + :type value: object + """ + + _validation = { + 'name': {'required': True}, + 'type': {'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'}, + 'variable_name': {'key': 'typeProperties.variableName', 'type': 'str'}, + 'value': {'key': 'typeProperties.value', 'type': 'object'}, + } + + def __init__(self, *, name: str, additional_properties=None, description: str=None, depends_on=None, user_properties=None, variable_name: str=None, value=None, **kwargs) -> None: + super(AppendVariableActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, **kwargs) + self.variable_name = variable_name + self.value = value + self.type = 'AppendVariable' 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 87677dcfa6bf..16581581786b 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/control_activity.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/control_activity.py @@ -16,8 +16,9 @@ class ControlActivity(Activity): """Base class for all control activities like IfCondition, ForEach , Until. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: FilterActivity, UntilActivity, WaitActivity, - ForEachActivity, IfConditionActivity, ExecutePipelineActivity + sub-classes are: AppendVariableActivity, SetVariableActivity, + FilterActivity, UntilActivity, WaitActivity, ForEachActivity, + IfConditionActivity, ExecutePipelineActivity All required parameters must be populated in order to send to Azure. @@ -51,7 +52,7 @@ class ControlActivity(Activity): } _subtype_map = { - 'type': {'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', '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 09004ce2cee2..739d8b9c311b 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 @@ -16,8 +16,9 @@ class ControlActivity(Activity): """Base class for all control activities like IfCondition, ForEach , Until. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: FilterActivity, UntilActivity, WaitActivity, - ForEachActivity, IfConditionActivity, ExecutePipelineActivity + sub-classes are: AppendVariableActivity, SetVariableActivity, + FilterActivity, UntilActivity, WaitActivity, ForEachActivity, + IfConditionActivity, ExecutePipelineActivity All required parameters must be populated in order to send to Azure. @@ -51,7 +52,7 @@ class ControlActivity(Activity): } _subtype_map = { - 'type': {'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', '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 086348af981d..2de647ff9d8b 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 @@ -51,6 +51,13 @@ class DependencyCondition(str, Enum): completed = "Completed" +class VariableType(str, Enum): + + string = "String" + bool_enum = "Bool" + array = "Array" + + class TriggerRuntimeState(str, Enum): started = "Started" diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_resource.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_resource.py index 00d1ec8cf81a..a39deaccc87b 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_resource.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_resource.py @@ -36,6 +36,9 @@ class PipelineResource(SubResource): :param parameters: List of parameters for pipeline. :type parameters: dict[str, ~azure.mgmt.datafactory.models.ParameterSpecification] + :param variables: List of variables for pipeline. + :type variables: dict[str, + ~azure.mgmt.datafactory.models.VariableSpecification] :param concurrency: The max number of concurrent runs for the pipeline. :type concurrency: int :param annotations: List of tags that can be used for describing the @@ -63,6 +66,7 @@ class PipelineResource(SubResource): 'description': {'key': 'properties.description', 'type': 'str'}, 'activities': {'key': 'properties.activities', 'type': '[Activity]'}, 'parameters': {'key': 'properties.parameters', 'type': '{ParameterSpecification}'}, + 'variables': {'key': 'properties.variables', 'type': '{VariableSpecification}'}, 'concurrency': {'key': 'properties.concurrency', 'type': 'int'}, 'annotations': {'key': 'properties.annotations', 'type': '[object]'}, 'folder': {'key': 'properties.folder', 'type': 'PipelineFolder'}, @@ -74,6 +78,7 @@ def __init__(self, **kwargs): self.description = kwargs.get('description', None) self.activities = kwargs.get('activities', None) self.parameters = kwargs.get('parameters', None) + self.variables = kwargs.get('variables', None) self.concurrency = kwargs.get('concurrency', None) self.annotations = kwargs.get('annotations', None) self.folder = kwargs.get('folder', None) diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_resource_py3.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_resource_py3.py index 44eb05b05522..8299cdb73887 100644 --- a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_resource_py3.py +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/pipeline_resource_py3.py @@ -36,6 +36,9 @@ class PipelineResource(SubResource): :param parameters: List of parameters for pipeline. :type parameters: dict[str, ~azure.mgmt.datafactory.models.ParameterSpecification] + :param variables: List of variables for pipeline. + :type variables: dict[str, + ~azure.mgmt.datafactory.models.VariableSpecification] :param concurrency: The max number of concurrent runs for the pipeline. :type concurrency: int :param annotations: List of tags that can be used for describing the @@ -63,17 +66,19 @@ class PipelineResource(SubResource): 'description': {'key': 'properties.description', 'type': 'str'}, 'activities': {'key': 'properties.activities', 'type': '[Activity]'}, 'parameters': {'key': 'properties.parameters', 'type': '{ParameterSpecification}'}, + 'variables': {'key': 'properties.variables', 'type': '{VariableSpecification}'}, 'concurrency': {'key': 'properties.concurrency', 'type': 'int'}, 'annotations': {'key': 'properties.annotations', 'type': '[object]'}, 'folder': {'key': 'properties.folder', 'type': 'PipelineFolder'}, } - def __init__(self, *, additional_properties=None, description: str=None, activities=None, parameters=None, concurrency: int=None, annotations=None, folder=None, **kwargs) -> None: + def __init__(self, *, additional_properties=None, description: str=None, activities=None, parameters=None, variables=None, concurrency: int=None, annotations=None, folder=None, **kwargs) -> None: super(PipelineResource, self).__init__(**kwargs) self.additional_properties = additional_properties self.description = description self.activities = activities self.parameters = parameters + self.variables = variables self.concurrency = concurrency self.annotations = annotations self.folder = folder diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/set_variable_activity.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/set_variable_activity.py new file mode 100644 index 000000000000..e8dd1690862d --- /dev/null +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/set_variable_activity.py @@ -0,0 +1,59 @@ +# 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 SetVariableActivity(ControlActivity): + """Set value for a Variable. + + 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 + :param variable_name: Name of the variable whose value needs to be set. + :type variable_name: str + :param value: Value to be set. Could be a static value or Expression + :type value: object + """ + + _validation = { + 'name': {'required': True}, + 'type': {'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'}, + 'variable_name': {'key': 'typeProperties.variableName', 'type': 'str'}, + 'value': {'key': 'typeProperties.value', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SetVariableActivity, self).__init__(**kwargs) + self.variable_name = kwargs.get('variable_name', None) + self.value = kwargs.get('value', None) + self.type = 'SetVariable' diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/set_variable_activity_py3.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/set_variable_activity_py3.py new file mode 100644 index 000000000000..e045abee3dfb --- /dev/null +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/set_variable_activity_py3.py @@ -0,0 +1,59 @@ +# 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 SetVariableActivity(ControlActivity): + """Set value for a Variable. + + 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 + :param variable_name: Name of the variable whose value needs to be set. + :type variable_name: str + :param value: Value to be set. Could be a static value or Expression + :type value: object + """ + + _validation = { + 'name': {'required': True}, + 'type': {'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'}, + 'variable_name': {'key': 'typeProperties.variableName', 'type': 'str'}, + 'value': {'key': 'typeProperties.value', 'type': 'object'}, + } + + def __init__(self, *, name: str, additional_properties=None, description: str=None, depends_on=None, user_properties=None, variable_name: str=None, value=None, **kwargs) -> None: + super(SetVariableActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, **kwargs) + self.variable_name = variable_name + self.value = value + self.type = 'SetVariable' diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/variable_specification.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/variable_specification.py new file mode 100644 index 000000000000..6d7fd808fa44 --- /dev/null +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/variable_specification.py @@ -0,0 +1,39 @@ +# 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 VariableSpecification(Model): + """Definition of a single variable for a Pipeline. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Variable type. Possible values include: 'String', + 'Bool', 'Array' + :type type: str or ~azure.mgmt.datafactory.models.VariableType + :param default_value: Default value of variable. + :type default_value: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'default_value': {'key': 'defaultValue', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(VariableSpecification, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.default_value = kwargs.get('default_value', None) diff --git a/azure-mgmt-datafactory/azure/mgmt/datafactory/models/variable_specification_py3.py b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/variable_specification_py3.py new file mode 100644 index 000000000000..d60b3b4b1591 --- /dev/null +++ b/azure-mgmt-datafactory/azure/mgmt/datafactory/models/variable_specification_py3.py @@ -0,0 +1,39 @@ +# 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 VariableSpecification(Model): + """Definition of a single variable for a Pipeline. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Variable type. Possible values include: 'String', + 'Bool', 'Array' + :type type: str or ~azure.mgmt.datafactory.models.VariableType + :param default_value: Default value of variable. + :type default_value: object + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'default_value': {'key': 'defaultValue', 'type': 'object'}, + } + + def __init__(self, *, type, default_value=None, **kwargs) -> None: + super(VariableSpecification, self).__init__(**kwargs) + self.type = type + self.default_value = default_value