Skip to content

[AutoPR @azure/arm-datafactory] datafactory: making the References actual Discriminated Types rather than documenting around it #4286

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions sdk/datafactory/arm-datafactory/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Release History

## 12.0.0 (2023-03-10)

**Features**

- Added Interface Reference
- Added Type Alias ReferenceUnion
- Interface AzureBlobFSLinkedService has a new optional parameter sasToken
- Interface AzureBlobFSLinkedService has a new optional parameter sasUri

**Breaking Changes**

- Type of parameter type of interface LinkedServiceReference is changed from Type to "LinkedServiceReference"
- Removed Enum KnownType


## 11.0.0 (2023-02-10)

**Features**
Expand Down
6 changes: 3 additions & 3 deletions sdk/datafactory/arm-datafactory/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "33a7dbc1743fdacb8e2259011a035154a98cad66",
"commit": "493d1ee200ec7abb4314609224c8e323e963a6fa",
"readme": "specification/datafactory/resource-manager/readme.md",
"autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\datafactory\\resource-manager\\readme.md --use=@autorest/[email protected].8 --generate-sample=true",
"autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/datafactory/resource-manager/readme.md --use=@autorest/[email protected].9",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/[email protected]",
"use": "@autorest/[email protected].8"
"use": "@autorest/[email protected].9"
}
16 changes: 4 additions & 12 deletions sdk/datafactory/arm-datafactory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for DataFactoryManagementClient.",
"version": "11.0.0",
"version": "12.0.0",
"engines": {
"node": ">=14.0.0"
},
Expand Down Expand Up @@ -41,7 +41,7 @@
"rimraf": "^3.0.0",
"dotenv": "^16.0.0",
"@azure/identity": "^2.0.1",
"@azure-tools/test-recorder": "^3.0.0",
"@azure-tools/test-recorder": "^2.0.0",
"@azure-tools/test-credential": "^1.0.0",
"mocha": "^7.1.1",
"@types/chai": "^4.2.8",
Expand Down Expand Up @@ -111,13 +111,5 @@
]
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/datafactory/arm-datafactory",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-datafactory?view=azure-node-preview"
}
}
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/datafactory/arm-datafactory"
}
26 changes: 14 additions & 12 deletions sdk/datafactory/arm-datafactory/review/arm-datafactory.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -401,13 +401,15 @@ export interface AzureBlobFSLinkedService extends LinkedService {
azureCloudType?: any;
credential?: CredentialReference;
encryptedCredential?: any;
sasToken?: SecretBaseUnion;
sasUri?: any;
servicePrincipalCredential?: SecretBaseUnion;
servicePrincipalCredentialType?: any;
servicePrincipalId?: any;
servicePrincipalKey?: SecretBaseUnion;
tenant?: any;
type: "AzureBlobFS";
url: any;
url?: any;
}

// @public
Expand Down Expand Up @@ -3796,7 +3798,7 @@ export interface IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse
}

