Skip to content

Commit

Permalink
[Datafactory] Enable Avro Dataset in SDK (#7112)
Browse files Browse the repository at this point in the history
* [Datafactory] Enable Avro Dataset in SDK

* update
  • Loading branch information
yuzhangyi authored and erich-wang committed Aug 7, 2019
1 parent b3e9ba5 commit 187b372
Show file tree
Hide file tree
Showing 17 changed files with 821 additions and 17 deletions.
6 changes: 3 additions & 3 deletions eng/mgmt/mgmtmetadata/datafactory_resource-manager.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ public partial class DataFactoryManagementClient : ServiceClient<DataFactoryMana
public virtual ITriggersOperations Triggers { get; private set; }

/// <summary>
/// Gets the IRerunTriggersOperations.
/// Gets the ITriggerRunsOperations.
/// </summary>
public virtual IRerunTriggersOperations RerunTriggers { get; private set; }
public virtual ITriggerRunsOperations TriggerRuns { get; private set; }

/// <summary>
/// Gets the ITriggerRunsOperations.
/// Gets the IRerunTriggersOperations.
/// </summary>
public virtual ITriggerRunsOperations TriggerRuns { get; private set; }
public virtual IRerunTriggersOperations RerunTriggers { get; private set; }

/// <summary>
/// Initializes a new instance of the DataFactoryManagementClient class.
Expand Down Expand Up @@ -398,8 +398,8 @@ private void Initialize()
PipelineRuns = new PipelineRunsOperations(this);
ActivityRuns = new ActivityRunsOperations(this);
Triggers = new TriggersOperations(this);
RerunTriggers = new RerunTriggersOperations(this);
TriggerRuns = new TriggerRunsOperations(this);
RerunTriggers = new RerunTriggersOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
ApiVersion = "2018-06-01";
AcceptLanguage = "en-US";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,14 @@ public partial interface IDataFactoryManagementClient : System.IDisposable
ITriggersOperations Triggers { get; }

/// <summary>
/// Gets the IRerunTriggersOperations.
/// Gets the ITriggerRunsOperations.
/// </summary>
IRerunTriggersOperations RerunTriggers { get; }
ITriggerRunsOperations TriggerRuns { get; }

/// <summary>
/// Gets the ITriggerRunsOperations.
/// Gets the IRerunTriggersOperations.
/// </summary>
ITriggerRunsOperations TriggerRuns { get; }
IRerunTriggersOperations RerunTriggers { get; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,34 @@ namespace Microsoft.Azure.Management.DataFactory
/// </summary>
public partial interface ITriggerRunsOperations
{
/// <summary>
/// Rerun single trigger instance by runId.
/// </summary>
/// <param name='resourceGroupName'>
/// The resource group name.
/// </param>
/// <param name='factoryName'>
/// The factory name.
/// </param>
/// <param name='triggerName'>
/// The trigger name.
/// </param>
/// <param name='runId'>
/// The pipeline run identifier.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse> RerunWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, string runId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Query trigger runs.
/// </summary>
Expand Down
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";
}
}
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);
}
}
}
}
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();
}
}
}
}
Loading

0 comments on commit 187b372

Please sign in to comment.