Skip to content

Commit

Permalink
CodeGen from PR 17745 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge b45ba729b4f637a92ea4039f37a3ddbf66ac7181 into 3fb3861
  • Loading branch information
SDKAuto committed Feb 10, 2022
1 parent 1e60360 commit 3d8d6fe
Show file tree
Hide file tree
Showing 5 changed files with 295 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sdk/datafactory/azure-mgmt-datafactory/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"@autorest/[email protected]",
"@autorest/[email protected]"
],
"commit": "c00793a9795d095a6798f63eabf9108c4812fbb1",
"commit": "9971cb6c915b98253bcd25bde04d4d36e1fa2a72",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/datafactory/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.7.2",
"readme": "specification/datafactory/resource-manager/readme.md"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "2.2.0"
VERSION = "1.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,10 @@
from ._models_py3 import ScheduleTrigger
from ._models_py3 import ScheduleTriggerRecurrence
from ._models_py3 import ScriptAction
from ._models_py3 import ScriptActivity
from ._models_py3 import ScriptActivityParameter
from ._models_py3 import ScriptActivityScriptBlock
from ._models_py3 import ScriptActivityTypePropertiesLogSettings
from ._models_py3 import SecretBase
from ._models_py3 import SecureString
from ._models_py3 import SelfDependencyTumblingWindowTriggerReference
Expand Down Expand Up @@ -769,6 +773,10 @@
SapHanaAuthenticationType,
SapHanaPartitionOption,
SapTablePartitionOption,
ScriptActivityLogDestination,
ScriptActivityParameterDirection,
ScriptActivityParameterType,
ScriptType,
SelfHostedIntegrationRuntimeNodeStatus,
ServiceNowAuthenticationType,
ServicePrincipalCredentialType,
Expand Down Expand Up @@ -1361,6 +1369,10 @@
'ScheduleTrigger',
'ScheduleTriggerRecurrence',
'ScriptAction',
'ScriptActivity',
'ScriptActivityParameter',
'ScriptActivityScriptBlock',
'ScriptActivityTypePropertiesLogSettings',
'SecretBase',
'SecureString',
'SelfDependencyTumblingWindowTriggerReference',
Expand Down Expand Up @@ -1557,6 +1569,10 @@
'SapHanaAuthenticationType',
'SapHanaPartitionOption',
'SapTablePartitionOption',
'ScriptActivityLogDestination',
'ScriptActivityParameterDirection',
'ScriptActivityParameterType',
'ScriptType',
'SelfHostedIntegrationRuntimeNodeStatus',
'ServiceNowAuthenticationType',
'ServicePrincipalCredentialType',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,45 @@ class SapTablePartitionOption(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)
PARTITION_ON_CALENDAR_DATE = "PartitionOnCalendarDate"
PARTITION_ON_TIME = "PartitionOnTime"

