-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Datafactory] Enable Avro Dataset in SDK (#7112)
* [Datafactory] Enable Avro Dataset in SDK * update
- Loading branch information
1 parent
b3e9ba5
commit 187b372
Showing
17 changed files
with
821 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,12 @@ AutoRest installed successfully. | |
Commencing code generation | ||
Generating CSharp code | ||
Executing AutoRest command | ||
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/datafactory/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --tag=package-2018-06 --csharp-sdks-folder=D:\0729\o\azure-sdk-for-net\sdk | ||
2019-07-30 03:06:44 UTC | ||
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/datafactory/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --tag=package-2018-06 --csharp-sdks-folder=D:\Git\AdmsSdkChange\sdk | ||
2019-08-07 01:45:14 UTC | ||
Azure-rest-api-specs repository information | ||
GitHub fork: Azure | ||
Branch: master | ||
Commit: bfbcefd37ee3df9634555b9f6be2a6ab6560286b | ||
Commit: 694f153a2f2eb22fdab6035ba9dc9eaaf375a386 | ||
AutoRest information | ||
Requested version: latest | ||
Bootstrapper version: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...ctory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AvroCompressionCodec.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// <auto-generated> | ||
// 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. | ||
// </auto-generated> | ||
|
||
namespace Microsoft.Azure.Management.DataFactory.Models | ||
{ | ||
|
||
/// <summary> | ||
/// Defines values for AvroCompressionCodec. | ||
/// </summary> | ||
public static class AvroCompressionCodec | ||
{ | ||
public const string None = "none"; | ||
public const string Deflate = "deflate"; | ||
public const string Snappy = "snappy"; | ||
public const string Xz = "xz"; | ||
public const string Bzip2 = "bzip2"; | ||
} | ||
} |
116 changes: 116 additions & 0 deletions
116
sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AvroDataset.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
// <auto-generated> | ||
// 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. | ||
// </auto-generated> | ||
|
||
namespace Microsoft.Azure.Management.DataFactory.Models | ||
{ | ||
using Microsoft.Rest; | ||
using Microsoft.Rest.Serialization; | ||
using Newtonsoft.Json; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
||
/// <summary> | ||
/// Avro dataset. | ||
/// </summary> | ||
[Newtonsoft.Json.JsonObject("Avro")] | ||
[Rest.Serialization.JsonTransformation] | ||
public partial class AvroDataset : Dataset | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the AvroDataset class. | ||
/// </summary> | ||
public AvroDataset() | ||
{ | ||
LinkedServiceName = new LinkedServiceReference(); | ||
CustomInit(); | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the AvroDataset class. | ||
/// </summary> | ||
/// <param name="linkedServiceName">Linked service reference.</param> | ||
/// <param name="location">The location of the avro storage.</param> | ||
/// <param name="additionalProperties">Unmatched properties from the | ||
/// message are deserialized this collection</param> | ||
/// <param name="description">Dataset description.</param> | ||
/// <param name="structure">Columns that define the structure of the | ||
/// dataset. Type: array (or Expression with resultType array), | ||
/// itemType: DatasetDataElement.</param> | ||
/// <param name="schema">Columns that define the physical type schema | ||
/// of the dataset. Type: array (or Expression with resultType array), | ||
/// itemType: DatasetSchemaDataElement.</param> | ||
/// <param name="parameters">Parameters for dataset.</param> | ||
/// <param name="annotations">List of tags that can be used for | ||
/// describing the Dataset.</param> | ||
/// <param name="folder">The folder that this Dataset is in. If not | ||
/// specified, Dataset will appear at the root level.</param> | ||
/// <param name="avroCompressionCodec">Possible values include: 'none', | ||
/// 'deflate', 'snappy', 'xz', 'bzip2'</param> | ||
public AvroDataset(LinkedServiceReference linkedServiceName, DatasetLocation location, IDictionary<string, object> additionalProperties = default(IDictionary<string, object>), string description = default(string), object structure = default(object), object schema = default(object), IDictionary<string, ParameterSpecification> parameters = default(IDictionary<string, ParameterSpecification>), IList<object> annotations = default(IList<object>), DatasetFolder folder = default(DatasetFolder), string avroCompressionCodec = default(string), int? avroCompressionLevel = default(int?)) | ||
: base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) | ||
{ | ||
Location = location; | ||
AvroCompressionCodec = avroCompressionCodec; | ||
AvroCompressionLevel = avroCompressionLevel; | ||
CustomInit(); | ||
} | ||
|
||
/// <summary> | ||
/// An initialization method that performs custom operations like setting defaults | ||
/// </summary> | ||
partial void CustomInit(); | ||
|
||
/// <summary> | ||
/// Gets or sets the location of the avro storage. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "typeProperties.location")] | ||
public DatasetLocation Location { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets possible values include: 'none', 'deflate', 'snappy', | ||
/// 'xz', 'bzip2' | ||
/// </summary> | ||
[JsonProperty(PropertyName = "typeProperties.avroCompressionCodec")] | ||
public string AvroCompressionCodec { get; set; } | ||
|
||
/// <summary> | ||
/// </summary> | ||
[JsonProperty(PropertyName = "typeProperties.avroCompressionLevel")] | ||
public int? AvroCompressionLevel { get; set; } | ||
|
||
/// <summary> | ||
/// Validate the object. | ||
/// </summary> | ||
/// <exception cref="ValidationException"> | ||
/// Thrown if validation fails | ||
/// </exception> | ||
public override void Validate() | ||
{ | ||
base.Validate(); | ||
if (Location == null) | ||
{ | ||
throw new ValidationException(ValidationRules.CannotBeNull, "Location"); | ||
} | ||
if (Location != null) | ||
{ | ||
Location.Validate(); | ||
} | ||
if (AvroCompressionLevel > 9) | ||
{ | ||
throw new ValidationException(ValidationRules.InclusiveMaximum, "AvroCompressionLevel", 9); | ||
} | ||
if (AvroCompressionLevel < 1) | ||
{ | ||
throw new ValidationException(ValidationRules.InclusiveMinimum, "AvroCompressionLevel", 1); | ||
} | ||
} | ||
} | ||
} |
94 changes: 94 additions & 0 deletions
94
sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AvroSink.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
// <auto-generated> | ||
// 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. | ||
// </auto-generated> | ||
|
||
namespace Microsoft.Azure.Management.DataFactory.Models | ||
{ | ||
using Newtonsoft.Json; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
||
/// <summary> | ||
/// A copy activity Avro sink. | ||
/// </summary> | ||
public partial class AvroSink : CopySink | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the AvroSink class. | ||
/// </summary> | ||
public AvroSink() | ||
{ | ||
CustomInit(); | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the AvroSink class. | ||
/// </summary> | ||
/// <param name="additionalProperties">Unmatched properties from the | ||
/// message are deserialized this collection</param> | ||
/// <param name="writeBatchSize">Write batch size. Type: integer (or | ||
/// Expression with resultType integer), minimum: 0.</param> | ||
/// <param name="writeBatchTimeout">Write batch timeout. Type: string | ||
/// (or Expression with resultType string), pattern: | ||
/// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).</param> | ||
/// <param name="sinkRetryCount">Sink retry count. Type: integer (or | ||
/// Expression with resultType integer).</param> | ||
/// <param name="sinkRetryWait">Sink retry wait. Type: string (or | ||
/// Expression with resultType string), pattern: | ||
/// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).</param> | ||
/// <param name="maxConcurrentConnections">The maximum concurrent | ||
/// connection count for the sink data store. Type: integer (or | ||
/// Expression with resultType integer).</param> | ||
/// <param name="storeSettings">Avro store settings.</param> | ||
/// <param name="formatSettings">Avro format settings.</param> | ||
public AvroSink(IDictionary<string, object> additionalProperties = default(IDictionary<string, object>), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), StoreWriteSettings storeSettings = default(StoreWriteSettings), AvroWriteSettings formatSettings = default(AvroWriteSettings)) | ||
: base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections) | ||
{ | ||
StoreSettings = storeSettings; | ||
FormatSettings = formatSettings; | ||
CustomInit(); | ||
} | ||
|
||
/// <summary> | ||
/// An initialization method that performs custom operations like setting defaults | ||
/// </summary> | ||
partial void CustomInit(); | ||
|
||
/// <summary> | ||
/// Gets or sets avro store settings. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "storeSettings")] | ||
public StoreWriteSettings StoreSettings { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets avro format settings. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "formatSettings")] | ||
public AvroWriteSettings FormatSettings { get; set; } | ||
|
||
/// <summary> | ||
/// Validate the object. | ||
/// </summary> | ||
/// <exception cref="Rest.ValidationException"> | ||
/// Thrown if validation fails | ||
/// </exception> | ||
public virtual void Validate() | ||
{ | ||
if (StoreSettings != null) | ||
{ | ||
StoreSettings.Validate(); | ||
} | ||
if (FormatSettings != null) | ||
{ | ||
FormatSettings.Validate(); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.