Skip to content

Commit

Permalink
CodeGen from PR 28122 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge d3ef35c4bbb9114518b8cfc7150639d9c2517301 into b5a069b591621be48ffbfbb131b79e5100ec7829
  • Loading branch information
SDKAuto committed Mar 14, 2024
1 parent 04ad332 commit c1283e0
Showing 7 changed files with 1,374 additions and 106 deletions.
4 changes: 2 additions & 2 deletions sdk/datafactory/azure-mgmt-datafactory/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "6f8faf5da91b5b9af5f3512fe609e22e99383d41",
"commit": "e9919d568838f2995cfc0e8c07514ec27ec9a3a4",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.7",
"use": [
"@autorest/python@6.7.1",
"@autorest/modelerfour@4.26.2"
],
"autorest_command": "autorest specification/datafactory/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False",
"autorest_command": "autorest specification/datafactory/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False",
"readme": "specification/datafactory/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "6.0.0"
VERSION = "1.0.0"
Original file line number Diff line number Diff line change
@@ -62,18 +62,17 @@ def __init__(self, *args, **kwargs) -> None:
@distributed_trace
def list_by_factory(
self, resource_group_name: str, factory_name: str, **kwargs: Any
) -> AsyncIterable["_models.ManagedIdentityCredentialResource"]:
) -> AsyncIterable["_models.CredentialResource"]:
"""List credentials.
:param resource_group_name: The resource group name. Required.
:type resource_group_name: str
:param factory_name: The factory name. Required.
:type factory_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either ManagedIdentityCredentialResource or the result of
cls(response)
:return: An iterator like instance of either CredentialResource or the result of cls(response)
:rtype:
~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.datafactory.models.ManagedIdentityCredentialResource]
~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.datafactory.models.CredentialResource]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
@@ -157,12 +156,12 @@ async def create_or_update(
resource_group_name: str,
factory_name: str,
credential_name: str,
credential: _models.ManagedIdentityCredentialResource,
credential: _models.CredentialResource,
if_match: Optional[str] = None,
*,
content_type: str = "application/json",
**kwargs: Any
) -> _models.ManagedIdentityCredentialResource:
) -> _models.CredentialResource:
"""Creates or updates a credential.
:param resource_group_name: The resource group name. Required.
@@ -172,16 +171,16 @@ async def create_or_update(
:param credential_name: Credential name. Required.
:type credential_name: str
:param credential: Credential resource definition. Required.
:type credential: ~azure.mgmt.datafactory.models.ManagedIdentityCredentialResource
:type credential: ~azure.mgmt.datafactory.models.CredentialResource
:param if_match: ETag of the credential entity. Should only be specified for update, for which
it should match existing entity or can be * for unconditional update. Default value is None.
:type if_match: str
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: ManagedIdentityCredentialResource or the result of cls(response)
:rtype: ~azure.mgmt.datafactory.models.ManagedIdentityCredentialResource
:return: CredentialResource or the result of cls(response)
:rtype: ~azure.mgmt.datafactory.models.CredentialResource
:raises ~azure.core.exceptions.HttpResponseError:
"""

@@ -196,7 +195,7 @@ async def create_or_update(
*,
content_type: str = "application/json",
**kwargs: Any
) -> _models.ManagedIdentityCredentialResource:
) -> _models.CredentialResource:
"""Creates or updates a credential.
:param resource_group_name: The resource group name. Required.
@@ -214,8 +213,8 @@ async def create_or_update(
Default value is "application/json".
:paramtype content_type: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: ManagedIdentityCredentialResource or the result of cls(response)
:rtype: ~azure.mgmt.datafactory.models.ManagedIdentityCredentialResource
:return: CredentialResource or the result of cls(response)
:rtype: ~azure.mgmt.datafactory.models.CredentialResource
:raises ~azure.core.exceptions.HttpResponseError:
"""

@@ -225,10 +224,10 @@ async def create_or_update(
resource_group_name: str,
factory_name: str,
credential_name: str,
credential: Union[_models.ManagedIdentityCredentialResource, IO],
credential: Union[_models.CredentialResource, IO],
if_match: Optional[str] = None,
**kwargs: Any
) -> _models.ManagedIdentityCredentialResource:
) -> _models.CredentialResource:
"""Creates or updates a credential.
:param resource_group_name: The resource group name. Required.
@@ -237,18 +236,18 @@ async def create_or_update(
:type factory_name: str
:param credential_name: Credential name. Required.
:type credential_name: str
:param credential: Credential resource definition. Is either a
ManagedIdentityCredentialResource type or a IO type. Required.
:type credential: ~azure.mgmt.datafactory.models.ManagedIdentityCredentialResource or IO
:param credential: Credential resource definition. Is either a CredentialResource type or a IO
type. Required.
:type credential: ~azure.mgmt.datafactory.models.CredentialResource or IO
:param if_match: ETag of the credential entity. Should only be specified for update, for which
it should match existing entity or can be * for unconditional update. Default value is None.
:type if_match: str
:keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
Default value is None.
:paramtype content_type: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: ManagedIdentityCredentialResource or the result of cls(response)
:rtype: ~azure.mgmt.datafactory.models.ManagedIdentityCredentialResource
:return: CredentialResource or the result of cls(response)
:rtype: ~azure.mgmt.datafactory.models.CredentialResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map = {
@@ -264,15 +263,15 @@ async def create_or_update(

api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.ManagedIdentityCredentialResource] = kwargs.pop("cls", None)
cls: ClsType[_models.CredentialResource] = kwargs.pop("cls", None)

content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(credential, (IOBase, bytes)):
_content = credential
else:
_json = self._serialize.body(credential, "ManagedIdentityCredentialResource")
_json = self._serialize.body(credential, "CredentialResource")

request = build_create_or_update_request(
resource_group_name=resource_group_name,
@@ -302,7 +301,7 @@ async def create_or_update(
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

deserialized = self._deserialize("ManagedIdentityCredentialResource", pipeline_response)
deserialized = self._deserialize("CredentialResource", pipeline_response)

if cls:
return cls(pipeline_response, deserialized, {})
@@ -321,7 +320,7 @@ async def get(
credential_name: str,
if_none_match: Optional[str] = None,
**kwargs: Any
) -> Optional[_models.ManagedIdentityCredentialResource]:
) -> Optional[_models.CredentialResource]:
"""Gets a credential.
:param resource_group_name: The resource group name. Required.
@@ -335,8 +334,8 @@ async def get(
Default value is None.
:type if_none_match: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: ManagedIdentityCredentialResource or None or the result of cls(response)
:rtype: ~azure.mgmt.datafactory.models.ManagedIdentityCredentialResource or None
:return: CredentialResource or None or the result of cls(response)
:rtype: ~azure.mgmt.datafactory.models.CredentialResource or None
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map = {
@@ -351,7 +350,7 @@ async def get(
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[Optional[_models.ManagedIdentityCredentialResource]] = kwargs.pop("cls", None)
cls: ClsType[Optional[_models.CredentialResource]] = kwargs.pop("cls", None)

request = build_get_request(
resource_group_name=resource_group_name,
@@ -380,7 +379,7 @@ async def get(

deserialized = None
if response.status_code == 200:
deserialized = self._deserialize("ManagedIdentityCredentialResource", pipeline_response)
deserialized = self._deserialize("CredentialResource", pipeline_response)

if cls:
return cls(pipeline_response, deserialized, {})
Original file line number Diff line number Diff line change
@@ -268,6 +268,7 @@
from ._models_py3 import ExposureControlRequest
from ._models_py3 import ExposureControlResponse
from ._models_py3 import Expression
from ._models_py3 import ExpressionV2
from ._models_py3 import Factory
from ._models_py3 import FactoryGitHubConfiguration
from ._models_py3 import FactoryIdentity
@@ -307,6 +308,9 @@
from ._models_py3 import GoogleBigQueryLinkedService
from ._models_py3 import GoogleBigQueryObjectDataset
from ._models_py3 import GoogleBigQuerySource
from ._models_py3 import GoogleBigQueryV2LinkedService
from ._models_py3 import GoogleBigQueryV2ObjectDataset
from ._models_py3 import GoogleBigQueryV2Source
from ._models_py3 import GoogleCloudStorageLinkedService
from ._models_py3 import GoogleCloudStorageLocation
from ._models_py3 import GoogleCloudStorageReadSettings
@@ -530,6 +534,9 @@
from ._models_py3 import PostgreSqlLinkedService
from ._models_py3 import PostgreSqlSource
from ._models_py3 import PostgreSqlTableDataset
from ._models_py3 import PostgreSqlV2LinkedService
from ._models_py3 import PostgreSqlV2Source
from ._models_py3 import PostgreSqlV2TableDataset
from ._models_py3 import PowerQuerySink
from ._models_py3 import PowerQuerySinkMapping
from ._models_py3 import PowerQuerySource
@@ -638,7 +645,11 @@
from ._models_py3 import ServiceNowLinkedService
from ._models_py3 import ServiceNowObjectDataset
from ._models_py3 import ServiceNowSource
from ._models_py3 import ServiceNowV2LinkedService
from ._models_py3 import ServiceNowV2ObjectDataset
from ._models_py3 import ServiceNowV2Source
from ._models_py3 import ServicePrincipalCredential
from ._models_py3 import ServicePrincipalCredentialResource
from ._models_py3 import SetVariableActivity
from ._models_py3 import SftpLocation
from ._models_py3 import SftpReadSettings
@@ -803,12 +814,14 @@
from ._data_factory_management_client_enums import DynamicsSinkWriteBehavior
from ._data_factory_management_client_enums import EventSubscriptionStatus
from ._data_factory_management_client_enums import ExpressionType
from ._data_factory_management_client_enums import ExpressionV2Type
from ._data_factory_management_client_enums import FactoryIdentityType
from ._data_factory_management_client_enums import FrequencyType
from ._data_factory_management_client_enums import FtpAuthenticationType
from ._data_factory_management_client_enums import GlobalParameterType
from ._data_factory_management_client_enums import GoogleAdWordsAuthenticationType
from ._data_factory_management_client_enums import GoogleBigQueryAuthenticationType
from ._data_factory_management_client_enums import GoogleBigQueryV2AuthenticationType
from ._data_factory_management_client_enums import HBaseAuthenticationType
from ._data_factory_management_client_enums import HDInsightActivityDebugInfoOption
from ._data_factory_management_client_enums import HdiNodeTypes
@@ -866,6 +879,7 @@
from ._data_factory_management_client_enums import ScriptType
from ._data_factory_management_client_enums import SelfHostedIntegrationRuntimeNodeStatus
from ._data_factory_management_client_enums import ServiceNowAuthenticationType
from ._data_factory_management_client_enums import ServiceNowV2AuthenticationType
from ._data_factory_management_client_enums import ServicePrincipalCredentialType
from ._data_factory_management_client_enums import SftpAuthenticationType
from ._data_factory_management_client_enums import SnowflakeAuthenticationType
@@ -1163,6 +1177,7 @@
"ExposureControlRequest",
"ExposureControlResponse",
"Expression",
"ExpressionV2",
"Factory",
"FactoryGitHubConfiguration",
"FactoryIdentity",
@@ -1202,6 +1217,9 @@
"GoogleBigQueryLinkedService",
"GoogleBigQueryObjectDataset",
"GoogleBigQuerySource",
"GoogleBigQueryV2LinkedService",
"GoogleBigQueryV2ObjectDataset",
"GoogleBigQueryV2Source",
"GoogleCloudStorageLinkedService",
"GoogleCloudStorageLocation",
"GoogleCloudStorageReadSettings",
@@ -1425,6 +1443,9 @@
"PostgreSqlLinkedService",
"PostgreSqlSource",
"PostgreSqlTableDataset",
"PostgreSqlV2LinkedService",
"PostgreSqlV2Source",
"PostgreSqlV2TableDataset",
"PowerQuerySink",
"PowerQuerySinkMapping",
"PowerQuerySource",
@@ -1533,7 +1554,11 @@
"ServiceNowLinkedService",
"ServiceNowObjectDataset",
"ServiceNowSource",
"ServiceNowV2LinkedService",
"ServiceNowV2ObjectDataset",
"ServiceNowV2Source",
"ServicePrincipalCredential",
"ServicePrincipalCredentialResource",
"SetVariableActivity",
"SftpLocation",
"SftpReadSettings",
@@ -1697,12 +1722,14 @@
"DynamicsSinkWriteBehavior",
"EventSubscriptionStatus",
"ExpressionType",
"ExpressionV2Type",
"FactoryIdentityType",
"FrequencyType",
"FtpAuthenticationType",
"GlobalParameterType",
"GoogleAdWordsAuthenticationType",
"GoogleBigQueryAuthenticationType",
"GoogleBigQueryV2AuthenticationType",
"HBaseAuthenticationType",
"HDInsightActivityDebugInfoOption",
"HdiNodeTypes",
@@ -1760,6 +1787,7 @@
"ScriptType",
"SelfHostedIntegrationRuntimeNodeStatus",
"ServiceNowAuthenticationType",
"ServiceNowV2AuthenticationType",
"ServicePrincipalCredentialType",
"SftpAuthenticationType",
"SnowflakeAuthenticationType",
Original file line number Diff line number Diff line change
@@ -271,6 +271,15 @@ class ExpressionType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
EXPRESSION = "Expression"


class ExpressionV2Type(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Type of expressions supported by the system. Type: string."""

CONSTANT = "Constant"
FIELD = "Field"
UNARY = "Unary"
BINARY = "Binary"


class FactoryIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The identity type."""

@@ -323,6 +332,13 @@ class GoogleBigQueryAuthenticationType(str, Enum, metaclass=CaseInsensitiveEnumM
USER_AUTHENTICATION = "UserAuthentication"


class GoogleBigQueryV2AuthenticationType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The OAuth 2.0 authentication mechanism used for authentication."""

SERVICE_AUTHENTICATION = "ServiceAuthentication"
USER_AUTHENTICATION = "UserAuthentication"


class HBaseAuthenticationType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The authentication mechanism to use to connect to the HBase server."""

@@ -819,6 +835,13 @@ class ServiceNowAuthenticationType(str, Enum, metaclass=CaseInsensitiveEnumMeta)
O_AUTH2 = "OAuth2"


class ServiceNowV2AuthenticationType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The authentication type to use."""

BASIC = "Basic"
O_AUTH2 = "OAuth2"


class ServicePrincipalCredentialType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""All available servicePrincipalCredentialType values."""

Loading

0 comments on commit c1283e0

Please sign in to comment.