class ScriptActivityLogDestination(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""The destination of logs. Type: string.
"""

ACTIVITY_OUTPUT = "ActivityOutput"
EXTERNAL_STORE = "ExternalStore"

class ScriptActivityParameterDirection(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""The direction of the parameter.
"""

INPUT = "Input"
OUTPUT = "Output"
INPUT_OUTPUT = "InputOutput"

class ScriptActivityParameterType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""The type of the parameter.
"""

BOOLEAN = "Boolean"
DATE_TIME = "DateTime"
DATE_TIME_OFFSET = "DateTimeOffset"
DECIMAL = "Decimal"
DOUBLE = "Double"
GUID = "Guid"
INT16 = "Int16"
INT32 = "Int32"
INT64 = "Int64"
SINGLE = "Single"
STRING = "String"
TIMESPAN = "Timespan"

class ScriptType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""The type of the query. Type: string.
"""

QUERY = "Query"
NON_QUERY = "NonQuery"

class SelfHostedIntegrationRuntimeNodeStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""Status of the integration runtime node.
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6308,7 +6308,7 @@ class ExecutionActivity(Activity):
"""Base class for all execution activities.

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: AzureDataExplorerCommandActivity, AzureFunctionActivity, AzureMLBatchExecutionActivity, AzureMLExecutePipelineActivity, AzureMLUpdateResourceActivity, CopyActivity, CustomActivity, DataLakeAnalyticsUSQLActivity, DatabricksNotebookActivity, DatabricksSparkJarActivity, DatabricksSparkPythonActivity, DeleteActivity, ExecuteDataFlowActivity, ExecuteSSISPackageActivity, GetMetadataActivity, HDInsightHiveActivity, HDInsightMapReduceActivity, HDInsightPigActivity, HDInsightSparkActivity, HDInsightStreamingActivity, LookupActivity, SqlServerStoredProcedureActivity, WebActivity.
sub-classes are: AzureDataExplorerCommandActivity, AzureFunctionActivity, AzureMLBatchExecutionActivity, AzureMLExecutePipelineActivity, AzureMLUpdateResourceActivity, CopyActivity, CustomActivity, DataLakeAnalyticsUSQLActivity, DatabricksNotebookActivity, DatabricksSparkJarActivity, DatabricksSparkPythonActivity, DeleteActivity, ExecuteDataFlowActivity, ExecuteSSISPackageActivity, GetMetadataActivity, HDInsightHiveActivity, HDInsightMapReduceActivity, HDInsightPigActivity, HDInsightSparkActivity, HDInsightStreamingActivity, LookupActivity, ScriptActivity, SqlServerStoredProcedureActivity, WebActivity.

All required parameters must be populated in order to send to Azure.

Expand Down Expand Up @@ -6348,7 +6348,7 @@ class ExecutionActivity(Activity):
}

_subtype_map = {
'type': {'AzureDataExplorerCommand': 'AzureDataExplorerCommandActivity', 'AzureFunctionActivity': 'AzureFunctionActivity', 'AzureMLBatchExecution': 'AzureMLBatchExecutionActivity', 'AzureMLExecutePipeline': 'AzureMLExecutePipelineActivity', 'AzureMLUpdateResource': 'AzureMLUpdateResourceActivity', 'Copy': 'CopyActivity', 'Custom': 'CustomActivity', 'DataLakeAnalyticsU-SQL': 'DataLakeAnalyticsUSQLActivity', 'DatabricksNotebook': 'DatabricksNotebookActivity', 'DatabricksSparkJar': 'DatabricksSparkJarActivity', 'DatabricksSparkPython': 'DatabricksSparkPythonActivity', 'Delete': 'DeleteActivity', 'ExecuteDataFlow': 'ExecuteDataFlowActivity', 'ExecuteSSISPackage': 'ExecuteSSISPackageActivity', 'GetMetadata': 'GetMetadataActivity', 'HDInsightHive': 'HDInsightHiveActivity', 'HDInsightMapReduce': 'HDInsightMapReduceActivity', 'HDInsightPig': 'HDInsightPigActivity', 'HDInsightSpark': 'HDInsightSparkActivity', 'HDInsightStreaming': 'HDInsightStreamingActivity', 'Lookup': 'LookupActivity', 'SqlServerStoredProcedure': 'SqlServerStoredProcedureActivity', 'WebActivity': 'WebActivity'}
'type': {'AzureDataExplorerCommand': 'AzureDataExplorerCommandActivity', 'AzureFunctionActivity': 'AzureFunctionActivity', 'AzureMLBatchExecution': 'AzureMLBatchExecutionActivity', 'AzureMLExecutePipeline': 'AzureMLExecutePipelineActivity', 'AzureMLUpdateResource': 'AzureMLUpdateResourceActivity', 'Copy': 'CopyActivity', 'Custom': 'CustomActivity', 'DataLakeAnalyticsU-SQL': 'DataLakeAnalyticsUSQLActivity', 'DatabricksNotebook': 'DatabricksNotebookActivity', 'DatabricksSparkJar': 'DatabricksSparkJarActivity', 'DatabricksSparkPython': 'DatabricksSparkPythonActivity', 'Delete': 'DeleteActivity', 'ExecuteDataFlow': 'ExecuteDataFlowActivity', 'ExecuteSSISPackage': 'ExecuteSSISPackageActivity', 'GetMetadata': 'GetMetadataActivity', 'HDInsightHive': 'HDInsightHiveActivity', 'HDInsightMapReduce': 'HDInsightMapReduceActivity', 'HDInsightPig': 'HDInsightPigActivity', 'HDInsightSpark': 'HDInsightSparkActivity', 'HDInsightStreaming': 'HDInsightStreamingActivity', 'Lookup': 'LookupActivity', 'Script': 'ScriptActivity', 'SqlServerStoredProcedure': 'SqlServerStoredProcedureActivity', 'WebActivity': 'WebActivity'}
}

def __init__(
Expand Down Expand Up @@ -23542,7 +23542,7 @@ class FactoryUpdateParameters(msrest.serialization.Model):
_attribute_map = {
'tags': {'key': 'tags', 'type': '{str}'},
'identity': {'key': 'identity', 'type': 'FactoryIdentity'},
'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'},
'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'},
}

def __init__(
Expand Down Expand Up @@ -48644,6 +48644,241 @@ def __init__(
self.parameters = parameters


class ScriptActivity(ExecutionActivity):
"""Script activity type.

All required parameters must be populated in order to send to Azure.

:ivar additional_properties: Unmatched properties from the message are deserialized to this
collection.
:vartype additional_properties: dict[str, any]
:ivar name: Required. Activity name.
:vartype name: str
:ivar type: Required. Type of activity.Constant filled by server.
:vartype type: str
:ivar description: Activity description.
:vartype description: str
:ivar depends_on: Activity depends on condition.
:vartype depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency]
:ivar user_properties: Activity user properties.
:vartype user_properties: list[~azure.mgmt.datafactory.models.UserProperty]
:ivar linked_service_name: Linked service reference.
:vartype linked_service_name: ~azure.mgmt.datafactory.models.LinkedServiceReference
:ivar policy: Activity policy.
:vartype policy: ~azure.mgmt.datafactory.models.ActivityPolicy
:ivar scripts: Array of script blocks. Type: array.
:vartype scripts: list[~azure.mgmt.datafactory.models.ScriptActivityScriptBlock]
:ivar log_settings: Log settings of script activity.
:vartype log_settings: ~azure.mgmt.datafactory.models.ScriptActivityTypePropertiesLogSettings
"""

_validation = {
'name': {'required': True},
'type': {'required': True},
}

_attribute_map = {
'additional_properties': {'key': '', 'type': '{object}'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
'depends_on': {'key': 'dependsOn', 'type': '[ActivityDependency]'},
'user_properties': {'key': 'userProperties', 'type': '[UserProperty]'},
'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'},
'policy': {'key': 'policy', 'type': 'ActivityPolicy'},
'scripts': {'key': 'typeProperties.scripts', 'type': '[ScriptActivityScriptBlock]'},
'log_settings': {'key': 'typeProperties.logSettings', 'type': 'ScriptActivityTypePropertiesLogSettings'},
}

def __init__(
self,
*,
name: str,
additional_properties: Optional[Dict[str, Any]] = None,
description: Optional[str] = None,
depends_on: Optional[List["ActivityDependency"]] = None,
user_properties: Optional[List["UserProperty"]] = None,
linked_service_name: Optional["LinkedServiceReference"] = None,
policy: Optional["ActivityPolicy"] = None,
scripts: Optional[List["ScriptActivityScriptBlock"]] = None,
log_settings: Optional["ScriptActivityTypePropertiesLogSettings"] = None,
**kwargs
):
"""
:keyword additional_properties: Unmatched properties from the message are deserialized to this
collection.
:paramtype additional_properties: dict[str, any]
:keyword name: Required. Activity name.
:paramtype name: str
:keyword description: Activity description.
:paramtype description: str
:keyword depends_on: Activity depends on condition.
:paramtype depends_on: list[~azure.mgmt.datafactory.models.ActivityDependency]
:keyword user_properties: Activity user properties.
:paramtype user_properties: list[~azure.mgmt.datafactory.models.UserProperty]
:keyword linked_service_name: Linked service reference.
:paramtype linked_service_name: ~azure.mgmt.datafactory.models.LinkedServiceReference
:keyword policy: Activity policy.
:paramtype policy: ~azure.mgmt.datafactory.models.ActivityPolicy
:keyword scripts: Array of script blocks. Type: array.
:paramtype scripts: list[~azure.mgmt.datafactory.models.ScriptActivityScriptBlock]
:keyword log_settings: Log settings of script activity.
:paramtype log_settings: ~azure.mgmt.datafactory.models.ScriptActivityTypePropertiesLogSettings
"""
super(ScriptActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs)
self.type = 'Script' # type: str
self.scripts = scripts
self.log_settings = log_settings


class ScriptActivityParameter(msrest.serialization.Model):
"""Parameters of a script block.