// @public
export interface IntegrationRuntimeReference {
export interface IntegrationRuntimeReference extends Reference {
parameters?: {
[propertyName: string]: any;
};
Expand Down Expand Up @@ -4870,11 +4872,6 @@ export enum KnownTumblingWindowFrequency {
Month = "Month"
}

// @public
export enum KnownType {
LinkedServiceReference = "LinkedServiceReference"
}

// @public
export enum KnownVariableType {
Array = "Array",
Expand Down Expand Up @@ -4967,12 +4964,12 @@ export interface LinkedServiceListResponse {
}

// @public
export interface LinkedServiceReference {
export interface LinkedServiceReference extends Reference {
parameters?: {
[propertyName: string]: any;
};
referenceName: string;
type: Type;
type: "LinkedServiceReference";
}

// @public
Expand Down Expand Up @@ -6398,6 +6395,14 @@ export interface RedshiftUnloadSettings {
s3LinkedServiceName: LinkedServiceReference;
}

// @public
export interface Reference {
type: "IntegrationRuntimeReference" | "LinkedServiceReference";
}

// @public (undocumented)
export type ReferenceUnion = Reference | IntegrationRuntimeReference | LinkedServiceReference;

// @public
export interface RelationalSource extends CopySource {
additionalColumns?: any;
Expand Down Expand Up @@ -8146,9 +8151,6 @@ export interface TwilioLinkedService extends LinkedService {
userName: any;
}

// @public
export type Type = string;

// @public
export interface TypeConversionSettings {
allowDataTruncation?: any;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export class DataFactoryManagementClient extends coreClient.ServiceClient {
credential: credentials
};

const packageDetails = `azsdk-js-arm-datafactory/11.0.0`;
const packageDetails = `azsdk-js-arm-datafactory/12.0.0`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
Expand Down
67 changes: 33 additions & 34 deletions sdk/datafactory/arm-datafactory/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ export type LinkedServiceUnion =
| SnowflakeLinkedService
| SharePointOnlineListLinkedService
| AzureSynapseArtifactsLinkedService;
export type ReferenceUnion =
| Reference
| IntegrationRuntimeReference
| LinkedServiceReference;
export type DatasetUnion =
| Dataset
| AmazonS3Dataset
Expand Down Expand Up @@ -1372,14 +1376,10 @@ export interface LinkedService {
annotations?: any[];
}

/** Integration runtime reference type. */
export interface IntegrationRuntimeReference {
/** Type of integration runtime. */
type: "IntegrationRuntimeReference";
/** Reference integration runtime name. */
referenceName: string;
/** Arguments for integration runtime. */
parameters?: { [propertyName: string]: any };
/** Base reference type. */
export interface Reference {
/** Polymorphic discriminator, which specifies the different types this object can be */
type: "IntegrationRuntimeReference" | "LinkedServiceReference";
}

/** Definition of a single parameter for an entity. */
Expand Down Expand Up @@ -1516,16 +1516,6 @@ export interface Dataset {
folder?: DatasetFolder;
}

/** Linked service reference type. */
export interface LinkedServiceReference {
/** Linked service reference type. */
type: Type;
/** Reference LinkedService name. */
referenceName: string;
/** Arguments for LinkedService. */
parameters?: { [propertyName: string]: any };
}

/** The folder that this Dataset is in. If not specified, Dataset will appear at the root level. */
export interface DatasetFolder {
/** The name of the folder that this Dataset is in. */
Expand Down Expand Up @@ -4883,7 +4873,7 @@ export interface AzureBlobFSLinkedService extends LinkedService {
/** Polymorphic discriminator, which specifies the different types this object can be */
type: "AzureBlobFS";
/** Endpoint for the Azure Data Lake Storage Gen2 service. Type: string (or Expression with resultType string). */
url: any;
url?: any;
/** Account key for the Azure Data Lake Storage Gen2 service. Type: string (or Expression with resultType string). */
accountKey?: any;
/** The ID of the application used to authenticate against the Azure Data Lake Storage Gen2 account. Type: string (or Expression with resultType string). */
Expand All @@ -4902,6 +4892,10 @@ export interface AzureBlobFSLinkedService extends LinkedService {
servicePrincipalCredentialType?: any;
/** The credential of the service principal object in Azure Active Directory. If servicePrincipalCredentialType is 'ServicePrincipalKey', servicePrincipalCredential can be SecureString or AzureKeyVaultSecretReference. If servicePrincipalCredentialType is 'ServicePrincipalCert', servicePrincipalCredential can only be AzureKeyVaultSecretReference. */
servicePrincipalCredential?: SecretBaseUnion;
/** SAS URI of the Azure Data Lake Storage Gen2 service. Type: string, SecureString or AzureKeyVaultSecretReference. */
sasUri?: any;
/** The Azure key vault secret reference of sasToken in sas uri. */
sasToken?: SecretBaseUnion;
}

/** Office365 linked service. */
Expand Down Expand Up @@ -6381,6 +6375,26 @@ export interface AzureSynapseArtifactsLinkedService extends LinkedService {
workspaceResourceId?: any;
}

/** Integration runtime reference type. */
export interface IntegrationRuntimeReference extends Reference {
/** Polymorphic discriminator, which specifies the different types this object can be */
type: "IntegrationRuntimeReference";
/** Reference integration runtime name. */
referenceName: string;
/** Arguments for integration runtime. */
parameters?: { [propertyName: string]: any };
}

/** Linked service reference type. */
export interface LinkedServiceReference extends Reference {
/** Polymorphic discriminator, which specifies the different types this object can be */
type: "LinkedServiceReference";
/** Reference LinkedService name. */
referenceName: string;
/** Arguments for LinkedService. */
parameters?: { [propertyName: string]: any };
}

/** A single Amazon Simple Storage Service (S3) object or a set of S3 objects. */
export interface AmazonS3Dataset extends Dataset {
/** Polymorphic discriminator, which specifies the different types this object can be */
Expand Down Expand Up @@ -11029,21 +11043,6 @@ export enum KnownParameterType {
*/
export type ParameterType = string;

/** Known values of {@link Type} that the service accepts. */
export enum KnownType {
/** LinkedServiceReference */
LinkedServiceReference = "LinkedServiceReference"
}

/**
* Defines values for Type. \
* {@link KnownType} can be used interchangeably with Type,
* this enum contains the known values that the service supports.
* ### Known values supported by the service
* **LinkedServiceReference**
*/
export type Type = string;

/** Known values of {@link DependencyCondition} that the service accepts. */
export enum KnownDependencyCondition {
/** Succeeded */
Expand Down
Loading