:ivar name: The name of the parameter. Type: string (or Expression with resultType string).
:vartype name: any
:ivar type: The type of the parameter. Possible values include: "Boolean", "DateTime",
"DateTimeOffset", "Decimal", "Double", "Guid", "Int16", "Int32", "Int64", "Single", "String",
"Timespan".
:vartype type: str or ~azure.mgmt.datafactory.models.ScriptActivityParameterType
:ivar value: The value of the parameter.
:vartype value: any
:ivar direction: The direction of the parameter. Possible values include: "Input", "Output",
"InputOutput".
:vartype direction: str or ~azure.mgmt.datafactory.models.ScriptActivityParameterDirection
:ivar size: The size of the output direction parameter.
:vartype size: int
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'object'},
'type': {'key': 'type', 'type': 'str'},
'value': {'key': 'value', 'type': 'object'},
'direction': {'key': 'direction', 'type': 'str'},
'size': {'key': 'size', 'type': 'int'},
}

def __init__(
self,
*,
name: Optional[Any] = None,
type: Optional[Union[str, "ScriptActivityParameterType"]] = None,
value: Optional[Any] = None,
direction: Optional[Union[str, "ScriptActivityParameterDirection"]] = None,
size: Optional[int] = None,
**kwargs
):
"""
:keyword name: The name of the parameter. Type: string (or Expression with resultType string).
:paramtype name: any
:keyword type: The type of the parameter. Possible values include: "Boolean", "DateTime",
"DateTimeOffset", "Decimal", "Double", "Guid", "Int16", "Int32", "Int64", "Single", "String",
"Timespan".
:paramtype type: str or ~azure.mgmt.datafactory.models.ScriptActivityParameterType
:keyword value: The value of the parameter.
:paramtype value: any
:keyword direction: The direction of the parameter. Possible values include: "Input", "Output",
"InputOutput".
:paramtype direction: str or ~azure.mgmt.datafactory.models.ScriptActivityParameterDirection
:keyword size: The size of the output direction parameter.
:paramtype size: int
"""
super(ScriptActivityParameter, self).__init__(**kwargs)
self.name = name
self.type = type
self.value = value
self.direction = direction
self.size = size


class ScriptActivityScriptBlock(msrest.serialization.Model):
"""Script block of scripts.

All required parameters must be populated in order to send to Azure.

:ivar text: Required. The query text. Type: string (or Expression with resultType string).
:vartype text: any
:ivar type: Required. The type of the query. Type: string. Possible values include: "Query",
"NonQuery".
:vartype type: str or ~azure.mgmt.datafactory.models.ScriptType
:ivar parameters: Array of script parameters. Type: array.
:vartype parameters: list[~azure.mgmt.datafactory.models.ScriptActivityParameter]
"""

_validation = {
'text': {'required': True},
'type': {'required': True},
}

_attribute_map = {
'text': {'key': 'text', 'type': 'object'},
'type': {'key': 'type', 'type': 'str'},
'parameters': {'key': 'parameters', 'type': '[ScriptActivityParameter]'},
}

def __init__(
self,
*,
text: Any,
type: Union[str, "ScriptType"],
parameters: Optional[List["ScriptActivityParameter"]] = None,
**kwargs
):
"""
:keyword text: Required. The query text. Type: string (or Expression with resultType string).
:paramtype text: any
:keyword type: Required. The type of the query. Type: string. Possible values include: "Query",
"NonQuery".
:paramtype type: str or ~azure.mgmt.datafactory.models.ScriptType
:keyword parameters: Array of script parameters. Type: array.
:paramtype parameters: list[~azure.mgmt.datafactory.models.ScriptActivityParameter]
"""
super(ScriptActivityScriptBlock, self).__init__(**kwargs)
self.text = text
self.type = type
self.parameters = parameters


class ScriptActivityTypePropertiesLogSettings(msrest.serialization.Model):
"""Log settings of script activity.

All required parameters must be populated in order to send to Azure.

:ivar log_destination: Required. The destination of logs. Type: string. Possible values
include: "ActivityOutput", "ExternalStore".
:vartype log_destination: str or ~azure.mgmt.datafactory.models.ScriptActivityLogDestination
:ivar log_location_settings: Log location settings customer needs to provide when enabling log.
:vartype log_location_settings: ~azure.mgmt.datafactory.models.LogLocationSettings
"""

_validation = {
'log_destination': {'required': True},
}

_attribute_map = {
'log_destination': {'key': 'logDestination', 'type': 'str'},
'log_location_settings': {'key': 'logLocationSettings', 'type': 'LogLocationSettings'},
}

def __init__(
self,
*,
log_destination: Union[str, "ScriptActivityLogDestination"],
log_location_settings: Optional["LogLocationSettings"] = None,
**kwargs
):
"""
:keyword log_destination: Required. The destination of logs. Type: string. Possible values
include: "ActivityOutput", "ExternalStore".
:paramtype log_destination: str or ~azure.mgmt.datafactory.models.ScriptActivityLogDestination
:keyword log_location_settings: Log location settings customer needs to provide when enabling
log.
:paramtype log_location_settings: ~azure.mgmt.datafactory.models.LogLocationSettings
"""
super(ScriptActivityTypePropertiesLogSettings, self).__init__(**kwargs)
self.log_destination = log_destination
self.log_location_settings = log_location_settings


class SecureString(SecretBase):
"""Azure Data Factory secure string definition. The string value will be masked with asterisks '*' during Get or List API calls.

Expand Down

0 comments on commit 3d8d6fe

Please sign in to comment.